From: Richard Levitte Date: Fri, 14 Feb 2003 05:24:22 +0000 (+0000) Subject: Pay attention to disabled SSL versions. X-Git-Tag: BEN_FIPS_TEST_1~38^2~312 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e270cf9c5ec253ca74a55ab6d537394e764c4d9a;p=openssl Pay attention to disabled SSL versions. PR: 500 --- diff --git a/apps/ocsp.c b/apps/ocsp.c index 6182410f6a..f05ec0e655 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -738,7 +738,16 @@ int MAIN(int argc, char **argv) if (use_ssl == 1) { BIO *sbio; +#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) ctx = SSL_CTX_new(SSLv23_client_method()); +#elif !defined(OPENSSL_NO_SSL3) + ctx = SSL_CTX_new(SSLv3_client_method()); +#elif !defined(OPENSSL_NO_SSL2) + ctx = SSL_CTX_new(SSLv2_client_method()); +#else + BIO_printf(bio_err, "SSL is disabled\n"); + goto end; +#endif SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY); sbio = BIO_new_ssl(ctx, 1); cbio = BIO_push(sbio, cbio);