зеркало из https://github.com/mozilla/gecko-dev.git
Correct HMAC code to work with new larger SHAxxx hashes.
This commit is contained in:
Родитель
dd4c5651b8
Коммит
5556b4b77f
|
@ -62,7 +62,7 @@ HMAC_Create(const SECHashObject *hash_obj, const unsigned char *secret,
|
|||
{
|
||||
HMACContext *cx;
|
||||
unsigned int i;
|
||||
unsigned char hashed_secret[SHA1_LENGTH];
|
||||
unsigned char hashed_secret[HASH_LENGTH_MAX];
|
||||
|
||||
/* required by FIPS 198 Section 3 */
|
||||
if (isFIPS && secret_len < hash_obj->length/2) {
|
||||
|
|
|
@ -43,8 +43,7 @@ extern void
|
|||
HMAC_Destroy(HMACContext *cx);
|
||||
|
||||
/* create HMAC context
|
||||
* hash_alg the algorithm with which the HMAC is performed. This
|
||||
* should be, SEC_OID_MD5, SEC_OID_SHA1, or SEC_OID_MD2.
|
||||
* hashObj hash object from SECRawHashObjects[]
|
||||
* secret the secret with which the HMAC is performed.
|
||||
* secret_len the length of the secret.
|
||||
* isFIPS true if conforming to FIPS 198.
|
||||
|
|
Загрузка…
Ссылка в новой задаче