Skip to content

Commit

Permalink
Removed assert which was breaking when bad input was sent
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdelisle committed Dec 29, 2011
1 parent ec1e318 commit 1d2b54b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crypto/CryptoAuth.c
Expand Up @@ -483,6 +483,9 @@ static uint8_t encryptHandshake(struct Message* message, struct Wrapper* wrapper
" cipher: %s\n",
nonceHex, sharedSecretHex, cipherHex);
#endif
#ifdef Log_DEBUG
assert(!isZero(header->handshake.encryptedTempKey, 32));
#endif

// Shift it back -- encryptRndNonce adds 16 bytes of authenticator.
Message_shift(message, Headers_CryptoAuth_SIZE - 32 - 16);
Expand Down Expand Up @@ -711,9 +714,6 @@ static uint8_t decryptHandshake(struct Wrapper* wrapper,
// Shift it on top of the authenticator before the encrypted public key
Message_shift(message, 48 - Headers_CryptoAuth_SIZE);

#ifdef Log_DEBUG
assert(!isZero(header->handshake.encryptedTempKey, 32));
#endif
Log_debug1(wrapper->context->logger, "Message length: %u\n", message->length);
#ifdef Log_KEYS
uint8_t sharedSecretHex[65];
Expand Down

0 comments on commit 1d2b54b

Please sign in to comment.