summaryrefslogtreecommitdiffstats
path: root/crypto/pem/pem_pk8.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-17 08:55:39 +0200
committerRichard Levitte <levitte@openssl.org>2020-11-11 12:43:27 +0100
commit4227e504c894db14d06be7180d0b4e7f6fe4ac2c (patch)
treef9b487eb1d670c430e4a8492e03d77dff4606b05 /crypto/pem/pem_pk8.c
parentPROV: Re-implement all the keypair encoders (diff)
downloadopenssl-4227e504c894db14d06be7180d0b4e7f6fe4ac2c.tar.xz
openssl-4227e504c894db14d06be7180d0b4e7f6fe4ac2c.zip
Adapt libcrypto functionality to specify the desired output structure
This also modifies i2d_PublicKey() and i2d_KeyParams() to support provided keys. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13167)
Diffstat (limited to 'crypto/pem/pem_pk8.c')
-rw-r--r--crypto/pem/pem_pk8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/pem/pem_pk8.c b/crypto/pem/pem_pk8.c
index 2abf687cbd..797c9881d8 100644
--- a/crypto/pem/pem_pk8.c
+++ b/crypto/pem/pem_pk8.c
@@ -74,8 +74,8 @@ static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid,
int ret = 0;
const char *outtype = isder ? "DER" : "PEM";
OSSL_ENCODER_CTX *ctx =
- OSSL_ENCODER_CTX_new_by_EVP_PKEY(x, outtype, OSSL_KEYMGMT_SELECT_ALL,
- libctx, propq);
+ OSSL_ENCODER_CTX_new_by_EVP_PKEY(x, OSSL_KEYMGMT_SELECT_ALL,
+ outtype, "pkcs8", libctx, propq);
if (ctx == NULL)
return 0;