Allow non-FIPS MD5 to be used with TLS PRF even in FIPS mode
This is allowed per FIPS1402IG.pdf since the TLS PRF depends fully on both MD5 and SHA-1.
This commit is contained in:
parent
be299ca4ce
commit
ff916b9df7
6 changed files with 163 additions and 8 deletions
|
@ -78,16 +78,19 @@ int tls_prf(const u8 *secret, size_t secret_len, const char *label,
|
|||
S2--;
|
||||
}
|
||||
|
||||
hmac_md5_vector(S1, L_S1, 2, &MD5_addr[1], &MD5_len[1], A_MD5);
|
||||
hmac_md5_vector_non_fips_allow(S1, L_S1, 2, &MD5_addr[1], &MD5_len[1],
|
||||
A_MD5);
|
||||
hmac_sha1_vector(S2, L_S2, 2, &SHA1_addr[1], &SHA1_len[1], A_SHA1);
|
||||
|
||||
MD5_pos = MD5_MAC_LEN;
|
||||
SHA1_pos = SHA1_MAC_LEN;
|
||||
for (i = 0; i < outlen; i++) {
|
||||
if (MD5_pos == MD5_MAC_LEN) {
|
||||
hmac_md5_vector(S1, L_S1, 3, MD5_addr, MD5_len, P_MD5);
|
||||
hmac_md5_vector_non_fips_allow(S1, L_S1, 3, MD5_addr,
|
||||
MD5_len, P_MD5);
|
||||
MD5_pos = 0;
|
||||
hmac_md5(S1, L_S1, A_MD5, MD5_MAC_LEN, A_MD5);
|
||||
hmac_md5_non_fips_allow(S1, L_S1, A_MD5, MD5_MAC_LEN,
|
||||
A_MD5);
|
||||
}
|
||||
if (SHA1_pos == SHA1_MAC_LEN) {
|
||||
hmac_sha1_vector(S2, L_S2, 3, SHA1_addr, SHA1_len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue