Use internal FIPS 186-2 PRF if needed
Previously, EAP-SIM/AKA/AKA' did not work with number of crypto libraries (GnuTLS, CryptoAPI, NSS) since the required FIPS 186-2 PRF function was not implemented. This resulted in somewhat confusing error messages since the placeholder functions were silently returning an error. Fix this by using the internal implementation of FIP 186-2 PRF (including internal SHA-1 implementation) with crypto libraries that do not implement this in case EAP-SIM/AKA/AKA' is included in the build. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
9b3e2ad3a7
commit
09eef142ea
9 changed files with 23 additions and 68 deletions
|
@ -19,6 +19,7 @@ typedef struct SHA1Context SHA1_CTX;
|
|||
void SHA1Transform(u32 state[5], const unsigned char buffer[64]);
|
||||
|
||||
|
||||
#ifdef CONFIG_CRYPTO_INTERNAL
|
||||
/**
|
||||
* sha1_vector - SHA-1 hash for data vector
|
||||
* @num_elem: Number of elements in the data vector
|
||||
|
@ -38,6 +39,7 @@ int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
|||
SHA1Final(mac, &ctx);
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_CRYPTO_INTERNAL */
|
||||
|
||||
|
||||
/* ===== start - public domain SHA1 implementation ===== */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue