mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 21:24:43 +02:00
Fix for #ifdef issue causing some X509 functions to be unavailable when DH and ECC were disabled. Fix for HashAlgoToType
not being available if building with DH and ECC disabled and RSA PSS enabled.
This commit is contained in:
@@ -2699,7 +2699,8 @@ static INLINE void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType)
|
|||||||
}
|
}
|
||||||
#endif /* !NO_WOLFSSL_SERVER || !NO_CERTS */
|
#endif /* !NO_WOLFSSL_SERVER || !NO_CERTS */
|
||||||
|
|
||||||
#if !defined(NO_DH) || defined(HAVE_ECC)
|
#if !defined(NO_DH) || defined(HAVE_ECC) || \
|
||||||
|
(!defined(NO_RSA) && defined(WC_RSA_PSS))
|
||||||
|
|
||||||
static enum wc_HashType HashAlgoToType(int hashAlgo)
|
static enum wc_HashType HashAlgoToType(int hashAlgo)
|
||||||
{
|
{
|
||||||
@@ -2729,9 +2730,11 @@ static enum wc_HashType HashAlgoToType(int hashAlgo)
|
|||||||
return WC_HASH_TYPE_NONE;
|
return WC_HASH_TYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_CERTS
|
#endif /* !NO_DH || HAVE_ECC || (!NO_RSA && WC_RSA_PSS) */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_CERTS
|
||||||
|
|
||||||
void InitX509Name(WOLFSSL_X509_NAME* name, int dynamicFlag)
|
void InitX509Name(WOLFSSL_X509_NAME* name, int dynamicFlag)
|
||||||
{
|
{
|
||||||
(void)dynamicFlag;
|
(void)dynamicFlag;
|
||||||
@@ -2840,10 +2843,8 @@ void FreeX509(WOLFSSL_X509* x509)
|
|||||||
if (x509->altNames)
|
if (x509->altNames)
|
||||||
FreeAltNames(x509->altNames, x509->heap);
|
FreeAltNames(x509->altNames, x509->heap);
|
||||||
}
|
}
|
||||||
#endif /* !NO_CERTS */
|
|
||||||
#endif /* !NO_DH || HAVE_ECC */
|
|
||||||
|
|
||||||
#ifndef NO_CERTS
|
|
||||||
/* Encode the signature algorithm into buffer.
|
/* Encode the signature algorithm into buffer.
|
||||||
*
|
*
|
||||||
* hashalgo The hash algorithm.
|
* hashalgo The hash algorithm.
|
||||||
|
Reference in New Issue
Block a user