diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-12-28 19:45:01 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-13 09:09:36 +0100 |
commit | 0b7368dda011611855c66543f0b9c66b5bd646d1 (patch) | |
tree | a74297439013b2802ac3ea0481f3ade51bccf605 /test/http_test.c | |
parent | bf973d0697e61a44dc46d08b0421a08a8cb61887 (diff) | |
download | openssl-new-0b7368dda011611855c66543f0b9c66b5bd646d1.tar.gz |
TEST: move cert, key, and CSR loading aux functions to new testutil/load.c
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13762)
Diffstat (limited to 'test/http_test.c')
-rw-r--r-- | test/http_test.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/test/http_test.c b/test/http_test.c index 437fca97dc..e95249d21b 100644 --- a/test/http_test.c +++ b/test/http_test.c @@ -22,20 +22,6 @@ static X509 *x509 = NULL; #define RPATH "path/any.crt" static const char *rpath; -static X509 *load_pem_cert(const char *file) -{ - X509 *cert = NULL; - BIO *bio = NULL; - - if (!TEST_ptr(bio = BIO_new(BIO_s_file()))) - return NULL; - if (TEST_int_gt(BIO_read_filename(bio, file), 0)) - (void)TEST_ptr(cert = PEM_read_bio_X509(bio, NULL, NULL, NULL)); - - BIO_free(bio); - return cert; -} - /* * pretty trivial HTTP mock server: * for POST, copy request headers+body from mem BIO 'in' as response to 'out' @@ -238,7 +224,7 @@ int setup_tests(void) } x509_it = ASN1_ITEM_rptr(X509); - if (!TEST_ptr((x509 = load_pem_cert(test_get_argument(0))))) + if (!TEST_ptr((x509 = load_cert_pem(test_get_argument(0), NULL)))) return 1; ADD_TEST(test_http_url_dns); |