summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/interop/server.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/regress/lib/libssl/interop/server.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/regress/lib/libssl/interop/server.c b/src/regress/lib/libssl/interop/server.c
index 68e277a87b..c8e4cb7fc3 100644
--- a/src/regress/lib/libssl/interop/server.c
+++ b/src/regress/lib/libssl/interop/server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: server.c,v 1.10 2021/07/06 11:50:34 bluhm Exp $ */ 1/* $OpenBSD: server.c,v 1.11 2022/07/07 13:12:57 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018-2019 Alexander Bluhm <bluhm@openbsd.org> 3 * Copyright (c) 2018-2019 Alexander Bluhm <bluhm@openbsd.org>
4 * 4 *
@@ -229,10 +229,22 @@ main(int argc, char *argv[])
229 } 229 }
230 230
231 if (listciphers) { 231 if (listciphers) {
232 STACK_OF(SSL_CIPHER) *supported_ciphers;
233
234#if OPENSSL_VERSION_NUMBER < 0x1010000f
235#define SSL_get1_supported_ciphers SSL_get_ciphers
236#endif
232 ssl = SSL_new(ctx); 237 ssl = SSL_new(ctx);
233 if (ssl == NULL) 238 if (ssl == NULL)
234 err_ssl(1, "SSL_new"); 239 err_ssl(1, "SSL_new");
235 print_ciphers(SSL_get_ciphers(ssl)); 240 supported_ciphers = SSL_get1_supported_ciphers(ssl);
241 if (supported_ciphers == NULL)
242 err_ssl(1, "SSL_get1_supported_ciphers");
243 print_ciphers(supported_ciphers);
244
245#if OPENSSL_VERSION_NUMBER >= 0x1010000f
246 sk_SSL_CIPHER_free(supported_ciphers);
247#endif
236 return 0; 248 return 0;
237 } 249 }
238 250