aboutsummaryrefslogtreecommitdiff
path: root/test/ssltest.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2016-03-02 22:38:08 +0100
committerKurt Roeckx <kurt@roeckx.be>2016-03-09 19:39:54 +0100
commit885e601d97ff235615809db832874ff8dad9cb24 (patch)
tree03b651018355ee612bca32f395ced7ec5862c067 /test/ssltest.c
parent0d5301aff900970b09d2fe0c70d1038157d7638b (diff)
downloadopenssl-885e601d97ff235615809db832874ff8dad9cb24.zip
openssl-885e601d97ff235615809db832874ff8dad9cb24.tar.gz
openssl-885e601d97ff235615809db832874ff8dad9cb24.tar.bz2
Use version flexible method instead of fixed version
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> MR: #1824
Diffstat (limited to 'test/ssltest.c')
-rw-r--r--test/ssltest.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/test/ssltest.c b/test/ssltest.c
index 972d76b..c3faad7 100644
--- a/test/ssltest.c
+++ b/test/ssltest.c
@@ -3557,7 +3557,7 @@ static unsigned int psk_server_callback(SSL *ssl, const char *identity,
static int do_test_cipherlist(void)
{
-#if !defined(OPENSSL_NO_SSL3_METHOD) || !defined(OPENSSL_NO_TLS1_METHOD)
+#ifndef OPENSSL_NO_TLS
int i = 0;
const SSL_METHOD *meth;
const SSL_CIPHER *ci, *tci = NULL;
@@ -3567,10 +3567,8 @@ static int do_test_cipherlist(void)
* call functions, thus avoiding auto-init
*/
OPENSSL_init_crypto(0, NULL);
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
- meth = SSLv3_method();
+ meth = TLS_method();
tci = NULL;
while ((ci = meth->get_cipher(i++)) != NULL) {
if (tci != NULL)
@@ -3582,19 +3580,6 @@ static int do_test_cipherlist(void)
tci = ci;
}
#endif
-#ifndef OPENSSL_NO_TLS1_METHOD
- meth = TLSv1_method();
- tci = NULL;
- while ((ci = meth->get_cipher(i++)) != NULL) {
- if (tci != NULL)
- if (ci->id >= tci->id) {
- fprintf(stderr, "testing TLSv1 cipher list order: ");
- fprintf(stderr, "failed %x vs. %x\n", ci->id, tci->id);
- return 0;
- }
- tci = ci;
- }
-#endif
return 1;
}