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/x509/x_pubkey.c | |
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/x509/x_pubkey.c')
-rw-r--r-- | crypto/x509/x_pubkey.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c index 59f4a14895..cb47f917ad 100644 --- a/crypto/x509/x_pubkey.c +++ b/crypto/x509/x_pubkey.c @@ -22,7 +22,7 @@ #include "crypto/x509.h" #include <openssl/rsa.h> #include <openssl/dsa.h> -#include <openssl/serializer.h> +#include <openssl/encoder.h> struct X509_pubkey_st { X509_ALGOR *algor; @@ -97,18 +97,18 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) } } else if (pkey->keymgmt != NULL) { BIO *bmem = BIO_new(BIO_s_mem()); - const char *serprop = OSSL_SERIALIZER_PUBKEY_TO_DER_PQ; - OSSL_SERIALIZER_CTX *sctx = - OSSL_SERIALIZER_CTX_new_by_EVP_PKEY(pkey, serprop); + const char *encprop = OSSL_ENCODER_PUBKEY_TO_DER_PQ; + OSSL_ENCODER_CTX *ectx = + OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, encprop); - if (OSSL_SERIALIZER_to_bio(sctx, bmem)) { + if (OSSL_ENCODER_to_bio(ectx, bmem)) { const unsigned char *der = NULL; long derlen = BIO_get_mem_data(bmem, (char **)&der); pk = d2i_X509_PUBKEY(NULL, &der, derlen); } - OSSL_SERIALIZER_CTX_free(sctx); + OSSL_ENCODER_CTX_free(ectx); BIO_free(bmem); } @@ -124,7 +124,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) /* * pk->pkey is NULL when using the legacy routine, but is non-NULL when - * going through the serializer, and for all intents and purposes, it's + * going through the encoder, and for all intents and purposes, it's * a perfect copy of |pkey|, just not the same instance. In that case, * we could simply return early, right here. * However, in the interest of being cautious leaning on paranoia, some @@ -303,16 +303,16 @@ int i2d_PUBKEY(const EVP_PKEY *a, unsigned char **pp) } X509_PUBKEY_free(xpk); } else if (a->keymgmt != NULL) { - const char *serprop = OSSL_SERIALIZER_PUBKEY_TO_DER_PQ; - OSSL_SERIALIZER_CTX *ctx = - OSSL_SERIALIZER_CTX_new_by_EVP_PKEY(a, serprop); + const char *encprop = OSSL_ENCODER_PUBKEY_TO_DER_PQ; + OSSL_ENCODER_CTX *ctx = + OSSL_ENCODER_CTX_new_by_EVP_PKEY(a, encprop); BIO *out = BIO_new(BIO_s_mem()); BUF_MEM *buf = NULL; if (ctx != NULL && out != NULL - && OSSL_SERIALIZER_CTX_get_serializer(ctx) != NULL - && OSSL_SERIALIZER_to_bio(ctx, out) + && OSSL_ENCODER_CTX_get_encoder(ctx) != NULL + && OSSL_ENCODER_to_bio(ctx, out) && BIO_get_mem_ptr(out, &buf) > 0) { ret = buf->length; @@ -328,7 +328,7 @@ int i2d_PUBKEY(const EVP_PKEY *a, unsigned char **pp) } } BIO_free(out); - OSSL_SERIALIZER_CTX_free(ctx); + OSSL_ENCODER_CTX_free(ctx); } return ret; |