diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libssl/ciphers/cipherstest.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/regress/lib/libssl/ciphers/cipherstest.c b/src/regress/lib/libssl/ciphers/cipherstest.c index c43939d4d5..e1411d6825 100644 --- a/src/regress/lib/libssl/ciphers/cipherstest.c +++ b/src/regress/lib/libssl/ciphers/cipherstest.c | |||
| @@ -129,61 +129,6 @@ cipher_find_test(void) | |||
| 129 | return (ret); | 129 | return (ret); |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static int | ||
| 133 | cipher_get_by_value_tests(void) | ||
| 134 | { | ||
| 135 | STACK_OF(SSL_CIPHER) *ciphers; | ||
| 136 | const SSL_CIPHER *cipher; | ||
| 137 | SSL_CTX *ssl_ctx = NULL; | ||
| 138 | SSL *ssl = NULL; | ||
| 139 | unsigned long id; | ||
| 140 | uint16_t value; | ||
| 141 | int ret = 1; | ||
| 142 | int i; | ||
| 143 | |||
| 144 | if ((ssl_ctx = SSL_CTX_new(SSLv23_method())) == NULL) { | ||
| 145 | fprintf(stderr, "SSL_CTX_new() returned NULL\n"); | ||
| 146 | goto failure; | ||
| 147 | } | ||
| 148 | if ((ssl = SSL_new(ssl_ctx)) == NULL) { | ||
| 149 | fprintf(stderr, "SSL_new() returned NULL\n"); | ||
| 150 | goto failure; | ||
| 151 | } | ||
| 152 | |||
| 153 | if ((ciphers = SSL_get_ciphers(ssl)) == NULL) { | ||
| 154 | fprintf(stderr, "no ciphers\n"); | ||
| 155 | goto failure; | ||
| 156 | } | ||
| 157 | |||
| 158 | for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) { | ||
| 159 | cipher = sk_SSL_CIPHER_value(ciphers, i); | ||
| 160 | |||
| 161 | id = SSL_CIPHER_get_id(cipher); | ||
| 162 | if (SSL_CIPHER_get_by_id(id) == NULL) { | ||
| 163 | fprintf(stderr, "SSL_CIPHER_get_by_id() failed " | ||
| 164 | "for %s (0x%lx)\n", SSL_CIPHER_get_name(cipher), | ||
| 165 | id); | ||
| 166 | goto failure; | ||
| 167 | } | ||
| 168 | |||
| 169 | value = SSL_CIPHER_get_value(cipher); | ||
| 170 | if (SSL_CIPHER_get_by_value(value) == NULL) { | ||
| 171 | fprintf(stderr, "SSL_CIPHER_get_by_value() failed " | ||
| 172 | "for %s (0x%04hx)\n", SSL_CIPHER_get_name(cipher), | ||
| 173 | value); | ||
| 174 | goto failure; | ||
| 175 | } | ||
| 176 | } | ||
| 177 | |||
| 178 | ret = 0; | ||
| 179 | |||
| 180 | failure: | ||
| 181 | SSL_CTX_free(ssl_ctx); | ||
| 182 | SSL_free(ssl); | ||
| 183 | |||
| 184 | return (ret); | ||
| 185 | } | ||
| 186 | |||
| 187 | struct parse_ciphersuites_test { | 132 | struct parse_ciphersuites_test { |
| 188 | const char *str; | 133 | const char *str; |
| 189 | const int want; | 134 | const int want; |
| @@ -522,7 +467,6 @@ main(int argc, char **argv) | |||
| 522 | failed |= check_cipher_order(); | 467 | failed |= check_cipher_order(); |
| 523 | 468 | ||
| 524 | failed |= cipher_find_test(); | 469 | failed |= cipher_find_test(); |
| 525 | failed |= cipher_get_by_value_tests(); | ||
| 526 | 470 | ||
| 527 | failed |= parse_ciphersuites_test(); | 471 | failed |= parse_ciphersuites_test(); |
| 528 | failed |= cipher_set_test(); | 472 | failed |= cipher_set_test(); |
