diff options
author | Richard Levitte <levitte@openssl.org> | 2020-09-07 12:25:17 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-09-09 16:35:22 +0200 |
commit | 8ae40cf57d2138af92a3479e23f35037ae8c5c30 (patch) | |
tree | 18b15b731f9b593f93716e05884cb0b9ba0a54a5 /crypto/encode_decode | |
parent | Fix up issue on AIX caused by broken compiler handling of macro expansion (diff) | |
download | openssl-8ae40cf57d2138af92a3479e23f35037ae8c5c30.tar.xz openssl-8ae40cf57d2138af92a3479e23f35037ae8c5c30.zip |
ENCODER: Refactor provider implementations, and some cleanup
The encoder implementations were implemented by unnecessarily copying
code into numerous topical source files, making them hard to maintain.
This changes merges all those into two source files, one that encodes
into DER and PEM, the other to text.
Diverse small cleanups are included.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12803)
Diffstat (limited to 'crypto/encode_decode')
-rw-r--r-- | crypto/encode_decode/encoder_pkey.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/encode_decode/encoder_pkey.c b/crypto/encode_decode/encoder_pkey.c index 176f4fab95..76b8386e0c 100644 --- a/crypto/encode_decode/encoder_pkey.c +++ b/crypto/encode_decode/encoder_pkey.c @@ -40,12 +40,7 @@ int OSSL_ENCODER_CTX_set_passphrase(OSSL_ENCODER_CTX *ctx, const unsigned char *kstr, size_t klen) { - OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END }; - - params[0] = OSSL_PARAM_construct_octet_string(OSSL_ENCODER_PARAM_PASS, - (void *)kstr, klen); - - return OSSL_ENCODER_CTX_set_params(ctx, params); + return ossl_pw_set_passphrase(&ctx->pwdata, kstr, klen); } int OSSL_ENCODER_CTX_set_passphrase_ui(OSSL_ENCODER_CTX *ctx, |