Merge pull request #3797 from tmael/builderr

Correct a build error with a non-standard configurations
This commit is contained in:
David Garske
2021-02-22 16:33:01 -08:00
committed by GitHub
3 changed files with 14 additions and 5 deletions

View File

@ -384,6 +384,7 @@ static int SetASNNull(byte* output)
return 2; return 2;
} }
#ifndef NO_CERTS
/* Get the DER/BER encoding of an ASN.1 BOOLEAN. /* Get the DER/BER encoding of an ASN.1 BOOLEAN.
* *
* input Buffer holding DER/BER encoded data. * input Buffer holding DER/BER encoded data.
@ -413,7 +414,7 @@ static int GetBoolean(const byte* input, word32* inOutIdx, word32 maxIdx)
*inOutIdx = idx; *inOutIdx = idx;
return b; return b;
} }
#endif /* !NO_CERTS*/
#ifdef ASN1_SET_BOOLEAN #ifdef ASN1_SET_BOOLEAN
/* Set the DER/BER encoding of the ASN.1 NULL element. /* Set the DER/BER encoding of the ASN.1 NULL element.
* Note: Function not required as yet. * Note: Function not required as yet.
@ -497,6 +498,7 @@ static int GetASNInt(const byte* input, word32* inOutIdx, int* len,
return 0; return 0;
} }
#ifndef NO_CERTS
/* Get the DER/BER encoding of an ASN.1 INTEGER that has a value of no more than /* Get the DER/BER encoding of an ASN.1 INTEGER that has a value of no more than
* 7 bits. * 7 bits.
* *
@ -526,7 +528,7 @@ static int GetInteger7Bit(const byte* input, word32* inOutIdx, word32 maxIdx)
*inOutIdx = idx; *inOutIdx = idx;
return b; return b;
} }
#endif /* !NO_CERTS */
#if !defined(NO_DSA) && !defined(NO_SHA) #if !defined(NO_DSA) && !defined(NO_SHA)
static const char sigSha1wDsaName[] = "SHAwDSA"; static const char sigSha1wDsaName[] = "SHAwDSA";
@ -6792,6 +6794,7 @@ int DecodeToKey(DecodedCert* cert, int verify)
return ret; return ret;
} }
#ifndef NO_CERTS
static int GetSignature(DecodedCert* cert) static int GetSignature(DecodedCert* cert)
{ {
int length; int length;
@ -6811,6 +6814,7 @@ static int GetSignature(DecodedCert* cert)
return 0; return 0;
} }
#endif
static word32 SetOctetString8Bit(word32 len, byte* output) static word32 SetOctetString8Bit(word32 len, byte* output)
{ {

View File

@ -2996,8 +2996,8 @@ int sp_cmp_d(sp_int* a, sp_int_digit d)
#endif #endif
#if defined(WOLFSSL_SP_INT_NEGATIVE) || !defined(NO_PWDBASED) || \ #if defined(WOLFSSL_SP_INT_NEGATIVE) || !defined(NO_PWDBASED) || \
defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) || (!defined(NO_RSA) && \ defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) || defined(HAVE_ECC) || \
!defined(WOLFSSL_RSA_VERIFY_ONLY)) (!defined(NO_RSA) && !defined(WOLFSSL_RSA_VERIFY_ONLY))
/* Add a one digit number to the multi-precision number. /* Add a one digit number to the multi-precision number.
* *
* @param [in] a SP integer be added to. * @param [in] a SP integer be added to.

View File

@ -11821,9 +11821,11 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
static const char* certEccRsaPemFile = CERT_WRITE_TEMP_DIR "certeccrsa.pem"; static const char* certEccRsaPemFile = CERT_WRITE_TEMP_DIR "certeccrsa.pem";
static const char* certEccRsaDerFile = CERT_WRITE_TEMP_DIR "certeccrsa.der"; static const char* certEccRsaDerFile = CERT_WRITE_TEMP_DIR "certeccrsa.der";
#endif #endif
#if defined(HAVE_ECC_KEY_EXPORT)
static const char* eccCaKeyPemFile = CERT_WRITE_TEMP_DIR "ecc-key.pem"; static const char* eccCaKeyPemFile = CERT_WRITE_TEMP_DIR "ecc-key.pem";
static const char* eccPubKeyDerFile = CERT_WRITE_TEMP_DIR "ecc-public-key.der"; static const char* eccPubKeyDerFile = CERT_WRITE_TEMP_DIR "ecc-public-key.der";
static const char* eccCaKeyTempFile = CERT_WRITE_TEMP_DIR "ecc-key.der"; static const char* eccCaKeyTempFile = CERT_WRITE_TEMP_DIR "ecc-key.der";
#endif
#ifdef HAVE_PKCS8 #ifdef HAVE_PKCS8
static const char* eccPkcs8KeyDerFile = CERT_WRITE_TEMP_DIR "ecc-key-pkcs8.der"; static const char* eccPkcs8KeyDerFile = CERT_WRITE_TEMP_DIR "ecc-key-pkcs8.der";
#endif #endif
@ -20648,7 +20650,10 @@ static int ecc_test_make_pub(WC_RNG* rng)
byte tmp[ECC_BUFSIZE]; byte tmp[ECC_BUFSIZE];
#endif #endif
const byte* msg = (const byte*)"test wolfSSL ECC public gen"; const byte* msg = (const byte*)"test wolfSSL ECC public gen";
word32 x, tmpSz; #if defined(HAVE_ECC_KEY_EXPORT)
word32 x;
#endif
word32 tmpSz;
int ret = 0; int ret = 0;
ecc_point* pubPoint = NULL; ecc_point* pubPoint = NULL;
#ifdef HAVE_ECC_VERIFY #ifdef HAVE_ECC_VERIFY