#endif
BIO *
-Ssl::Bio::Create(const int fd, Ssl::Bio::Type type)
+Ssl::Bio::Create(const int fd, Security::Io::Type type)
{
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- if (BIO *bio = BIO_new(&SquidMethods)) {
- BIO_int_ctrl(bio, BIO_C_SET_FD, type, fd);
- return bio;
- }
+ BIO_METHOD *useMethod = &SquidMethods;
#else
if (!SquidMethods) {
SquidMethods = BIO_meth_new(BIO_TYPE_SOCKET, "squid");
configureSslContext(Security::ContextPointer &ctx, AnyP::PortCfg &port)
{
int ssl_error;
- SSL_CTX_set_options(ctx.get(), port.secure.parsedOptions);
+ SSL_CTX_set_options(ctx.get(), *port.secure.parsedOptions);
- #if defined(SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
- SSL_CTX_set_info_callback(ctx.get(), ssl_info_cb);
- #endif
+ maybeDisableRenegotiate(ctx);
if (port.sslContextSessionId)
SSL_CTX_set_session_id_context(ctx.get(), (const unsigned char *)port.sslContextSessionId, strlen(port.sslContextSessionId));
if (!ctx)
return false;
- #if defined(SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
- SSL_CTX_set_info_callback(ctx.get(), ssl_info_cb);
- #endif
- SSL_CTX_set_options(ctx.get(), options);
-
+ maybeDisableRenegotiate(ctx);
if (!peer.sslCipher.isEmpty()) {
debugs(83, 5, "Using chiper suite " << peer.sslCipher << ".");