diff --git a/src/internal.c b/src/internal.c index 9e5598986..54b3ae637 100644 --- a/src/internal.c +++ b/src/internal.c @@ -3020,7 +3020,7 @@ void FreeX509(WOLFSSL_X509* x509) #if !defined(NO_WOLFSSL_SERVER) || !defined(NO_WOLFSSL_CLIENT) -#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_NO_CLIENT_AUTH) +#if !defined(WOLFSSL_NO_TLS12) /* Encode the signature algorithm into buffer. * * hashalgo The hash algorithm. @@ -3061,7 +3061,9 @@ static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output) (void)hashAlgo; (void)output; } +#endif +#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_NO_CLIENT_AUTH) static void SetDigest(WOLFSSL* ssl, int hashAlgo) { switch (hashAlgo) { @@ -8677,6 +8679,7 @@ int InitSigPkCb(WOLFSSL* ssl, SignatureCtx* sigCtx) #endif /* HAVE_PK_CALLBACKS */ +#if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH) typedef struct ProcPeerCertArgs { buffer* certs; #ifdef WOLFSSL_TLS13 @@ -10130,8 +10133,10 @@ exit_ppc: return ret; } +#endif #ifndef WOLFSSL_NO_TLS12 +#if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH) /* handle processing of certificate (11) */ static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx, @@ -10311,6 +10316,8 @@ static int DoCertificateStatus(WOLFSSL* ssl, byte* input, word32* inOutIdx, return ret; } +#endif + #endif /* !WOLFSSL_NO_TLS12 */ #endif /* !NO_CERTS */ @@ -10921,7 +10928,8 @@ static int DoHandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx, #endif /* HAVE_SESSION_TICKET */ #endif -#ifndef NO_CERTS +#if !defined(NO_CERTS) && (!defined(NO_WOLFSSL_CLIENT) || \ + !defined(WOLFSSL_NO_CLIENT_AUTH)) case certificate: WOLFSSL_MSG("processing certificate"); ret = DoCertificate(ssl, input, inOutIdx, size); @@ -17014,8 +17022,7 @@ void PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, #endif /* WOLFSSL_CALLBACKS */ -#if !defined(NO_CERTS) && (defined(WOLFSSL_TLS13) || \ - !defined(NO_WOLFSSL_CLIENT)) +#if !defined(NO_CERTS) /* Decode the private key - RSA, ECC, or Ed25519 - and creates a key object. * The signature type is set as well.