Commit 1ab274fa authored by Johan Pascal's avatar Johan Pascal

Add a setAuxSecret and a flag to check specific mismatch on it

parent f3de0484
......@@ -117,6 +117,7 @@ typedef struct bzrtpSrtpSecrets_struct {
uint8_t keyAgreementAlgo; /**< The key agreement algo selected during ZRTP negotiation */
uint8_t sasAlgo; /**< The SAS rendering algo selected during ZRTP negotiation */
uint8_t cacheMismatch; /**< Flag set to 1 in case of ZRTP cache mismatch, may occurs only on first channel(the one computing SAS) */
uint8_t auxSecretMismatch; /**< Flag set to 1 in case of auxiliary secret mismatch, may occurs only on first channel(the one computing SAS), in case of mismatch it is just ignored and we can still validate the SAS */
} bzrtpSrtpSecrets_t;
......@@ -391,6 +392,20 @@ BZRTP_EXPORT int bzrtp_getSelfHelloHash(bzrtpContext_t *zrtpContext, uint32_t se
*/
BZRTP_EXPORT int bzrtp_getChannelStatus(bzrtpContext_t *zrtpContext, uint32_t selfSSRC);
/**
* @brief Set Auxiliary Secret for this channel(shall be used only on primary audio channel)
* The given auxSecret is appended to any aux secret found in ZIDcache
* This function must be called before reception of peerHello packet
*
* @param[in] zrtpContext The ZRTP context we're dealing with
* @param[in] auxSecret A buffer holding the auxiliary shared secret to use (see RFC 6189 section 4.3)
* @param[in] auxSecretLength lenght of the previous buffer
*
* @return 0 on success, error code otherwise
*/
BZRTP_EXPORT int bzrtp_setAuxiliarySharedSecret(bzrtpContext_t *zrtpContext, const uint8_t *auxSecret, size_t auxSecretLength);
/*** Cache related functions ***/
/**
* @brief Check the given sqlite3 DB and create requested tables if needed
......
......@@ -249,6 +249,11 @@ struct bzrtpContext_struct {
uint8_t cacheMismatchFlag; /**< Flag set in case of cache mismatch(detected in DHM mode when DH part packet arrives) */
uint8_t peerPVS; /**< used to store value of PVS flag sent by peer in the confirm packet on first channel only, then used to compute the PVS value sent to the application */
/* transient auxiliary shared secret : in addition to the auxiliary shared secret stored in ZID cache, caller can provide a shared secret to the zrtp context which will be used for this transaction only */
/* both auxiliary secret are used and combined as transientAuxiliarySecret appended to cachedAuxiliarySecret*/
uint8_t *transientAuxSecret; /**< an auxiliary secret not stored in cache, provided after context creation and before the main channel is started */
size_t transientAuxSecretLength; /**< size of the previous buffer */
/* keys */
uint8_t *ZRTPSess; /**< ZRTP session key as described in rfc section 4.5.2 */
uint8_t ZRTPSessLength; /**< length of ZRTP session key depends on agreed hash algorithm */
......
......@@ -65,6 +65,7 @@ bzrtpContext_t *bzrtp_createBzrtpContext(void) {
context->isInitialised = 0; /* will be set by bzrtp_initBzrtpContext */
/* set to NULL all callbacks pointer */
context->zrtpCallbacks.bzrtp_statusMessage = NULL;
context->zrtpCallbacks.bzrtp_sendData = NULL;
context->zrtpCallbacks.bzrtp_srtpSecretsAvailable = NULL;
context->zrtpCallbacks.bzrtp_startSrtpSession = NULL;
......@@ -100,6 +101,10 @@ bzrtpContext_t *bzrtp_createBzrtpContext(void) {
context->cacheMismatchFlag = 0;
context->peerPVS = 0;
/* initialise transient shared auxiliary secret buffer */
context->transientAuxSecret = NULL;
context->transientAuxSecretLength = 0;
/* initialise key buffers */
context->ZRTPSess = NULL;
context->ZRTPSessLength = 0;
......@@ -247,6 +252,13 @@ int bzrtp_destroyBzrtpContext(bzrtpContext_t *context, uint32_t selfSSRC) {
free(context->selfURI);
free(context->peerURI);
/* transient shared auxiliary secret */
if (context->transientAuxSecret != NULL) {
bzrtp_DestroyKey(context->transientAuxSecret, context->transientAuxSecretLength, context->RNGContext);
free(context->transientAuxSecret);
context->transientAuxSecret=NULL;
}
/* destroy the RNG context at the end because it may be needed to destroy some keys */
bctbx_rng_context_free(context->RNGContext);
context->RNGContext = NULL;
......@@ -908,6 +920,38 @@ int bzrtp_getSelfHelloHash(bzrtpContext_t *zrtpContext, uint32_t selfSSRC, uint8
return 0;
}
/**
* @brief Set Auxiliary Secret for this channel(shall be used only on primary audio channel)
* The given auxSecret is appended to any aux secret found in ZIDcache
* This function must be called before reception of peerHello packet
*
* @param[in] zrtpContext The ZRTP context we're dealing with
* @param[in] auxSecret A buffer holding the auxiliary shared secret to use (see RFC 6189 section 4.3)
* @param[in] auxSecretLength lenght of the previous buffer
*
* @return 0 on success, error code otherwise
*/
BZRTP_EXPORT int bzrtp_setAuxiliarySharedSecret(bzrtpContext_t *zrtpContext, const uint8_t *auxSecret, size_t auxSecretLength) {
if (zrtpContext == NULL) {
return BZRTP_ERROR_INVALIDCONTEXT;
}
if (zrtpContext->channelContext[0] && zrtpContext->channelContext[0]->peerPackets[HELLO_MESSAGE_STORE_ID] != NULL) {
return BZRTP_ERROR_CONTEXTNOTREADY;
}
/* allocate memory to store the secret - check it wasn't already allocated */
if (zrtpContext->transientAuxSecret) {
free(zrtpContext->transientAuxSecret);
}
zrtpContext->transientAuxSecret = (uint8_t *)malloc(auxSecretLength*sizeof(uint8_t));
/* copy the aux secret and length */
memcpy(zrtpContext->transientAuxSecret, auxSecret, auxSecretLength);
zrtpContext->transientAuxSecretLength = auxSecretLength;
return 0;
}
/**
* @brief Get the channel status
......@@ -1061,6 +1105,7 @@ static int bzrtp_initChannelContext(bzrtpContext_t *zrtpContext, bzrtpChannelCon
zrtpChannelContext->srtpSecrets.keyAgreementAlgo = ZRTP_UNSET_ALGO;
zrtpChannelContext->srtpSecrets.sasAlgo = ZRTP_UNSET_ALGO;
zrtpChannelContext->srtpSecrets.cacheMismatch = 0;
zrtpChannelContext->srtpSecrets.auxSecretMismatch = 1; /* default is mismatch, explicitely set it to zero if we have a match */
/* create the Hello packet and store it */
helloPacket = bzrtp_createZrtpPacket(zrtpContext, zrtpChannelContext, MSGTYPE_HELLO, &retval);
......
......@@ -530,13 +530,17 @@ int state_keyAgreement_sendingCommit(bzrtpEvent_t event) {
}
}
/* if we have an aux secret check it match peer's one */
if (zrtpContext->cachedSecret.auxsecret!=NULL) {
if (memcmp(zrtpChannelContext->responderAuxsecretID, dhPart1Message->auxsecretID,8) != 0) {
if (memcmp(zrtpChannelContext->responderAuxsecretID, dhPart1Message->auxsecretID,8) != 0) { // they do not match, delete the aux secret as we must not use it
free(zrtpContext->cachedSecret.auxsecret);
zrtpContext->cachedSecret.auxsecret= NULL;
zrtpContext->cachedSecret.auxsecretLength = 0;
} else { // they do match, set the flag to 0 (its default is 1)
zrtpChannelContext->srtpSecrets.auxSecretMismatch=0;
}
}
if (zrtpContext->cachedSecret.pbxsecret!=NULL) {
if (memcmp(zrtpContext->responderCachedSecretHash.pbxsecretID, dhPart1Message->pbxsecretID,8) != 0) {
free(zrtpContext->cachedSecret.pbxsecret);
......@@ -830,22 +834,22 @@ int state_keyAgreement_responderSendingDHPart1(bzrtpEvent_t event) {
}
}
/* if we have an auxiliary secret, check it match peer's one */
if (zrtpContext->cachedSecret.auxsecret!=NULL) {
if (memcmp(zrtpChannelContext->initiatorAuxsecretID, dhPart2Message->auxsecretID,8) != 0) {
if (memcmp(zrtpChannelContext->initiatorAuxsecretID, dhPart2Message->auxsecretID,8) != 0) { // they do not match, delete the aux secret as we must not use it
free(zrtpContext->cachedSecret.auxsecret);
zrtpContext->cachedSecret.auxsecret= NULL;
zrtpContext->cachedSecret.auxsecretLength = 0;
/*bzrtp_freeZrtpPacket(zrtpPacket);
return BZRTP_ERROR_CACHEMISMATCH;*/
} else { // they do match, set the flag to 0 (its default is 1)
zrtpChannelContext->srtpSecrets.auxSecretMismatch=0;
}
}
if (zrtpContext->cachedSecret.pbxsecret!=NULL) {
if (memcmp(zrtpContext->initiatorCachedSecretHash.pbxsecretID, dhPart2Message->pbxsecretID,8) != 0) {
free(zrtpContext->cachedSecret.pbxsecret);
zrtpContext->cachedSecret.pbxsecret= NULL;
zrtpContext->cachedSecret.pbxsecretLength = 0;
/*bzrtp_freeZrtpPacket(zrtpPacket);
return BZRTP_ERROR_CACHEMISMATCH;*/
}
}
......@@ -1744,6 +1748,13 @@ int bzrtp_responseToHelloMessage(bzrtpContext_t *zrtpContext, bzrtpChannelContex
bctbx_rng_get(zrtpContext->RNGContext, zrtpContext->responderCachedSecretHash.pbxsecretID, 8);
}
/* if we have any transient auxiliary secret, append it to the one found in cache */
if (zrtpContext->transientAuxSecret!=NULL) {
zrtpContext->cachedSecret.auxsecret = (uint8_t *)realloc(zrtpContext->cachedSecret.auxsecret, zrtpContext->cachedSecret.auxsecretLength + zrtpContext->transientAuxSecretLength);
memcpy(zrtpContext->cachedSecret.auxsecret + zrtpContext->cachedSecret.auxsecretLength, zrtpContext->transientAuxSecret, zrtpContext->transientAuxSecretLength);
zrtpContext->cachedSecret.auxsecretLength += zrtpContext->transientAuxSecretLength;
}
if (zrtpContext->cachedSecret.auxsecret!=NULL) {
zrtpChannelContext->hmacFunction(zrtpContext->cachedSecret.auxsecret, zrtpContext->cachedSecret.auxsecretLength, zrtpChannelContext->selfH[3], 32, 8, zrtpChannelContext->initiatorAuxsecretID);
zrtpChannelContext->hmacFunction(zrtpContext->cachedSecret.auxsecret, zrtpContext->cachedSecret.auxsecretLength, zrtpChannelContext->peerH[3], 32, 8, zrtpChannelContext->responderAuxsecretID);
......
......@@ -139,6 +139,7 @@ static int sendData(void *clientData, const uint8_t *packetString, uint16_t pack
}
//bzrtp_message("%d Keep %.8s from %s - LC %d\n", msSTC, packetString+16, (clientContext->id==ALICE?"Alice":"Bob"), totalPacketLost);
}
//bzrtp_message("%ld %.8s from %s\n", msSTC, packetString+16, (clientContext->id==ALICE?"Alice":"Bob"));
/* put the message in the message correct queue */
if (clientContext->id == ALICE) { /* message sent by Alice, so put it in Bob's queue */
......@@ -249,11 +250,6 @@ static int setUpClientContext(clientContext_t *clientContext, uint8_t clientID,
return -4;
}
/* start the ZRTP engine(it will send a hello packet )*/
if ((retval = bzrtp_startChannelEngine(clientContext->bzrtpContext, SSRC))!=0) {
bzrtp_message("ERROR: bzrtp_startChannelEngine returned %0x, client id is %d SSRC is %d\n", retval, clientID, SSRC);
return -5;
}
return 0;
}
......@@ -369,6 +365,16 @@ uint32_t multichannel_exchange_pvs_params(cryptoParams_t *aliceCryptoParams, cry
return retval;
}
/* start the ZRTP engine(it will send a hello packet )*/
if ((retval = bzrtp_startChannelEngine(Alice.bzrtpContext, aliceSSRC))!=0) {
bzrtp_message("ERROR: bzrtp_startChannelEngine returned %0x, client id is %d SSRC is %d\n", retval, ALICE, aliceSSRC);
return retval;
}
if ((retval = bzrtp_startChannelEngine(Bob.bzrtpContext, bobSSRC))!=0) {
bzrtp_message("ERROR: bzrtp_startChannelEngine returned %0x, client id is %d SSRC is %d\n", retval, BOB, bobSSRC);
return retval;
}
initialTime = getSimulatedTime();
while ((bzrtp_getChannelStatus(Alice.bzrtpContext, aliceSSRC)!= BZRTP_CHANNEL_SECURE || bzrtp_getChannelStatus(Bob.bzrtpContext, bobSSRC)!= BZRTP_CHANNEL_SECURE) && (getSimulatedTime()-initialTime<timeOutLimit)){
int i;
......@@ -646,7 +652,6 @@ static void test_cacheless_exchange(void) {
/* with ECDH agreement types if available */
if (bctbx_key_agreement_algo_list()&BCTBX_ECDH_X25519) {
printf("Oh yeah\n");
pattern = &ecdh_patterns[0]; /* pattern is a pointer to current pattern */
while (pattern->cipherNb!=0) {
BC_ASSERT_EQUAL(multichannel_exchange(pattern, pattern, pattern, NULL, NULL, NULL, NULL), 0, int, "%x");
......@@ -771,6 +776,8 @@ static void test_cache_mismatch_exchange(void) {
size_t colLengthBob[3];
int i;
resetGlobalParams();
/* create tempory DB files, just try to clean them from dir before, just in case */
remove("tmpZIDAlice_cacheMismtach.sqlite");
remove("tmpZIDBob_cacheMismatch.sqlite");
......@@ -883,6 +890,8 @@ static void test_cache_sas_not_confirmed(void) {
size_t colLengthBob[3];
int i;
resetGlobalParams();
/* create tempory DB files, just try to clean them from dir before, just in case */
remove("tmpZIDAlice_simpleCache.sqlite");
remove("tmpZIDBob_simpleCache.sqlite");
......@@ -971,12 +980,180 @@ static void test_cache_sas_not_confirmed(void) {
#endif /* ZIDCACHE_ENABLED */
}
static int test_auxiliary_secret_params(uint8_t *aliceAuxSecret, size_t aliceAuxSecretLength, uint8_t *bobAuxSecret, size_t bobAuxSecretLength, uint8_t expectedAuxSecretMismatch, uint8_t badTimingFlag) {
int retval;
clientContext_t Alice,Bob;
uint64_t initialTime=0;
uint64_t lastPacketSentTime=0;
uint32_t aliceSSRC = ALICE_SSRC_BASE;
uint32_t bobSSRC = BOB_SSRC_BASE;
uint8_t setAuxSecretFlag=0; // switch to 1 once we've set the aux secret
/*** Create the main channel */
if ((retval=setUpClientContext(&Alice, ALICE, aliceSSRC, NULL, NULL, NULL, NULL))!=0) {
bzrtp_message("ERROR: can't init setup client context id %d\n", ALICE);
BC_ASSERT_EQUAL(retval, 0, uint32_t, "0x%08x");
return -1;
}
if ((retval=setUpClientContext(&Bob, BOB, bobSSRC, NULL, NULL, NULL, NULL))!=0) {
bzrtp_message("ERROR: can't init setup client context id %d\n", BOB);
BC_ASSERT_EQUAL(retval, 0, uint32_t, "0x%08x");
return -1;
}
/*** Setup a transient auxiliary secret ***/
if (badTimingFlag==0) {
setAuxSecretFlag=1;
if (aliceAuxSecret != NULL) {
if ((retval = bzrtp_setAuxiliarySharedSecret(Alice.bzrtpContext, aliceAuxSecret, aliceAuxSecretLength))!=0) {
bzrtp_message("ERROR: can't set Auxiliary shared secret. id is %d\n", ALICE);
BC_ASSERT_EQUAL(retval, 0, uint32_t, "0x%08x");
return -1;
}
}
if (bobAuxSecret != NULL) {
if ((retval = bzrtp_setAuxiliarySharedSecret(Bob.bzrtpContext, bobAuxSecret, bobAuxSecretLength))!=0) {
bzrtp_message("ERROR: can't set Auxiliary shared secret. id is %d\n", BOB);
BC_ASSERT_EQUAL(retval, 0, uint32_t, "0x%08x");
return -1;
}
}
}
/* start the ZRTP engine(it will send a hello packet )*/
if ((retval = bzrtp_startChannelEngine(Alice.bzrtpContext, aliceSSRC))!=0) {
bzrtp_message("ERROR: bzrtp_startChannelEngine returned %0x, client id is %d SSRC is %d\n", retval, ALICE, aliceSSRC);
BC_ASSERT_EQUAL(retval, 0, uint32_t, "0x%08x");
return -1;
}
if ((retval = bzrtp_startChannelEngine(Bob.bzrtpContext, bobSSRC))!=0) {
bzrtp_message("ERROR: bzrtp_startChannelEngine returned %0x, client id is %d SSRC is %d\n", retval, BOB, bobSSRC);
BC_ASSERT_EQUAL(retval, 0, uint32_t, "0x%08x");
return -1;
}
initialTime = getSimulatedTime();
while ((bzrtp_getChannelStatus(Alice.bzrtpContext, aliceSSRC)!= BZRTP_CHANNEL_SECURE || bzrtp_getChannelStatus(Bob.bzrtpContext, bobSSRC)!= BZRTP_CHANNEL_SECURE) && (getSimulatedTime()-initialTime<timeOutLimit)){
int i;
/* check the message queue */
for (i=0; i<aliceQueueIndex; i++) {
retval = bzrtp_processMessage(Alice.bzrtpContext, aliceSSRC, aliceQueue[i].packetString, aliceQueue[i].packetLength);
//bzrtp_message("%ld Alice processed a %.8s and returns %x\n", msSTC, (aliceQueue[i].packetString)+16, retval);
memset(aliceQueue[i].packetString, 0, MAX_PACKET_LENGTH); /* destroy the packet after sending it to the ZRTP engine */
lastPacketSentTime=getSimulatedTime();
}
aliceQueueIndex = 0;
for (i=0; i<bobQueueIndex; i++) {
retval = bzrtp_processMessage(Bob.bzrtpContext, bobSSRC, bobQueue[i].packetString, bobQueue[i].packetLength);
//bzrtp_message("%ld Bob processed a %.8s and returns %x\n",msSTC, (bobQueue[i].packetString)+16, retval);
memset(bobQueue[i].packetString, 0, MAX_PACKET_LENGTH); /* destroy the packet after sending it to the ZRTP engine */
lastPacketSentTime=getSimulatedTime();
}
bobQueueIndex = 0;
/* send the actual time to the zrtpContext */
retval = bzrtp_iterate(Alice.bzrtpContext, aliceSSRC, getSimulatedTime());
retval = bzrtp_iterate(Bob.bzrtpContext, bobSSRC, getSimulatedTime());
/* sleep for 10 ms */
STC_sleep(10);
/* check if we shall try to reset re-emission timers */
if (getSimulatedTime()-lastPacketSentTime > 1250 ) { /*higher re-emission timeout is 1200ms */
retval = bzrtp_resetRetransmissionTimer(Alice.bzrtpContext, aliceSSRC);
retval +=bzrtp_resetRetransmissionTimer(Bob.bzrtpContext, bobSSRC);
lastPacketSentTime=getSimulatedTime();
}
if (badTimingFlag!=0 && setAuxSecretFlag < 2) { /* after the HelloPacket exchange has occurs, insert the auxSecret if we have the badTiming flag on */
setAuxSecretFlag ++;
if (setAuxSecretFlag == 2) { // first time we process a clock tick will be sending Hello Message, at the second one we will already have processed them and it will be too late
if (aliceAuxSecret != NULL) {
BC_ASSERT_NOT_EQUAL(bzrtp_setAuxiliarySharedSecret(Alice.bzrtpContext, aliceAuxSecret, aliceAuxSecretLength), 0, int, "%d"); // we expect this insert to be rejected
}
if (bobAuxSecret != NULL) {
BC_ASSERT_NOT_EQUAL(bzrtp_setAuxiliarySharedSecret(Bob.bzrtpContext, bobAuxSecret, bobAuxSecretLength), 0, int, "%d"); // we expect this insert to be rejected
}
}
}
}
if ((retval=bzrtp_getChannelStatus(Alice.bzrtpContext, aliceSSRC))!=BZRTP_CHANNEL_SECURE) {
bzrtp_message("Fail Alice on channel1 loss rate is %d", loosePacketPercentage);
BC_ASSERT_EQUAL(retval, BZRTP_CHANNEL_SECURE, int, "%0x");
return -1;
}
if ((retval=bzrtp_getChannelStatus(Bob.bzrtpContext, bobSSRC))!=BZRTP_CHANNEL_SECURE) {
bzrtp_message("Fail Bob on channel1 loss rate is %d", loosePacketPercentage);
BC_ASSERT_EQUAL(retval, BZRTP_CHANNEL_SECURE, int, "%0x");
return -1;
}
bzrtp_message("ZRTP algo used during negotiation: Cipher: %s - KeyAgreement: %s - Hash: %s - AuthTag: %s - Sas Rendering: %s\n", bzrtp_cipher_toString(Alice.secrets->cipherAlgo), bzrtp_keyAgreement_toString(Alice.secrets->keyAgreementAlgo), bzrtp_hash_toString(Alice.secrets->hashAlgo), bzrtp_authtag_toString(Alice.secrets->authTagAlgo), bzrtp_sas_toString(Alice.secrets->sasAlgo));
if ((retval=compareSecrets(Alice.secrets, Bob.secrets, TRUE))!=0) {
BC_ASSERT_EQUAL(retval, 0, int, "%d");
return -1;
}
// check aux secrets mismatch flag, they must be in sync
if (Alice.secrets->auxSecretMismatch != Bob.secrets->auxSecretMismatch) {
BC_FAIL("computed auxSecretMismatch flags differ from Alice to Bob");
return -1;
}
// Do we have a mismatch on aux secret
BC_ASSERT_EQUAL(Alice.secrets->auxSecretMismatch, expectedAuxSecretMismatch, uint8_t, "%d");
/*** Destroy Contexts ***/
while (bzrtp_destroyBzrtpContext(Alice.bzrtpContext, aliceSSRC)>0 && aliceSSRC>=ALICE_SSRC_BASE) {
aliceSSRC--;
}
while (bzrtp_destroyBzrtpContext(Bob.bzrtpContext, bobSSRC)>0 && bobSSRC>=BOB_SSRC_BASE) {
bobSSRC--;
}
return 0;
}
static void test_auxiliary_secret() {
uint8_t secret1[] = {0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0x00, 0xff};
uint8_t secret2[] = {0xfe, 0xed, 0xdc, 0xcb, 0xba, 0xa9, 0x98, 0x87, 0x76, 0x65, 0x54, 0x43};
resetGlobalParams();
// matching cases (expect mismatch flag to be 0)
BC_ASSERT_EQUAL(test_auxiliary_secret_params(secret1, sizeof(secret1), secret1, sizeof(secret1), 0, 0), 0, int, "%d");
BC_ASSERT_EQUAL(test_auxiliary_secret_params(secret2, sizeof(secret2), secret2, sizeof(secret2), 0, 0), 0, int, "%d");
// mismatching cases (expect mismatch flag to be 1)
// different secrets
BC_ASSERT_EQUAL(test_auxiliary_secret_params(secret1, sizeof(secret1), secret2, sizeof(secret2), 1, 0), 0, int, "%d");
// only one side has a secret
BC_ASSERT_EQUAL(test_auxiliary_secret_params(secret1, sizeof(secret1), NULL, 0, 1, 0), 0, int, "%d");
// no one has a secret
BC_ASSERT_EQUAL(test_auxiliary_secret_params(NULL, 0, NULL, 0, 1, 0), 0, int, "%d");
// same secret but one is one byte shorter
BC_ASSERT_EQUAL(test_auxiliary_secret_params(secret1, sizeof(secret1)-1, secret1, sizeof(secret1), 1, 0), 0, int, "%d");
// matching secret, but inserted to late(last param is a flag to do that)
BC_ASSERT_EQUAL(test_auxiliary_secret_params(secret1, sizeof(secret1), secret1, sizeof(secret1), 1, 1), 0, int, "%d");
};
static test_t key_exchange_tests[] = {
TEST_NO_TAG("Cacheless multi channel", test_cacheless_exchange),
TEST_NO_TAG("Cached Simple", test_cache_enabled_exchange),
TEST_NO_TAG("Cached mismatch", test_cache_mismatch_exchange),
TEST_NO_TAG("Loosy network", test_loosy_network),
TEST_NO_TAG("Cached PVS", test_cache_sas_not_confirmed)
TEST_NO_TAG("Cached PVS", test_cache_sas_not_confirmed),
TEST_NO_TAG("Auxiliary Secret", test_auxiliary_secret)
};
test_suite_t key_exchange_test_suite = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment