diff options
author | tedu <> | 2014-04-17 21:37:37 +0000 |
---|---|---|
committer | tedu <> | 2014-04-17 21:37:37 +0000 |
commit | 153e0cd77b7a56682f71acec88a0c318e197fcb3 (patch) | |
tree | 08e9b3a8cf6f35c7585646ca19c69f2ba87cc08c /src/lib/libssl/src/ssl/ssltest.c | |
parent | 5f4d080a0e8eb89385e3020de8bbbd5243abf8dc (diff) | |
download | openbsd-153e0cd77b7a56682f71acec88a0c318e197fcb3.tar.gz openbsd-153e0cd77b7a56682f71acec88a0c318e197fcb3.tar.bz2 openbsd-153e0cd77b7a56682f71acec88a0c318e197fcb3.zip |
always build in RSA and DSA. ok deraadt miod
Diffstat (limited to 'src/lib/libssl/src/ssl/ssltest.c')
-rw-r--r-- | src/lib/libssl/src/ssl/ssltest.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index a8228fbfa5..1ce08c957d 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
@@ -173,12 +173,8 @@ | |||
173 | #endif | 173 | #endif |
174 | #include <openssl/err.h> | 174 | #include <openssl/err.h> |
175 | #include <openssl/rand.h> | 175 | #include <openssl/rand.h> |
176 | #ifndef OPENSSL_NO_RSA | ||
177 | #include <openssl/rsa.h> | 176 | #include <openssl/rsa.h> |
178 | #endif | ||
179 | #ifndef OPENSSL_NO_DSA | ||
180 | #include <openssl/dsa.h> | 177 | #include <openssl/dsa.h> |
181 | #endif | ||
182 | #ifndef OPENSSL_NO_DH | 178 | #ifndef OPENSSL_NO_DH |
183 | #include <openssl/dh.h> | 179 | #include <openssl/dh.h> |
184 | #endif | 180 | #endif |
@@ -203,10 +199,8 @@ | |||
203 | #define COMP_ZLIB 1 | 199 | #define COMP_ZLIB 1 |
204 | 200 | ||
205 | static int verify_callback(int ok, X509_STORE_CTX *ctx); | 201 | static int verify_callback(int ok, X509_STORE_CTX *ctx); |
206 | #ifndef OPENSSL_NO_RSA | ||
207 | static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength); | 202 | static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength); |
208 | static void free_tmp_rsa(void); | 203 | static void free_tmp_rsa(void); |
209 | #endif | ||
210 | static int app_verify_callback(X509_STORE_CTX *ctx, void *arg); | 204 | static int app_verify_callback(X509_STORE_CTX *ctx, void *arg); |
211 | #define APP_CALLBACK_STRING "Test Callback Argument" | 205 | #define APP_CALLBACK_STRING "Test Callback Argument" |
212 | struct app_verify_arg { | 206 | struct app_verify_arg { |
@@ -363,22 +357,18 @@ print_details(SSL *c_ssl, const char *prefix) | |||
363 | if (pkey != NULL) { | 357 | if (pkey != NULL) { |
364 | if (0) | 358 | if (0) |
365 | ; | 359 | ; |
366 | #ifndef OPENSSL_NO_RSA | ||
367 | else if (pkey->type == EVP_PKEY_RSA && | 360 | else if (pkey->type == EVP_PKEY_RSA && |
368 | pkey->pkey.rsa != NULL && | 361 | pkey->pkey.rsa != NULL && |
369 | pkey->pkey.rsa->n != NULL) { | 362 | pkey->pkey.rsa->n != NULL) { |
370 | BIO_printf(bio_stdout, ", %d bit RSA", | 363 | BIO_printf(bio_stdout, ", %d bit RSA", |
371 | BN_num_bits(pkey->pkey.rsa->n)); | 364 | BN_num_bits(pkey->pkey.rsa->n)); |
372 | } | 365 | } |
373 | #endif | ||
374 | #ifndef OPENSSL_NO_DSA | ||
375 | else if (pkey->type == EVP_PKEY_DSA && | 366 | else if (pkey->type == EVP_PKEY_DSA && |
376 | pkey->pkey.dsa != NULL && | 367 | pkey->pkey.dsa != NULL && |
377 | pkey->pkey.dsa->p != NULL) { | 368 | pkey->pkey.dsa->p != NULL) { |
378 | BIO_printf(bio_stdout, ", %d bit DSA", | 369 | BIO_printf(bio_stdout, ", %d bit DSA", |
379 | BN_num_bits(pkey->pkey.dsa->p)); | 370 | BN_num_bits(pkey->pkey.dsa->p)); |
380 | } | 371 | } |
381 | #endif | ||
382 | EVP_PKEY_free(pkey); | 372 | EVP_PKEY_free(pkey); |
383 | } | 373 | } |
384 | X509_free(cert); | 374 | X509_free(cert); |
@@ -837,9 +827,7 @@ bad: | |||
837 | (void)no_ecdhe; | 827 | (void)no_ecdhe; |
838 | #endif | 828 | #endif |
839 | 829 | ||
840 | #ifndef OPENSSL_NO_RSA | ||
841 | SSL_CTX_set_tmp_rsa_callback(s_ctx, tmp_rsa_cb); | 830 | SSL_CTX_set_tmp_rsa_callback(s_ctx, tmp_rsa_cb); |
842 | #endif | ||
843 | 831 | ||
844 | #ifdef TLSEXT_TYPE_opaque_prf_input | 832 | #ifdef TLSEXT_TYPE_opaque_prf_input |
845 | SSL_CTX_set_tlsext_opaque_prf_input_callback(c_ctx, opaque_prf_input_cb); | 833 | SSL_CTX_set_tlsext_opaque_prf_input_callback(c_ctx, opaque_prf_input_cb); |
@@ -997,9 +985,7 @@ end: | |||
997 | if (bio_stdout != NULL) | 985 | if (bio_stdout != NULL) |
998 | BIO_free(bio_stdout); | 986 | BIO_free(bio_stdout); |
999 | 987 | ||
1000 | #ifndef OPENSSL_NO_RSA | ||
1001 | free_tmp_rsa(); | 988 | free_tmp_rsa(); |
1002 | #endif | ||
1003 | #ifndef OPENSSL_NO_ENGINE | 989 | #ifndef OPENSSL_NO_ENGINE |
1004 | ENGINE_cleanup(); | 990 | ENGINE_cleanup(); |
1005 | #endif | 991 | #endif |
@@ -2087,7 +2073,6 @@ app_verify_callback(X509_STORE_CTX *ctx, void *arg) | |||
2087 | return (ok); | 2073 | return (ok); |
2088 | } | 2074 | } |
2089 | 2075 | ||
2090 | #ifndef OPENSSL_NO_RSA | ||
2091 | static RSA *rsa_tmp = NULL; | 2076 | static RSA *rsa_tmp = NULL; |
2092 | 2077 | ||
2093 | static RSA | 2078 | static RSA |
@@ -2125,7 +2110,6 @@ free_tmp_rsa(void) | |||
2125 | rsa_tmp = NULL; | 2110 | rsa_tmp = NULL; |
2126 | } | 2111 | } |
2127 | } | 2112 | } |
2128 | #endif | ||
2129 | 2113 | ||
2130 | #ifndef OPENSSL_NO_DH | 2114 | #ifndef OPENSSL_NO_DH |
2131 | /* These DH parameters have been generated as follows: | 2115 | /* These DH parameters have been generated as follows: |