static SSL_METHOD *ssl23_get_method(int ver);
static SSL_METHOD *ssl23_get_method(int ver)
{
+#ifndef OPENSSL_NO_SSL2
if (ver == SSL2_VERSION)
return(SSLv2_method());
- else if (ver == SSL3_VERSION)
+ else
+#endif
+#ifndef OPENSSL_NO_SSL3
+ if (ver == SSL3_VERSION)
return(SSLv3_method());
- else if (ver == TLS1_VERSION)
+ else
+#endif
+#ifndef OPENSSL_NO_TLS1
+ if (ver == TLS1_VERSION)
return(TLSv1_method());
else
+#endif
return(NULL);
}
const SSL_METHOD *meth;
SSL_CIPHER *ci, *tci = NULL;
+#ifndef OPENSSL_NO_SSL2
fprintf(stderr, "testing SSLv2 cipher list order: ");
meth = SSLv2_method();
while ((ci = meth->get_cipher(i++)) != NULL)
tci = ci;
}
fprintf(stderr, "ok\n");
-
+#endif
+#ifndef OPENSSL_NO_SSL3
fprintf(stderr, "testing SSLv3 cipher list order: ");
meth = SSLv3_method();
tci = NULL;
tci = ci;
}
fprintf(stderr, "ok\n");
-
+#endif
+#ifndef OPENSSL_NO_TLS1
fprintf(stderr, "testing TLSv1 cipher list order: ");
meth = TLSv1_method();
tci = NULL;
tci = ci;
}
fprintf(stderr, "ok\n");
+#endif
return 1;
}