diff options
author | Richard Levitte <levitte@openssl.org> | 2020-08-16 21:25:08 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-08-21 09:23:58 +0200 |
commit | ece9304c96f71277ca95696d9bc49fdec51e9f17 (patch) | |
tree | 7038f8760e1538754bc67371cb5a466a83935dad /crypto/evp | |
parent | f650993f1de3dbb5eda9009ad0c4895a7b1b7fe2 (diff) |
Rename OSSL_SERIALIZER / OSSL_DESERIALIZER to OSSL_ENCODE / OSSL_DECODE
Fixes #12455
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12660)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/p_lib.c | 20 | ||||
-rw-r--r-- | crypto/evp/pmeth_gn.c | 1 |
2 files changed, 10 insertions, 11 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index bee6337a88..7a79816788 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -29,7 +29,7 @@ #include <openssl/engine.h> #include <openssl/params.h> #include <openssl/param_build.h> -#include <openssl/serializer.h> +#include <openssl/encoder.h> #include <openssl/core_names.h> #include "crypto/asn1.h" @@ -1143,23 +1143,23 @@ static int unsup_alg(BIO *out, const EVP_PKEY *pkey, int indent, } static int print_pkey(const EVP_PKEY *pkey, BIO *out, int indent, - const char *propquery /* For provided serialization */, + const char *propquery /* For provided encoding */, int (*legacy_print)(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx), ASN1_PCTX *legacy_pctx /* For legacy print */) { int pop_f_prefix; long saved_indent; - OSSL_SERIALIZER_CTX *ctx = NULL; + OSSL_ENCODER_CTX *ctx = NULL; int ret = -2; /* default to unsupported */ if (!print_set_indent(&out, &pop_f_prefix, &saved_indent, indent)) return 0; - ctx = OSSL_SERIALIZER_CTX_new_by_EVP_PKEY(pkey, propquery); - if (OSSL_SERIALIZER_CTX_get_serializer(ctx) != NULL) - ret = OSSL_SERIALIZER_to_bio(ctx, out); - OSSL_SERIALIZER_CTX_free(ctx); + ctx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, propquery); + if (OSSL_ENCODER_CTX_get_encoder(ctx) != NULL) + ret = OSSL_ENCODER_to_bio(ctx, out); + OSSL_ENCODER_CTX_free(ctx); if (ret != -2) goto end; @@ -1178,7 +1178,7 @@ static int print_pkey(const EVP_PKEY *pkey, BIO *out, int indent, int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) { - return print_pkey(pkey, out, indent, OSSL_SERIALIZER_PUBKEY_TO_TEXT_PQ, + return print_pkey(pkey, out, indent, OSSL_ENCODER_PUBKEY_TO_TEXT_PQ, (pkey->ameth != NULL ? pkey->ameth->pub_print : NULL), pctx); } @@ -1186,7 +1186,7 @@ int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) { - return print_pkey(pkey, out, indent, OSSL_SERIALIZER_PrivateKey_TO_TEXT_PQ, + return print_pkey(pkey, out, indent, OSSL_ENCODER_PrivateKey_TO_TEXT_PQ, (pkey->ameth != NULL ? pkey->ameth->priv_print : NULL), pctx); } @@ -1194,7 +1194,7 @@ int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) { - return print_pkey(pkey, out, indent, OSSL_SERIALIZER_Parameters_TO_TEXT_PQ, + return print_pkey(pkey, out, indent, OSSL_ENCODER_Parameters_TO_TEXT_PQ, (pkey->ameth != NULL ? pkey->ameth->param_print : NULL), pctx); } diff --git a/crypto/evp/pmeth_gn.c b/crypto/evp/pmeth_gn.c index 1ab309329d..2f9346d998 100644 --- a/crypto/evp/pmeth_gn.c +++ b/crypto/evp/pmeth_gn.c @@ -27,7 +27,6 @@ /* TODO(3.0) remove when provider SM2 key generation is implemented */ #ifdef TMP_SM2_HACK # include <openssl/ec.h> -# include <openssl/serializer.h> # include "internal/sizes.h" #endif |