wrap up no certificate alert related code in OPENSSL_EXTRA directive.

pull/1319/head
Go Hosohara 2017-08-01 11:13:02 +09:00 committed by Jacob Barthelmeh
parent f690a980bf
commit e8d628f61b
1 changed files with 9 additions and 1 deletions

View File

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