diff --git a/cyassl/internal.h b/cyassl/internal.h index bcd8882cc..7d4682fcc 100644 --- a/cyassl/internal.h +++ b/cyassl/internal.h @@ -1913,7 +1913,9 @@ CYASSL_LOCAL word32 LowResTimer(void); CYASSL_LOCAL void InitX509(CYASSL_X509*, int); CYASSL_LOCAL void FreeX509(CYASSL_X509*); -CYASSL_LOCAL int CopyDecodedToX509(CYASSL_X509*, DecodedCert*); +#ifndef NO_CERTS + CYASSL_LOCAL int CopyDecodedToX509(CYASSL_X509*, DecodedCert*); +#endif #ifdef __cplusplus diff --git a/src/internal.c b/src/internal.c index 1dc097dff..4b69b06c6 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1182,6 +1182,8 @@ void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK, } +#ifndef NO_CERTS + /* Initialize CyaSSL X509 type */ void InitX509(CYASSL_X509* x509, int dynamicFlag) { @@ -1205,6 +1207,8 @@ void FreeX509(CYASSL_X509* x509) XFREE(x509, NULL, DYNAMIC_TYPE_X509); } +#endif /* NO_CERTS */ + /* init everything to 0, NULL, default values before calling anything that may fail so that desctructor has a "good" state to cleanup */