diff options
| author | tb <> | 2022-07-07 13:12:57 +0000 |
|---|---|---|
| committer | tb <> | 2022-07-07 13:12:57 +0000 |
| commit | 6c30e945e931211223b0bbf8f86a8754ce7d65d7 (patch) | |
| tree | d684d85979c5a9c956a97b15aabba16544f9258e /src/regress/lib/libssl/interop/server.c | |
| parent | 0cb2272503a5d31b3fb407ed265fd7efdccd30b0 (diff) | |
| download | openbsd-6c30e945e931211223b0bbf8f86a8754ce7d65d7.tar.gz openbsd-6c30e945e931211223b0bbf8f86a8754ce7d65d7.tar.bz2 openbsd-6c30e945e931211223b0bbf8f86a8754ce7d65d7.zip | |
Only run tests against ciphers supported by the method.
Diffstat (limited to 'src/regress/lib/libssl/interop/server.c')
| -rw-r--r-- | src/regress/lib/libssl/interop/server.c | 16 |
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 | ||
