diff options
author | jsing <> | 2024-07-23 14:42:03 +0000 |
---|---|---|
committer | jsing <> | 2024-07-23 14:42:03 +0000 |
commit | 9b1a061e926ab1b3854ed7128026a870600937fd (patch) | |
tree | 74107080ccbe8c70dc69029a968cc5281c2b8add /src | |
parent | 6861a5a72a0bd87259b9e40bd0a0f7c85fd11e9c (diff) | |
download | openbsd-9b1a061e926ab1b3854ed7128026a870600937fd.tar.gz openbsd-9b1a061e926ab1b3854ed7128026a870600937fd.tar.bz2 openbsd-9b1a061e926ab1b3854ed7128026a870600937fd.zip |
Revise regress for ssl3_get_cipher() changes.
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/ciphers/cipherstest.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/regress/lib/libssl/ciphers/cipherstest.c b/src/regress/lib/libssl/ciphers/cipherstest.c index 97ad2be2bb..649eaf7200 100644 --- a/src/regress/lib/libssl/ciphers/cipherstest.c +++ b/src/regress/lib/libssl/ciphers/cipherstest.c | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $OpenBSD: cipherstest.c,v 1.15 2024/07/17 15:22:56 tb Exp $ */ | ||
2 | /* | 1 | /* |
3 | * Copyright (c) 2015, 2020 Joel Sing <jsing@openbsd.org> | 2 | * Copyright (c) 2015, 2020 Joel Sing <jsing@openbsd.org> |
4 | * | 3 | * |
@@ -24,7 +23,7 @@ | |||
24 | #include <string.h> | 23 | #include <string.h> |
25 | 24 | ||
26 | int ssl3_num_ciphers(void); | 25 | int ssl3_num_ciphers(void); |
27 | const SSL_CIPHER *ssl3_get_cipher(unsigned int u); | 26 | const SSL_CIPHER *ssl3_get_cipher_by_index(int idx); |
28 | 27 | ||
29 | int ssl_parse_ciphersuites(STACK_OF(SSL_CIPHER) **out_ciphers, const char *str); | 28 | int ssl_parse_ciphersuites(STACK_OF(SSL_CIPHER) **out_ciphers, const char *str); |
30 | 29 | ||
@@ -48,12 +47,8 @@ check_cipher_order(void) | |||
48 | 47 | ||
49 | num_ciphers = ssl3_num_ciphers(); | 48 | num_ciphers = ssl3_num_ciphers(); |
50 | 49 | ||
51 | for (i = 1; i <= num_ciphers; i++) { | 50 | for (i = 0; i < num_ciphers; i++) { |
52 | /* | 51 | if ((cipher = ssl3_get_cipher_by_index(i)) == NULL) { |
53 | * For some reason, ssl3_get_cipher() returns ciphers in | ||
54 | * reverse order. | ||
55 | */ | ||
56 | if ((cipher = ssl3_get_cipher(num_ciphers - i)) == NULL) { | ||
57 | fprintf(stderr, "FAIL: ssl3_get_cipher(%d) returned " | 52 | fprintf(stderr, "FAIL: ssl3_get_cipher(%d) returned " |
58 | "NULL\n", i); | 53 | "NULL\n", i); |
59 | return 1; | 54 | return 1; |