Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-02-14 08:24:25 +0300
committerRichard Levitte <levitte@openssl.org>2003-02-14 08:24:25 +0300
commit97333eaff7a037cd7087a1ce8f03fbc3a4400732 (patch)
tree4c989728f016668fe2d3ed75df31a3a48276444f /apps
parentb088a2d3f9fea27b11cb81c5af1cb58d77b22ad0 (diff)
Pay attention to disabled SSL versions.
PR: 500
Diffstat (limited to 'apps')
-rw-r--r--apps/ocsp.c9
1 files changed, 9 insertions, 0 deletions
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);