forked from wolfSSL/wolfssl
no priv or pub in dhKey struct in FIPS
This commit is contained in:
@ -4411,7 +4411,10 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
|||||||
return ASN_PARSE_E;
|
return ASN_PARSE_E;
|
||||||
|
|
||||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||||
|
#if !defined(HAVE_FIPS) || \
|
||||||
|
( defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2) )
|
||||||
temp = *inOutIdx;
|
temp = *inOutIdx;
|
||||||
|
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Assume input started after 1.2.840.113549.1.3.1 dhKeyAgreement */
|
/* Assume input started after 1.2.840.113549.1.3.1 dhKeyAgreement */
|
||||||
@ -4421,6 +4424,8 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||||
|
#if !defined(HAVE_FIPS) || \
|
||||||
|
( defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2) )
|
||||||
/* If ASN_DH_KEY_E: Check if input started at beginning of key */
|
/* If ASN_DH_KEY_E: Check if input started at beginning of key */
|
||||||
if (ret == ASN_DH_KEY_E) {
|
if (ret == ASN_DH_KEY_E) {
|
||||||
/* rewind back to after the first sequence */
|
/* rewind back to after the first sequence */
|
||||||
@ -4465,6 +4470,7 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
|
||||||
#endif /* WOLFSSL_QT || OPENSSL_ALL */
|
#endif /* WOLFSSL_QT || OPENSSL_ALL */
|
||||||
|
|
||||||
WOLFSSL_MSG("wc_DhKeyDecode Success");
|
WOLFSSL_MSG("wc_DhKeyDecode Success");
|
||||||
|
Reference in New Issue
Block a user