#include <openssl/bio.h>
#include <openssl/buffer.h>
+#include <openssl/bn.h>
#include <openssl/crypto.h>
#include <openssl/dh.h>
#include <openssl/err.h>
return false;
}
- if (pkey) {
- if (!SSL_use_PrivateKey(ssl, pkey.get())) {
- return false;
- }
+ if (pkey && !SSL_use_PrivateKey(ssl, pkey.get())) {
+ return false;
}
if (x509 && !SSL_use_certificate(ssl, x509.get())) {
}
// The certificate will be installed via other means.
- if (!config->async || config->use_early_callback ||
+ if (!config->async ||
config->use_old_client_cert_callback) {
return 1;
}
// Half-close and drain the socket before releasing it. This seems to be
// necessary for graceful shutdown on Windows. It will also avoid write
// failures in the test runner.
-#if defined(OPENSSL_WINDOWS)
+#if defined(OPENSSL_SYS_WINDOWS)
shutdown(sock_, SD_SEND);
#else
shutdown(sock_, SHUT_WR);
return false;
}
// Install the certificate synchronously if nothing else will handle it.
- if (!config->use_early_callback &&
- !config->use_old_client_cert_callback &&
+ if (!config->use_old_client_cert_callback &&
!config->async &&
!InstallCertificate(ssl.get())) {
return false;
// Anything following this line will be considered an error.
StderrDelimiter delimiter;
-#if defined(OPENSSL_WINDOWS)
+#if defined(OPENSSL_SYS_WINDOWS)
/* Initialize Winsock. */
WORD wsa_version = MAKEWORD(2, 2);
WSADATA wsa_data;