From cf3ba3f0e84fd402893cc868ede80830bb763182 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Mon, 5 Jan 2015 11:06:04 -0700 Subject: [PATCH] disable-asn, disable-rsa, enable-psk fixed --- src/internal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 47bc01edc..f33b8a703 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1499,7 +1499,9 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx) int ret; byte haveRSA = 0; byte havePSK = 0; +#ifdef HAVE_ANON byte haveAnon = 0; +#endif ssl->ctx = ctx; /* only for passing to calls, options could change */ ssl->version = ctx->method->version; @@ -1886,7 +1888,11 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx) #endif #ifndef NO_CERTS /* make sure server has cert and key unless using PSK or Anon */ - if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK && !haveAnon) + if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK +#ifdef HAVE_ANON +&& !haveAnon +#endif +) if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) { WOLFSSL_MSG("Server missing certificate and/or private key"); return NO_PRIVATE_KEY;