diff options
author | tb <> | 2022-07-07 13:12:57 +0000 |
---|---|---|
committer | tb <> | 2022-07-07 13:12:57 +0000 |
commit | 1f888739fa08a5540cfbff134abdec75e5baf8cf (patch) | |
tree | d684d85979c5a9c956a97b15aabba16544f9258e /src | |
parent | 90c70235c6fe2f498764aa307c81725f3bc9f60c (diff) | |
download | openbsd-1f888739fa08a5540cfbff134abdec75e5baf8cf.tar.gz openbsd-1f888739fa08a5540cfbff134abdec75e5baf8cf.tar.bz2 openbsd-1f888739fa08a5540cfbff134abdec75e5baf8cf.zip |
Only run tests against ciphers supported by the method.
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/interop/client.c | 16 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/server.c | 16 |
2 files changed, 28 insertions, 4 deletions
diff --git a/src/regress/lib/libssl/interop/client.c b/src/regress/lib/libssl/interop/client.c index a8e66c2876..31a960381e 100644 --- a/src/regress/lib/libssl/interop/client.c +++ b/src/regress/lib/libssl/interop/client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: client.c,v 1.10 2020/09/14 00:51:04 bluhm Exp $ */ | 1 | /* $OpenBSD: client.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 | * |
@@ -184,10 +184,22 @@ main(int argc, char *argv[]) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | if (listciphers) { | 186 | if (listciphers) { |
187 | STACK_OF(SSL_CIPHER) *supported_ciphers; | ||
188 | |||
189 | #if OPENSSL_VERSION_NUMBER < 0x1010000f | ||
190 | #define SSL_get1_supported_ciphers SSL_get_ciphers | ||
191 | #endif | ||
187 | ssl = SSL_new(ctx); | 192 | ssl = SSL_new(ctx); |
188 | if (ssl == NULL) | 193 | if (ssl == NULL) |
189 | err_ssl(1, "SSL_new"); | 194 | err_ssl(1, "SSL_new"); |
190 | print_ciphers(SSL_get_ciphers(ssl)); | 195 | supported_ciphers = SSL_get1_supported_ciphers(ssl); |
196 | if (supported_ciphers == NULL) | ||
197 | err_ssl(1, "SSL_get1_supported_ciphers"); | ||
198 | print_ciphers(supported_ciphers); | ||
199 | |||
200 | #if OPENSSL_VERSION_NUMBER >= 0x1010000f | ||
201 | sk_SSL_CIPHER_free(supported_ciphers); | ||
202 | #endif | ||
191 | return 0; | 203 | return 0; |
192 | } | 204 | } |
193 | 205 | ||
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 | ||