TLS 1.3: Client with no certificate an error with define

WOLFSSL_NO_CLIENT_CERT_ERROR
pull/3149/head
Sean Parkinson 2020-07-20 09:12:43 +10:00
parent 7883156f49
commit 76a35f2a77
3 changed files with 10 additions and 0 deletions

View File

@ -18404,6 +18404,9 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)
case DTLS_SIZE_ERROR:
return "DTLS trying to send too much in single datagram error";
case NO_CERT_ERROR:
return "TLS1.3 No Certificate Set Error";
default :
return "unknown error number";
}

View File

@ -3202,7 +3202,13 @@ static int DoTls13CertificateRequest(WOLFSSL* ssl, const byte* input,
ssl->options.sendVerify = SEND_CERT;
}
else {
#ifndef WOLFSSL_NO_CLIENT_CERT_ERROR
ssl->options.sendVerify = SEND_BLANK_CERT;
#else
WOLFSSL_MSG("Certificate required but none set on client");
SendAlert(ssl, alert_fatal, illegal_parameter);
return NO_CERT_ERROR;
#endif
}
/* This message is always encrypted so add encryption padding. */

View File

@ -168,6 +168,7 @@ enum wolfSSL_ErrorCodes {
SSL_SHUTDOWN_ALREADY_DONE_E = -437, /* Shutdown called redundantly */
TLS13_SECRET_CB_E = -438, /* TLS1.3 secret Cb fcn failure */
DTLS_SIZE_ERROR = -439, /* Trying to send too much data */
NO_CERT_ERROR = -440, /* TLS1.3 - no cert set error */
/* add strings to wolfSSL_ERR_reason_error_string in internal.c !!!!! */