summaryrefslogtreecommitdiffstats
path: root/crypto/encode_decode
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-09-07 12:25:17 +0200
committerRichard Levitte <levitte@openssl.org>2020-09-09 16:35:22 +0200
commit8ae40cf57d2138af92a3479e23f35037ae8c5c30 (patch)
tree18b15b731f9b593f93716e05884cb0b9ba0a54a5 /crypto/encode_decode
parentFix up issue on AIX caused by broken compiler handling of macro expansion (diff)
downloadopenssl-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.c7
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,