disable-asn, disable-rsa, enable-psk fixed
This commit is contained in:
parent
e09d14f6f8
commit
cf3ba3f0e8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user