wrap up no certificate alert related code in OPENSSL_EXTRA directive.

This commit is contained in:
Go Hosohara
2017-08-01 11:13:02 +09:00
committed by Jacob Barthelmeh
parent f690a980bf
commit e8d628f61b

View File

@@ -13208,17 +13208,21 @@ int SendCertificate(WOLFSSL* ssl)
return 0; /* not needed */ return 0; /* not needed */
if (ssl->options.sendVerify == SEND_BLANK_CERT) { if (ssl->options.sendVerify == SEND_BLANK_CERT) {
#ifdef OPENSSL_EXTRA
if (ssl->version.major == SSLv3_MAJOR if (ssl->version.major == SSLv3_MAJOR
&& ssl->version.minor == SSLv3_MINOR){ && ssl->version.minor == SSLv3_MINOR){
SendAlert(ssl, alert_warning, no_certificate); SendAlert(ssl, alert_warning, no_certificate);
return 0; return 0;
} else { } else {
#endif
certSz = 0; certSz = 0;
certChainSz = 0; certChainSz = 0;
headerSz = CERT_HEADER_SZ; headerSz = CERT_HEADER_SZ;
length = CERT_HEADER_SZ; length = CERT_HEADER_SZ;
listSz = 0; listSz = 0;
#ifdef OPENSSL_EXTRA
} }
#endif
} }
else { else {
if (!ssl->buffers.certificate) { if (!ssl->buffers.certificate) {
@@ -17427,7 +17431,11 @@ void PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo,
if (ssl->buffers.certificate && ssl->buffers.certificate->buffer && if (ssl->buffers.certificate && ssl->buffers.certificate->buffer &&
ssl->buffers.key && ssl->buffers.key->buffer) ssl->buffers.key && ssl->buffers.key->buffer)
ssl->options.sendVerify = SEND_CERT; ssl->options.sendVerify = SEND_CERT;
else #ifdef OPENSSL_EXTRA
else
#else
else if (IsTLS(ssl))
#endif
ssl->options.sendVerify = SEND_BLANK_CERT; ssl->options.sendVerify = SEND_BLANK_CERT;
if (IsEncryptionOn(ssl, 0)) if (IsEncryptionOn(ssl, 0))