From: tb Date: Fri, 1 Mar 2024 03:47:32 +0000 (+0000) Subject: Remove the ciphers_by_values_test() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9f17c515aab83bfe0c4e0103170e1f48303da84f;p=openbsd Remove the ciphers_by_values_test() --- diff --git a/regress/lib/libssl/ciphers/cipherstest.c b/regress/lib/libssl/ciphers/cipherstest.c index c43939d4d54..e1411d6825c 100644 --- a/regress/lib/libssl/ciphers/cipherstest.c +++ b/regress/lib/libssl/ciphers/cipherstest.c @@ -129,61 +129,6 @@ cipher_find_test(void) return (ret); } -static int -cipher_get_by_value_tests(void) -{ - STACK_OF(SSL_CIPHER) *ciphers; - const SSL_CIPHER *cipher; - SSL_CTX *ssl_ctx = NULL; - SSL *ssl = NULL; - unsigned long id; - uint16_t value; - int ret = 1; - int i; - - if ((ssl_ctx = SSL_CTX_new(SSLv23_method())) == NULL) { - fprintf(stderr, "SSL_CTX_new() returned NULL\n"); - goto failure; - } - if ((ssl = SSL_new(ssl_ctx)) == NULL) { - fprintf(stderr, "SSL_new() returned NULL\n"); - goto failure; - } - - if ((ciphers = SSL_get_ciphers(ssl)) == NULL) { - fprintf(stderr, "no ciphers\n"); - goto failure; - } - - for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) { - cipher = sk_SSL_CIPHER_value(ciphers, i); - - id = SSL_CIPHER_get_id(cipher); - if (SSL_CIPHER_get_by_id(id) == NULL) { - fprintf(stderr, "SSL_CIPHER_get_by_id() failed " - "for %s (0x%lx)\n", SSL_CIPHER_get_name(cipher), - id); - goto failure; - } - - value = SSL_CIPHER_get_value(cipher); - if (SSL_CIPHER_get_by_value(value) == NULL) { - fprintf(stderr, "SSL_CIPHER_get_by_value() failed " - "for %s (0x%04hx)\n", SSL_CIPHER_get_name(cipher), - value); - goto failure; - } - } - - ret = 0; - - failure: - SSL_CTX_free(ssl_ctx); - SSL_free(ssl); - - return (ret); -} - struct parse_ciphersuites_test { const char *str; const int want; @@ -522,7 +467,6 @@ main(int argc, char **argv) failed |= check_cipher_order(); failed |= cipher_find_test(); - failed |= cipher_get_by_value_tests(); failed |= parse_ciphersuites_test(); failed |= cipher_set_test();