Skip to content

Commit

Permalink
Bug 1182667 - Declare at the top of the block, r=wtc
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 95de393ce627a22a8b88b0986f14ee46241011f8
  • Loading branch information
martinthomson committed Aug 25, 2015
1 parent 2268353 commit 962ddc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/softoken/pkcs11c.c
Expand Up @@ -6192,13 +6192,15 @@ CK_RV NSC_DeriveKey( CK_SESSION_HANDLE hSession,
status = TLS_PRF(&pms, "extended master secret",
&seed, &master, isFIPS);
} else {
const SECHashObject *hashObj;

tlsPrfHash = GetHashTypeFromMechanism(ems_params->prfHashMechanism);
if (tlsPrfHash == HASH_AlgNULL) {
crv = CKR_MECHANISM_PARAM_INVALID;
break;
}

const SECHashObject *hashObj = HASH_GetRawHashObject(tlsPrfHash);
hashObj = HASH_GetRawHashObject(tlsPrfHash);
if (seed.len != hashObj->length) {
crv = CKR_TEMPLATE_INCONSISTENT;
break;
Expand Down

0 comments on commit 962ddc0

Please sign in to comment.