diff options
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; |
