diff options
author | Richard Levitte <levitte@openssl.org> | 2020-07-23 16:56:59 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-09-03 17:48:32 +0200 |
commit | 16feca71544681cabf873fecd3f860f9853bdf07 (patch) | |
tree | a1dce6397911d95de73f10208b65dbba04526ac6 /include | |
parent | bd7a6f16eb52c5c022b2555810efd99006db0a02 (diff) |
STORE: Move the built-in 'file:' loader to become an engine module
From this point on, this engine must be specifically specified.
To replace the internal EMBEDDED hack with something unique for the
new module, functions to create application specific OSSL_STORE_INFO
types were added.
Furthermore, the following function had to be exported:
ossl_do_blob_header()
ossl_do_PVK_header()
asn1_d2i_read_bio()
Finally, evp_pkcs82pkey_int() has become public under a new name,
EVP_PKCS82PKEY_with_libctx()
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12587)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/asn1.h | 2 | ||||
-rw-r--r-- | include/crypto/evp.h | 2 | ||||
-rw-r--r-- | include/internal/asn1.h | 15 | ||||
-rw-r--r-- | include/openssl/store.h | 2 | ||||
-rw-r--r-- | include/openssl/x509.h | 2 |
5 files changed, 19 insertions, 4 deletions
diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h index 041642f022..624df3cb05 100644 --- a/include/crypto/asn1.h +++ b/include/crypto/asn1.h @@ -124,5 +124,3 @@ struct asn1_pctx_st { unsigned long oid_flags; unsigned long str_flags; } /* ASN1_PCTX */ ; - -int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb); diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 634eb86425..b00634234c 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -763,8 +763,6 @@ int pkcs5_pbkdf2_hmac_with_libctx(const char *pass, int passlen, int evp_pkey_ctx_set_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); int evp_pkey_ctx_get_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); -EVP_PKEY *evp_pkcs82pkey_int(const PKCS8_PRIV_KEY_INFO *p8, OPENSSL_CTX *libctx, - const char *propq); EVP_MD_CTX *evp_md_ctx_new_with_libctx(EVP_PKEY *pkey, const ASN1_OCTET_STRING *id, OPENSSL_CTX *libctx, const char *propq); diff --git a/include/internal/asn1.h b/include/internal/asn1.h new file mode 100644 index 0000000000..8448786919 --- /dev/null +++ b/include/internal/asn1.h @@ -0,0 +1,15 @@ +/* + * 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 + */ + +#ifndef OSSL_INTERNAL_ASN1_H +# define OSSL_INTERNAL_ASN1_H + +int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb); + +#endif diff --git a/include/openssl/store.h b/include/openssl/store.h index 9a2b423371..b2201cacaa 100644 --- a/include/openssl/store.h +++ b/include/openssl/store.h @@ -151,6 +151,7 @@ OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bio, const char *scheme, * In all cases, ownership of the object is transferred to the OSSL_STORE_INFO * and will therefore be freed when the OSSL_STORE_INFO is freed. */ +OSSL_STORE_INFO *OSSL_STORE_INFO_new(int type, void *data); OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name); int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc); OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params); @@ -163,6 +164,7 @@ OSSL_STORE_INFO *OSSL_STORE_INFO_new_CRL(X509_CRL *crl); * Functions to try to extract data from a OSSL_STORE_INFO. */ int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info); +void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info); const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info); char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info); const char *OSSL_STORE_INFO_get0_NAME_description(const OSSL_STORE_INFO *info); diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 9aef28c954..d243fda94c 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -1035,6 +1035,8 @@ X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8); +EVP_PKEY *EVP_PKCS82PKEY_with_libctx(const PKCS8_PRIV_KEY_INFO *p8, + OPENSSL_CTX *libctx, const char *propq); PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey); int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, |