diff options
author | 2020-07-07 19:42:58 +0000 | |
---|---|---|
committer | 2020-07-07 19:42:58 +0000 | |
commit | 50ae7695dfcc10da5e64b1805201bc1e5ceefa95 (patch) | |
tree | 7c7b838cb635dcd17de4f5f067338417e93e4db0 | |
parent | Test TLSv1.3 ciphersuites now that TLS_method() supports TLSv1.3. (diff) | |
download | wireguard-openbsd-50ae7695dfcc10da5e64b1805201bc1e5ceefa95.tar.xz wireguard-openbsd-50ae7695dfcc10da5e64b1805201bc1e5ceefa95.zip |
Remove temporary RSA keys/callbacks code.
This was removed from libssl a very long time ago...
-rw-r--r-- | regress/lib/libssl/ssl/ssltest.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/regress/lib/libssl/ssl/ssltest.c b/regress/lib/libssl/ssl/ssltest.c index 0c9a03c84b4..837622816a9 100644 --- a/regress/lib/libssl/ssl/ssltest.c +++ b/regress/lib/libssl/ssl/ssltest.c @@ -181,8 +181,6 @@ #define TEST_CLIENT_CERT "../apps/client.pem" static int verify_callback(int ok, X509_STORE_CTX *ctx); -static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength); -static void free_tmp_rsa(void); static int app_verify_callback(X509_STORE_CTX *ctx, void *arg); #define APP_CALLBACK_STRING "Test Callback Argument" struct app_verify_arg { @@ -658,8 +656,6 @@ bad: EC_KEY_free(ecdh); } - SSL_CTX_set_tmp_rsa_callback(s_ctx, tmp_rsa_cb); - if (!SSL_CTX_use_certificate_file(s_ctx, server_cert, SSL_FILETYPE_PEM)) { ERR_print_errors(bio_err); @@ -772,7 +768,6 @@ end: SSL_CTX_free(c_ctx); BIO_free(bio_stdout); - free_tmp_rsa(); #ifndef OPENSSL_NO_ENGINE ENGINE_cleanup(); #endif @@ -1844,44 +1839,6 @@ app_verify_callback(X509_STORE_CTX *ctx, void *arg) return (ok); } -static RSA *rsa_tmp = NULL; - -static RSA * -tmp_rsa_cb(SSL *s, int is_export, int keylength) -{ - BIGNUM *bn = NULL; - if (rsa_tmp == NULL) { - bn = BN_new(); - rsa_tmp = RSA_new(); - if (!bn || !rsa_tmp || !BN_set_word(bn, RSA_F4)) { - BIO_printf(bio_err, "Memory error..."); - goto end; - } - BIO_printf(bio_err, "Generating temp (%d bit) RSA key...", keylength); - (void)BIO_flush(bio_err); - if (!RSA_generate_key_ex(rsa_tmp, keylength, bn, NULL)) { - BIO_printf(bio_err, "Error generating key."); - RSA_free(rsa_tmp); - rsa_tmp = NULL; - } -end: - BIO_printf(bio_err, "\n"); - (void)BIO_flush(bio_err); - } - if (bn) - BN_free(bn); - return (rsa_tmp); -} - -static void -free_tmp_rsa(void) -{ - if (rsa_tmp != NULL) { - RSA_free(rsa_tmp); - rsa_tmp = NULL; - } -} - /* These DH parameters have been generated as follows: * $ openssl dhparam -C -noout 1024 * $ openssl dhparam -C -noout -dsaparam 1024 |