Commit d71aa75f authored by johan's avatar johan

Add support for SHA384

parent 52a5f697
...@@ -45,7 +45,8 @@ uint8_t bzrtpUtils_getAvailableCryptoTypes(uint8_t algoType, uint8_t availableTy ...@@ -45,7 +45,8 @@ uint8_t bzrtpUtils_getAvailableCryptoTypes(uint8_t algoType, uint8_t availableTy
switch(algoType) { switch(algoType) {
case ZRTP_HASH_TYPE: case ZRTP_HASH_TYPE:
availableTypes[0] = ZRTP_HASH_S256; availableTypes[0] = ZRTP_HASH_S256;
return 1; availableTypes[1] = ZRTP_HASH_S384;
return 2;
case ZRTP_CIPHERBLOCK_TYPE: case ZRTP_CIPHERBLOCK_TYPE:
availableTypes[0] = ZRTP_CIPHER_AES1; availableTypes[0] = ZRTP_CIPHER_AES1;
availableTypes[1] = ZRTP_CIPHER_AES3; availableTypes[1] = ZRTP_CIPHER_AES3;
...@@ -462,6 +463,11 @@ int bzrtp_updateCryptoFunctionPointers(bzrtpChannelContext_t *zrtpChannelContext ...@@ -462,6 +463,11 @@ int bzrtp_updateCryptoFunctionPointers(bzrtpChannelContext_t *zrtpChannelContext
zrtpChannelContext->hmacFunction = bctbx_hmacSha256; zrtpChannelContext->hmacFunction = bctbx_hmacSha256;
zrtpChannelContext->hashLength = 32; zrtpChannelContext->hashLength = 32;
break; break;
case ZRTP_HASH_S384 :
zrtpChannelContext->hashFunction = bctbx_sha384;
zrtpChannelContext->hmacFunction = bctbx_hmacSha384;
zrtpChannelContext->hashLength = 48;
break;
case ZRTP_UNSET_ALGO : case ZRTP_UNSET_ALGO :
zrtpChannelContext->hashFunction = NULL; zrtpChannelContext->hashFunction = NULL;
zrtpChannelContext->hmacFunction = NULL; zrtpChannelContext->hmacFunction = NULL;
......
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