[openssl] master update
Matt Caswell
matt at openssl.org
Wed Nov 25 10:13:19 UTC 2020
The branch master has been updated
via 1950e0e3e796a066a0de95330f67d2da9d2c93e5 (commit)
via cdbd27bab4d981cb48327199ef89308e6ef36733 (commit)
via 337ade3d2c9691aeb4a6ca1720f00346db91ac60 (commit)
from 403ef8cea73e9b4924dce39e3706778618507cd6 (commit)
- Log -----------------------------------------------------------------
commit 1950e0e3e796a066a0de95330f67d2da9d2c93e5
Author: Matt Caswell <matt at openssl.org>
Date: Wed Nov 18 12:07:43 2020 +0000
Test that OSSL_STORE can load various types of params
There have been instances where OSSL_STORE got confused between DSA and
DH params (e.g. see issue #13046) due the DER encoding of DH and DSA params
looking identical. Therefore we test that we get the types that we expect.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13329)
commit cdbd27bab4d981cb48327199ef89308e6ef36733
Author: Matt Caswell <matt at openssl.org>
Date: Tue Nov 17 17:18:08 2020 +0000
Test various deprecated PEM_read_bio_* APIs
Add tests for various deprecated PEM_read_bio_*() functions to ensure
they can still read the various files.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13329)
commit 337ade3d2c9691aeb4a6ca1720f00346db91ac60
Author: Matt Caswell <matt at openssl.org>
Date: Thu Nov 5 17:28:59 2020 +0000
Don't forget the datatype when decoding a PEM file
The OSSL_STORE code was forgetting the datatype that we read from the
PEM header when decoding the DER.
Fixes #13046
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13329)
-----------------------------------------------------------------------
Summary of changes:
crypto/store/store_result.c | 4 +-
test/build.info | 9 +-
test/ossl_store_test.c | 84 ++++++++
test/pem_read_depr_test.c | 213 +++++++++++++++++++++
test/recipes/04-test_pem_read_depr.t | 20 ++
.../04-test_pem_read_depr_data/dhparams.pem | 8 +
.../04-test_pem_read_depr_data/dsaparams.pem | 14 ++
.../04-test_pem_read_depr_data/dsaprivatekey.pem | 15 ++
.../04-test_pem_read_depr_data/dsapublickey.pem | 20 ++
.../04-test_pem_read_depr_data/rsaprivatekey.pem | 28 +++
.../04-test_pem_read_depr_data/rsapublickey.pem | 9 +
.../04-test_pem_read_depr_data/x942params.pem | 14 ++
test/recipes/66-test_ossl_store.t | 5 +-
test/recipes/66-test_ossl_store_data/DH-params.pem | 8 +
.../recipes/66-test_ossl_store_data/DHX-params.pem | 14 ++
.../recipes/66-test_ossl_store_data/DSA-params.pem | 14 ++
16 files changed, 474 insertions(+), 5 deletions(-)
create mode 100644 test/pem_read_depr_test.c
create mode 100644 test/recipes/04-test_pem_read_depr.t
create mode 100644 test/recipes/04-test_pem_read_depr_data/dhparams.pem
create mode 100644 test/recipes/04-test_pem_read_depr_data/dsaparams.pem
create mode 100644 test/recipes/04-test_pem_read_depr_data/dsaprivatekey.pem
create mode 100644 test/recipes/04-test_pem_read_depr_data/dsapublickey.pem
create mode 100644 test/recipes/04-test_pem_read_depr_data/rsaprivatekey.pem
create mode 100644 test/recipes/04-test_pem_read_depr_data/rsapublickey.pem
create mode 100644 test/recipes/04-test_pem_read_depr_data/x942params.pem
create mode 100644 test/recipes/66-test_ossl_store_data/DH-params.pem
create mode 100644 test/recipes/66-test_ossl_store_data/DHX-params.pem
create mode 100644 test/recipes/66-test_ossl_store_data/DSA-params.pem
diff --git a/crypto/store/store_result.c b/crypto/store/store_result.c
index 175891d29f..25100e0248 100644
--- a/crypto/store/store_result.c
+++ b/crypto/store/store_result.c
@@ -274,8 +274,8 @@ static EVP_PKEY *try_key_value(struct extracted_param_data_st *data,
}
decoderctx =
- OSSL_DECODER_CTX_new_by_EVP_PKEY(&pk, NULL, NULL, NULL, selection,
- libctx, propq);
+ OSSL_DECODER_CTX_new_by_EVP_PKEY(&pk, "DER", NULL, data->data_type,
+ selection, libctx, propq);
(void)OSSL_DECODER_CTX_set_passphrase_cb(decoderctx, cb, cbarg);
/* No error if this couldn't be decoded */
diff --git a/test/build.info b/test/build.info
index 0ce3e27ae8..1485801e84 100644
--- a/test/build.info
+++ b/test/build.info
@@ -57,7 +57,8 @@ IF[{- !$disabled{tests} -}]
http_test servername_test ocspapitest fatalerrtest tls13ccstest \
sysdefaulttest errtest ssl_ctx_test gosttest \
context_internal_test aesgcmtest params_test evp_pkey_dparams_test \
- keymgmt_internal_test hexstr_test provider_status_test defltfips_test
+ keymgmt_internal_test hexstr_test provider_status_test defltfips_test \
+ pem_read_depr_test
IF[{- !$disabled{'deprecated-3.0'} -}]
PROGRAMS{noinst}=enginetest
@@ -807,6 +808,12 @@ IF[{- !$disabled{tests} -}]
SOURCE[bio_prefix_text]=bio_prefix_text.c $LIBAPPSSRC
INCLUDE[bio_prefix_text]=.. ../include ../apps/include
DEPEND[bio_prefix_text]=../libcrypto
+
+ IF[{- !$disabled{'deprecated-3.0'} -}]
+ SOURCE[pem_read_depr_test]=pem_read_depr_test.c
+ INCLUDE[pem_read_depr_test]=../include ../apps/include
+ DEPEND[pem_read_depr_test]=../libcrypto libtestutil.a
+ ENDIF
ENDIF
SOURCE[ssl_ctx_test]=ssl_ctx_test.c
diff --git a/test/ossl_store_test.c b/test/ossl_store_test.c
index c00e5fd1fb..e1ee820085 100644
--- a/test/ossl_store_test.c
+++ b/test/ossl_store_test.c
@@ -15,10 +15,12 @@ typedef enum OPTION_choice {
OPT_ERR = -1,
OPT_EOF = 0,
OPT_INFILE,
+ OPT_DATADIR,
OPT_TEST_ENUM
} OPTION_CHOICE;
static const char *infile = NULL;
+static const char *datadir = NULL;
static int test_store_open(void)
{
@@ -50,11 +52,84 @@ static int test_store_search_by_key_fingerprint_fail(void)
return ret;
}
+static int get_params(const char *uri, const char *type)
+{
+ EVP_PKEY *pkey = NULL;
+ OSSL_STORE_CTX *ctx = NULL;
+ OSSL_STORE_INFO *info;
+ int ret = 0;
+
+ ctx = OSSL_STORE_open_ex(uri, NULL, NULL, NULL, NULL, NULL, NULL);
+ if (!TEST_ptr(ctx))
+ goto err;
+
+ while (!OSSL_STORE_eof(ctx)
+ && (info = OSSL_STORE_load(ctx)) != NULL
+ && pkey == NULL) {
+ if (OSSL_STORE_INFO_get_type(info) == OSSL_STORE_INFO_PARAMS) {
+ pkey = OSSL_STORE_INFO_get1_PARAMS(info);
+ }
+ OSSL_STORE_INFO_free(info);
+ info = NULL;
+ }
+
+ if (pkey != NULL)
+ ret = EVP_PKEY_is_a(pkey, type);
+ EVP_PKEY_free(pkey);
+
+ err:
+ OSSL_STORE_close(ctx);
+ return ret;
+}
+
+static int test_store_get_params(int idx)
+{
+ const char *type;
+ char uri[80];
+
+ switch(idx) {
+#ifndef OPENSSL_NO_DH
+ case 0:
+ type = "DH";
+ break;
+ case 1:
+ type = "DHX";
+ break;
+#else
+ case 0:
+ case 1:
+ return 1;
+#endif
+ case 2:
+#ifndef OPENSSL_NO_DSA
+ type = "DSA";
+ break;
+#else
+ return 1;
+#endif
+ default:
+ TEST_error("Invalid test index");
+ return 0;
+ }
+
+ if (!TEST_true(BIO_snprintf(uri, sizeof(uri), "%s/%s-params.pem",
+ datadir, type)))
+ return 0;
+
+ TEST_info("Testing uri: %s", uri);
+ if (!TEST_true(get_params(uri, type)))
+ return 0;
+
+ return 1;
+}
+
+
const OPTIONS *test_get_options(void)
{
static const OPTIONS test_options[] = {
OPT_TEST_OPTIONS_DEFAULT_USAGE,
{ "in", OPT_INFILE, '<', },
+ { "data", OPT_DATADIR, 's' },
{ NULL }
};
return test_options;
@@ -69,6 +144,9 @@ int setup_tests(void)
case OPT_INFILE:
infile = opt_arg();
break;
+ case OPT_DATADIR:
+ datadir = opt_arg();
+ break;
case OPT_TEST_CASES:
break;
default:
@@ -77,7 +155,13 @@ int setup_tests(void)
}
}
+ if (datadir == NULL) {
+ TEST_error("No datadir specified");
+ return 0;
+ }
+
ADD_TEST(test_store_open);
ADD_TEST(test_store_search_by_key_fingerprint_fail);
+ ADD_ALL_TESTS(test_store_get_params, 3);
return 1;
}
diff --git a/test/pem_read_depr_test.c b/test/pem_read_depr_test.c
new file mode 100644
index 0000000000..7ef7f30be6
--- /dev/null
+++ b/test/pem_read_depr_test.c
@@ -0,0 +1,213 @@
+/*
+ * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+/*
+ * This file tests deprecated APIs. Therefore we need to suppress deprecation
+ * warnings.
+ */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+
+#include "testutil.h"
+
+static const char *datadir;
+
+static BIO *getfile(const char *filename)
+{
+ char *paramsfile = test_mk_file_path(datadir, filename);
+ BIO *infile = NULL;
+
+ if (!TEST_ptr(paramsfile))
+ goto err;
+ infile = BIO_new_file(paramsfile, "r");
+
+ err:
+ OPENSSL_free(paramsfile);
+ return infile;
+}
+
+#ifndef OPENSSL_NO_DH
+static int test_read_dh_params(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("dhparams.pem");
+ DH *dh = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ dh = PEM_read_bio_DHparams(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(dh))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ DH_free(dh);
+ return testresult;
+}
+
+static int test_read_dh_x942_params(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("x942params.pem");
+ DH *dh = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ dh = PEM_read_bio_DHparams(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(dh))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ DH_free(dh);
+ return testresult;
+}
+#endif
+
+#ifndef OPENSSL_NO_DSA
+static int test_read_dsa_params(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("dsaparams.pem");
+ DSA *dsa = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ dsa = PEM_read_bio_DSAparams(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(dsa))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ DSA_free(dsa);
+ return testresult;
+}
+
+static int test_read_dsa_private(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("dsaprivatekey.pem");
+ DSA *dsa = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ dsa = PEM_read_bio_DSAPrivateKey(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(dsa))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ DSA_free(dsa);
+ return testresult;
+}
+
+static int test_read_dsa_public(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("dsapublickey.pem");
+ DSA *dsa = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ dsa = PEM_read_bio_DSA_PUBKEY(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(dsa))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ DSA_free(dsa);
+ return testresult;
+}
+#endif
+
+static int test_read_rsa_private(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("rsaprivatekey.pem");
+ RSA *rsa = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ rsa = PEM_read_bio_RSAPrivateKey(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(rsa))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ RSA_free(rsa);
+ return testresult;
+}
+
+static int test_read_rsa_public(void)
+{
+ int testresult = 0;
+ BIO *infile = getfile("rsapublickey.pem");
+ RSA *rsa = NULL;
+
+ if (!TEST_ptr(infile))
+ goto err;
+
+ rsa = PEM_read_bio_RSA_PUBKEY(infile, NULL, NULL, NULL);
+ if (!TEST_ptr(rsa))
+ goto err;
+
+ testresult = 1;
+
+ err:
+ BIO_free(infile);
+ RSA_free(rsa);
+ return testresult;
+}
+
+int setup_tests(void)
+{
+ if (!test_skip_common_options()) {
+ TEST_error("Error parsing test options\n");
+ return 0;
+ }
+
+ if (!TEST_ptr(datadir = test_get_argument(0))) {
+ TEST_error("Error getting data dir\n");
+ return 0;
+ }
+
+#ifndef OPENSSL_NO_DH
+ ADD_TEST(test_read_dh_params);
+ ADD_TEST(test_read_dh_x942_params);
+#endif
+#ifndef OPENSSL_NO_DSA
+ ADD_TEST(test_read_dsa_params);
+ ADD_TEST(test_read_dsa_private);
+ ADD_TEST(test_read_dsa_public);
+#endif
+ ADD_TEST(test_read_rsa_private);
+ ADD_TEST(test_read_rsa_public);
+
+ return 1;
+}
diff --git a/test/recipes/04-test_pem_read_depr.t b/test/recipes/04-test_pem_read_depr.t
new file mode 100644
index 0000000000..6ae878b765
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr.t
@@ -0,0 +1,20 @@
+#! /usr/bin/env perl
+# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+
+use OpenSSL::Test qw(:DEFAULT data_dir);
+use OpenSSL::Test::Utils;
+
+setup("test_pem_read_depr");
+
+plan skip_all => "Test not supported in a no-deprecated build"
+ if disabled("deprecated");
+
+plan tests => 1;
+
+ok(run(test(['pem_read_depr_test', data_dir()])), "pem_read_depr_test");
diff --git a/test/recipes/04-test_pem_read_depr_data/dhparams.pem b/test/recipes/04-test_pem_read_depr_data/dhparams.pem
new file mode 100644
index 0000000000..21d1f61b59
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/dhparams.pem
@@ -0,0 +1,8 @@
+-----BEGIN DH PARAMETERS-----
+MIIBCAKCAQEA/uDak+qLI40JfWdgM/eWp9Wg1yjCH1psOeyxSImj09DOdvOPKXhI
+vBjvwyw76vn+HDBg0R90FbA1VmJBXwFqm2qAytpySgPniFWRoIN38SWrZ7FwlXuO
+SPWgXxtRQCIuN7SfIvFoncQ41aa9rJTJ1VXNT22keTe8DbF8tZaALwiaTWmslNa/
++qI/1/a+R4/SqLmQQBFJ10NfNQ7w66tmzsL3mcoz1vOrl+mmOgKHiKaTnI7oiL8y
+qWbnCIdRUPVImNGur/oKRk7Ye/66cgras9WXjXRr5ExVh4+wBYTvJ2H7THRoBgts
+0g1y1Zu5uGJQttPbgC18guqH6NH6xPin+wIBAg==
+-----END DH PARAMETERS-----
diff --git a/test/recipes/04-test_pem_read_depr_data/dsaparams.pem b/test/recipes/04-test_pem_read_depr_data/dsaparams.pem
new file mode 100644
index 0000000000..7c4623269f
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/dsaparams.pem
@@ -0,0 +1,14 @@
+-----BEGIN DSA PARAMETERS-----
+MIICKAKCAQEAkCVbIEa67wJYbxPJRmA+NYY67GfktNggaxbhMaL+jyR7U1uPpOEa
+/tTBgql40zj3W+QORevWOjo4ECxCpWmttG81r1+jhlG/a3Bk+CJB+CZw+ZC8NBXV
+46v03q+MR3AjLOr/k/sgBabVc6I4K6IFC5ZmlwS0+8F4VudOq4lLqHZXFp89AJWi
+HhtPbcD+jYYtrL+3MT7rwQJ+5MoXUgzfTnJFR5hpBuqgYubTGHc8nEG9KkXnE97B
+as0hTWaYuLe/RwHEhabZi7pcFqD26fCJC63gzT6zK73R2GD0qRwPD0pxh/adu2uu
+h314G2y03Fstnc8q5i/NYofP3Lg++0yJNQIdAMi9Wu0rxBvq5Je+TXliYygyKa5E
+/KKOwvshJ2kCggEAWLdQjAIb/Jtn1YZNGZhrif6NCHyO+qxq2B4Ajrw3TUMrmEbt
+avfWoHNkoJCTE10ZzWTZqrVWqzfytK8VnG7XRfMftjMdiXTKg4amG8wvNCC3at36
+WouWYsZx50PWXHOyRiFENcmXDiyzvz2/NcZmKIDdlII/JF3sTjn2HtzpwAIEduEV
+1YnyY9E6MiP0jeMaHvo5zSHAdSYTu0eBZ3ThxCyyW+sIKRA96+yBUtCrGOb+UUu6
+udVKAj8sauSBsIbLGf/qrw86u/qSZbqr+keY6ozSsCCHeFMUIhGxv4a9E0XcAX0r
+VLgYFtiO5DyuXSRACmCgmHYAlvyiP+E5xDs4Nw==
+-----END DSA PARAMETERS-----
diff --git a/test/recipes/04-test_pem_read_depr_data/dsaprivatekey.pem b/test/recipes/04-test_pem_read_depr_data/dsaprivatekey.pem
new file mode 100644
index 0000000000..d24e9e7dd8
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/dsaprivatekey.pem
@@ -0,0 +1,15 @@
+-----BEGIN PRIVATE KEY-----
+MIICXAIBADCCAjUGByqGSM44BAEwggIoAoIBAQCQJVsgRrrvAlhvE8lGYD41hjrs
+Z+S02CBrFuExov6PJHtTW4+k4Rr+1MGCqXjTOPdb5A5F69Y6OjgQLEKlaa20bzWv
+X6OGUb9rcGT4IkH4JnD5kLw0FdXjq/Ter4xHcCMs6v+T+yAFptVzojgrogULlmaX
+BLT7wXhW506riUuodlcWnz0AlaIeG09twP6Nhi2sv7cxPuvBAn7kyhdSDN9OckVH
+mGkG6qBi5tMYdzycQb0qRecT3sFqzSFNZpi4t79HAcSFptmLulwWoPbp8IkLreDN
+PrMrvdHYYPSpHA8PSnGH9p27a66HfXgbbLTcWy2dzyrmL81ih8/cuD77TIk1Ah0A
+yL1a7SvEG+rkl75NeWJjKDIprkT8oo7C+yEnaQKCAQBYt1CMAhv8m2fVhk0ZmGuJ
+/o0IfI76rGrYHgCOvDdNQyuYRu1q99agc2SgkJMTXRnNZNmqtVarN/K0rxWcbtdF
+8x+2Mx2JdMqDhqYbzC80ILdq3fpai5ZixnHnQ9Zcc7JGIUQ1yZcOLLO/Pb81xmYo
+gN2Ugj8kXexOOfYe3OnAAgR24RXVifJj0ToyI/SN4xoe+jnNIcB1JhO7R4FndOHE
+LLJb6wgpED3r7IFS0KsY5v5RS7q51UoCPyxq5IGwhssZ/+qvDzq7+pJluqv6R5jq
+jNKwIId4UxQiEbG/hr0TRdwBfStUuBgW2I7kPK5dJEAKYKCYdgCW/KI/4TnEOzg3
+BB4CHHOCC9vc0Sw+aRYwfowxY8VNL972eXm5m8pKi8Q=
+-----END PRIVATE KEY-----
diff --git a/test/recipes/04-test_pem_read_depr_data/dsapublickey.pem b/test/recipes/04-test_pem_read_depr_data/dsapublickey.pem
new file mode 100644
index 0000000000..7d8b88fc97
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/dsapublickey.pem
@@ -0,0 +1,20 @@
+-----BEGIN PUBLIC KEY-----
+MIIDQjCCAjUGByqGSM44BAEwggIoAoIBAQCQJVsgRrrvAlhvE8lGYD41hjrsZ+S0
+2CBrFuExov6PJHtTW4+k4Rr+1MGCqXjTOPdb5A5F69Y6OjgQLEKlaa20bzWvX6OG
+Ub9rcGT4IkH4JnD5kLw0FdXjq/Ter4xHcCMs6v+T+yAFptVzojgrogULlmaXBLT7
+wXhW506riUuodlcWnz0AlaIeG09twP6Nhi2sv7cxPuvBAn7kyhdSDN9OckVHmGkG
+6qBi5tMYdzycQb0qRecT3sFqzSFNZpi4t79HAcSFptmLulwWoPbp8IkLreDNPrMr
+vdHYYPSpHA8PSnGH9p27a66HfXgbbLTcWy2dzyrmL81ih8/cuD77TIk1Ah0AyL1a
+7SvEG+rkl75NeWJjKDIprkT8oo7C+yEnaQKCAQBYt1CMAhv8m2fVhk0ZmGuJ/o0I
+fI76rGrYHgCOvDdNQyuYRu1q99agc2SgkJMTXRnNZNmqtVarN/K0rxWcbtdF8x+2
+Mx2JdMqDhqYbzC80ILdq3fpai5ZixnHnQ9Zcc7JGIUQ1yZcOLLO/Pb81xmYogN2U
+gj8kXexOOfYe3OnAAgR24RXVifJj0ToyI/SN4xoe+jnNIcB1JhO7R4FndOHELLJb
+6wgpED3r7IFS0KsY5v5RS7q51UoCPyxq5IGwhssZ/+qvDzq7+pJluqv6R5jqjNKw
+IId4UxQiEbG/hr0TRdwBfStUuBgW2I7kPK5dJEAKYKCYdgCW/KI/4TnEOzg3A4IB
+BQACggEAGkVenUtTdSt8uK1jmc/98IVmMCVG6qijYqdF+0zSrtnY3+cSPXmiZwWS
+qcvs07ILw2zzdXBc5eIG09fjeRA0T7s9Qv+qVymX8EcBEsuTKXSaN2Xnf42J/190
+dMqu5koQkX9xeb5IajGsVqMupjmoASEDMoV/wbLdgtzhCupnRgn6BpesQa+UZY0W
+y5HQYfYmH4DmiPjCXJFB1dNCieDs00cbf+JFxAMIfcsi9azUM2MFREn0Qx9vC25n
+JLzh6pQnOihiuM+VZN0aRvdAqn+X2yjg5srIr/TxnWO3brhc0prbHJRO4eKu1eXA
+1QOteLKdbqIl/kVrvcEpZR8/YOdiaQ==
+-----END PUBLIC KEY-----
diff --git a/test/recipes/04-test_pem_read_depr_data/rsaprivatekey.pem b/test/recipes/04-test_pem_read_depr_data/rsaprivatekey.pem
new file mode 100644
index 0000000000..6510b6bfb8
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/rsaprivatekey.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDIqX89TliznVAA
+GSBKmk1HNe4xtmRnJFzyBtWfOvE6uY7mymEoj048jRacaXPLG8LRSchBNiB+nVm2
+KEro4ho6mXjHJ+0OXx8UbBDQyloqIpYrBL0I5vBoydNqLwtAocdmmtOzaz6ggzNw
+ZL2oB7tNbmFKfcda9zsDYIHei3vyvb5yzseWjh0T6iA27TkM3wq+xboUiDGkfzdM
+gOsMr7DQrYBUQL6Nj7bnKt0BFuqfBO0ZGwpXCQRDt3KluTa28pVgudJFuU0EQEzz
+bjRYX3KtnN+fTxHIrh1K/uRRO7rngnWLLn1VbGXwsLVxfge2zwRSi352GSd0WiGk
+tZUaOu2dAgMBAAECggEAJ1Q5UR3C+ulRXcOO9bBKhzOFzQ6PnTueT/2Q7xWRZE4s
+OQXfhyCXV/zbOqrcfCmjxHtumYFvWwGiLLa2//AY7fVYm8gyiUeRguIvZYzToUCI
+KERUfKMu6YrtOfmgffl3aJ/d8GOLsdAlS9ki5wUk6+c/gGcopKaiVWYb7i9uisPW
+3zOotzrWQkpUekwnTxTIgyPqY3FzN4NF6zKw1Pk4zQ8TQ7XFoENeF7qQgIsiNdlz
+UdStD9lx0hLof0B2TelNWDjL0IQKHXf4FZy+JoDyotoy3WgFPbowSr3j15cDbA6j
+hdbGIduFNxpuFr6tl/P4VDvfqxqn+qo7+Rym93TeoQKBgQDrrDV58NY07UBb0y/9
+NyyQwvTYMR/q4a2A5RuJkEp7/K3ywWyWpZcxQJYH7ZNJMMmRIi5srTuF1N2UexW5
+MFDZuz9nmHkqy+xCO+mues3PyRjTIf60YFhwH8lEZbBZYJKKlHIYdeG6pGHqZGa6
+gmIKvEmPz8JWKirSJg/TfEcMKQKBgQDZ+DvVZG/UmOPJra/E2S7eCJAFE9IC8LAp
+bhmqmHm9GnkUTd7U5bLrblN1IaG/519t1go74GaP9gVxdyue4ZR0XdPIJFW0iRUr
+/P8yRkJFw5hIhr45xyH/a8dhbiDV1jedOkCraZ+IyXR0+GNydhBLjgCkyjTgDSzO
+ezoc+UFEVQKBgQDTWWO30LD5VA9UigdOaW2RARV80ElUZkEoB87zRjBWEtuYibgt
+PaFibQ5fW8Krb5JEksfZdF2d/rEcGGn54weOy6rn58g6BhkBqSM+8yihgDHAHouC
+DakiHI9txFgrPz0MBGZx4z2lGQgqoRGzj3wHLqY1z1bz2Or//VxSB/DbSQKBgQDG
+etkZJn0CrTn3IvaEHHQl8MwcI4E/9iWjhENQ6ckpHlsU1xfK62LyKSNL7JUaZzip
+jpcBEQSzoIYyXR7WbXk+QVYg0J1OaOljhdxnzjx4xHP9ztyXRjI6IM2Mdbjmn0tD
+G5FZxTNlXnRyMuBzkPijpCoH5K0jPDwJxYIUchAxhQKBgE+Hr8I5gUzrLrhqsS3e
+mcRNNpzJ1jGsrQ8pjd2vGNa3+WCkvSBMj91WCpoIBvYXSX2q6XqDxqbwZogbP/Gs
+XgvrHwX7s4H1r2klreAsblhzFUkQsnhDBhi0HizVNrYeyDHVxfZaSHF4fJT5wPGl
+lNVmVn42G54e1Cq38XWm4A12
+-----END PRIVATE KEY-----
diff --git a/test/recipes/04-test_pem_read_depr_data/rsapublickey.pem b/test/recipes/04-test_pem_read_depr_data/rsapublickey.pem
new file mode 100644
index 0000000000..ac2df8a51e
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/rsapublickey.pem
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyKl/PU5Ys51QABkgSppN
+RzXuMbZkZyRc8gbVnzrxOrmO5sphKI9OPI0WnGlzyxvC0UnIQTYgfp1ZtihK6OIa
+Opl4xyftDl8fFGwQ0MpaKiKWKwS9CObwaMnTai8LQKHHZprTs2s+oIMzcGS9qAe7
+TW5hSn3HWvc7A2CB3ot78r2+cs7Hlo4dE+ogNu05DN8KvsW6FIgxpH83TIDrDK+w
+0K2AVEC+jY+25yrdARbqnwTtGRsKVwkEQ7dypbk2tvKVYLnSRblNBEBM8240WF9y
+rZzfn08RyK4dSv7kUTu654J1iy59VWxl8LC1cX4Hts8EUot+dhkndFohpLWVGjrt
+nQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/test/recipes/04-test_pem_read_depr_data/x942params.pem b/test/recipes/04-test_pem_read_depr_data/x942params.pem
new file mode 100644
index 0000000000..f4575d5605
--- /dev/null
+++ b/test/recipes/04-test_pem_read_depr_data/x942params.pem
@@ -0,0 +1,14 @@
+-----BEGIN X9.42 DH PARAMETERS-----
+MIICLAKCAQEAyT1xEPjk7PmoJKqVWgn//oVibfMGT9eYVcVOBpdvHK5bUPDO2c3Q
+IoClYdbKfiiyAGCTIsykTI+SaY4x3PsK2G5H2kk/+WjY1Qt3D60I0ltGhJZ9HH0Z
+XTZ+XE58MDUPplkVeOiwgZSzUi4Cr6MhkD10ixJfH3TfrZaKsDUV76JeBiXTuYxR
+TUQoeb196h0VvjsbLkAgmNR0y/z/jlxhYrJGulYHAEB1qZzFwR7puja5HkBlrcbP
+Sm79jIrWTP535zHpkPp7HggjBVUTlXm2fEPEy3IxjeS2IZls4jAlU7gBajWTn5x1
+xB8puPwR3bEM3KwOtrOB7LxyeSAi7ZsuDwKCAQBeX1BH6sLltd2PfF/LLl5c87pA
+NIoluZqpx7YTyTwjuKyzbCcl/12AMsXJPsRcOJToZlyfjiWqO0VHEE2BMLEEDV3J
+xnKCGyxqWGDohtJvGnMQtLFG8fIDroY6pGxZvCMcX9lsFhcx6V613Livv9krGpJk
+E6uJeybPYlKxznnsd0C38fF6csGQ6XA5Jk2ZMY4NUDRWKPpYn5R/aUf9QCmXEaQg
+U2tb6a/GldEoB6oKad/2QwoCkzOhSOrVkzNq370hC9kdkY2jS6H+D6Vb1Kht2HvE
+SqoGzlAULgju9EwRHhKQYHjl9Hvf0b6xiy0COstxXi7TlSAXNQ+wvxRdOOVyAiEA
+2Y0jIv7Bg/ezKBIDgHS6DNMiVjpK3IQyKoKMdKiWdLc=
+-----END X9.42 DH PARAMETERS-----
diff --git a/test/recipes/66-test_ossl_store.t b/test/recipes/66-test_ossl_store.t
index 634b0e76a8..08d66977a5 100644
--- a/test/recipes/66-test_ossl_store.t
+++ b/test/recipes/66-test_ossl_store.t
@@ -10,10 +10,11 @@ use strict;
use warnings;
use OpenSSL::Test::Simple;
-use OpenSSL::Test qw/:DEFAULT srctop_file/;
+use OpenSSL::Test qw/:DEFAULT srctop_file data_dir/;
setup("test_ossl_store");
plan tests => 1;
-ok(run(test(["ossl_store_test", "-in", srctop_file("test", "testrsa.pem")])));
+ok(run(test(["ossl_store_test", "-in", srctop_file("test", "testrsa.pem"),
+ "-data", data_dir()])));
diff --git a/test/recipes/66-test_ossl_store_data/DH-params.pem b/test/recipes/66-test_ossl_store_data/DH-params.pem
new file mode 100644
index 0000000000..21d1f61b59
--- /dev/null
+++ b/test/recipes/66-test_ossl_store_data/DH-params.pem
@@ -0,0 +1,8 @@
+-----BEGIN DH PARAMETERS-----
+MIIBCAKCAQEA/uDak+qLI40JfWdgM/eWp9Wg1yjCH1psOeyxSImj09DOdvOPKXhI
+vBjvwyw76vn+HDBg0R90FbA1VmJBXwFqm2qAytpySgPniFWRoIN38SWrZ7FwlXuO
+SPWgXxtRQCIuN7SfIvFoncQ41aa9rJTJ1VXNT22keTe8DbF8tZaALwiaTWmslNa/
++qI/1/a+R4/SqLmQQBFJ10NfNQ7w66tmzsL3mcoz1vOrl+mmOgKHiKaTnI7oiL8y
+qWbnCIdRUPVImNGur/oKRk7Ye/66cgras9WXjXRr5ExVh4+wBYTvJ2H7THRoBgts
+0g1y1Zu5uGJQttPbgC18guqH6NH6xPin+wIBAg==
+-----END DH PARAMETERS-----
diff --git a/test/recipes/66-test_ossl_store_data/DHX-params.pem b/test/recipes/66-test_ossl_store_data/DHX-params.pem
new file mode 100644
index 0000000000..f4575d5605
--- /dev/null
+++ b/test/recipes/66-test_ossl_store_data/DHX-params.pem
@@ -0,0 +1,14 @@
+-----BEGIN X9.42 DH PARAMETERS-----
+MIICLAKCAQEAyT1xEPjk7PmoJKqVWgn//oVibfMGT9eYVcVOBpdvHK5bUPDO2c3Q
+IoClYdbKfiiyAGCTIsykTI+SaY4x3PsK2G5H2kk/+WjY1Qt3D60I0ltGhJZ9HH0Z
+XTZ+XE58MDUPplkVeOiwgZSzUi4Cr6MhkD10ixJfH3TfrZaKsDUV76JeBiXTuYxR
+TUQoeb196h0VvjsbLkAgmNR0y/z/jlxhYrJGulYHAEB1qZzFwR7puja5HkBlrcbP
+Sm79jIrWTP535zHpkPp7HggjBVUTlXm2fEPEy3IxjeS2IZls4jAlU7gBajWTn5x1
+xB8puPwR3bEM3KwOtrOB7LxyeSAi7ZsuDwKCAQBeX1BH6sLltd2PfF/LLl5c87pA
+NIoluZqpx7YTyTwjuKyzbCcl/12AMsXJPsRcOJToZlyfjiWqO0VHEE2BMLEEDV3J
+xnKCGyxqWGDohtJvGnMQtLFG8fIDroY6pGxZvCMcX9lsFhcx6V613Livv9krGpJk
+E6uJeybPYlKxznnsd0C38fF6csGQ6XA5Jk2ZMY4NUDRWKPpYn5R/aUf9QCmXEaQg
+U2tb6a/GldEoB6oKad/2QwoCkzOhSOrVkzNq370hC9kdkY2jS6H+D6Vb1Kht2HvE
+SqoGzlAULgju9EwRHhKQYHjl9Hvf0b6xiy0COstxXi7TlSAXNQ+wvxRdOOVyAiEA
+2Y0jIv7Bg/ezKBIDgHS6DNMiVjpK3IQyKoKMdKiWdLc=
+-----END X9.42 DH PARAMETERS-----
diff --git a/test/recipes/66-test_ossl_store_data/DSA-params.pem b/test/recipes/66-test_ossl_store_data/DSA-params.pem
new file mode 100644
index 0000000000..7c4623269f
--- /dev/null
+++ b/test/recipes/66-test_ossl_store_data/DSA-params.pem
@@ -0,0 +1,14 @@
+-----BEGIN DSA PARAMETERS-----
+MIICKAKCAQEAkCVbIEa67wJYbxPJRmA+NYY67GfktNggaxbhMaL+jyR7U1uPpOEa
+/tTBgql40zj3W+QORevWOjo4ECxCpWmttG81r1+jhlG/a3Bk+CJB+CZw+ZC8NBXV
+46v03q+MR3AjLOr/k/sgBabVc6I4K6IFC5ZmlwS0+8F4VudOq4lLqHZXFp89AJWi
+HhtPbcD+jYYtrL+3MT7rwQJ+5MoXUgzfTnJFR5hpBuqgYubTGHc8nEG9KkXnE97B
+as0hTWaYuLe/RwHEhabZi7pcFqD26fCJC63gzT6zK73R2GD0qRwPD0pxh/adu2uu
+h314G2y03Fstnc8q5i/NYofP3Lg++0yJNQIdAMi9Wu0rxBvq5Je+TXliYygyKa5E
+/KKOwvshJ2kCggEAWLdQjAIb/Jtn1YZNGZhrif6NCHyO+qxq2B4Ajrw3TUMrmEbt
+avfWoHNkoJCTE10ZzWTZqrVWqzfytK8VnG7XRfMftjMdiXTKg4amG8wvNCC3at36
+WouWYsZx50PWXHOyRiFENcmXDiyzvz2/NcZmKIDdlII/JF3sTjn2HtzpwAIEduEV
+1YnyY9E6MiP0jeMaHvo5zSHAdSYTu0eBZ3ThxCyyW+sIKRA96+yBUtCrGOb+UUu6
+udVKAj8sauSBsIbLGf/qrw86u/qSZbqr+keY6ozSsCCHeFMUIhGxv4a9E0XcAX0r
+VLgYFtiO5DyuXSRACmCgmHYAlvyiP+E5xDs4Nw==
+-----END DSA PARAMETERS-----
More information about the openssl-commits
mailing list