aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-11-18 01:29:06 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-29 20:54:48 +0100
commit0d003c52d3dcf4b076bb01a6767cdd5ace2d79f6 (patch)
treec04a81334735f506d3c94a3591e224683feb78ad /util
parent36fa4d8a0df9dc168047fadd0365966c7116b31d (diff)
downloadopenssl-0d003c52d3dcf4b076bb01a6767cdd5ace2d79f6.zip
openssl-0d003c52d3dcf4b076bb01a6767cdd5ace2d79f6.tar.gz
openssl-0d003c52d3dcf4b076bb01a6767cdd5ace2d79f6.tar.bz2
SERIALIZER: New API for serialization of objects through providers
Serialization is needed to be able to take a provider object (such as the provider side key data) and output it in PEM form, DER form, text form (for display), and possibly other future forms (XML? JSON? JWK?) The idea is that a serializer should be able to handle objects it has intimate knowledge of, as well as object data in OSSL_PARAM form. The latter will allow libcrypto to serialize some object with a different provider than the one holding the data, if exporting of that data is allowed and there is a serializer that can handle it. We will provide serializers for the types of objects we know about, which should be useful together with any other provider that provides implementations of the same type of object. Serializers are selected by method name and a couple of additional properties: - format used to tell what format the output should be in. Possibilities could include "format=text", "format=pem", "format=der", "format=pem-pkcs1" (traditional), "format=der-pkcs1" (traditional) - type used to tell exactly what type of data should be output, for example "type=public" (the public part of a key), "type=private" (the private part of a key), "type=domainparams" (domain parameters). This also adds a passphrase callback function type, OSSL_PASSPHRASE_CALLBACK, which is a bit like OSSL_CALLBACK, but it takes a few extra arguments to place the result in. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10394)
Diffstat (limited to 'util')
-rw-r--r--util/libcrypto.num14
-rw-r--r--util/other.syms2
2 files changed, 16 insertions, 0 deletions
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 0c2dc2c..5f24657 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -4878,3 +4878,17 @@ EVP_PKEY_meth_set_digestsign ? 3_0_0 EXIST::FUNCTION:
EVP_PKEY_meth_set_digestverify ? 3_0_0 EXIST::FUNCTION:
EVP_PKEY_meth_get_digestsign ? 3_0_0 EXIST::FUNCTION:
EVP_PKEY_meth_get_digestverify ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_up_ref ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_free ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_fetch ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_number ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_is_a ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_provider ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_do_all_provided ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_names_do_all ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_settable_ctx_params ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_CTX_new ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_CTX_get_serializer ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_CTX_set_params ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_CTX_free ? 3_0_0 EXIST::FUNCTION:
+OSSL_SERIALIZER_properties ? 3_0_0 EXIST::FUNCTION:
diff --git a/util/other.syms b/util/other.syms
index c5575ac..080244c 100644
--- a/util/other.syms
+++ b/util/other.syms
@@ -36,6 +36,8 @@ OPENSSL_CTX datatype
NAMING_AUTHORITY datatype
OSSL_PARAM datatype
OSSL_PROVIDER datatype
+OSSL_SERIALIZER datatype
+OSSL_SERIALIZER_CTX datatype
OSSL_STORE_CTX datatype
OSSL_STORE_INFO datatype
OSSL_STORE_LOADER datatype