summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-02-11 16:57:37 +0100
committerTomas Mraz <tomas@openssl.org>2021-02-17 15:26:12 +0100
commitfe75766c9c2919f649df7b3ad209df2bc5e56dd0 (patch)
treee7be8f417b0102fffe05865c41a4fbf384993587 /apps
parente5ac413b2d3d6bcff57446f06f3d05650921f182 (diff)
Rename OSSL_ENCODER_CTX_new_by_EVP_PKEY and OSSL_DECODER_CTX_new_by_EVP_PKEY
Additional renames done in encoder and decoder implementation to follow the style. Fixes #13622 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14155)
Diffstat (limited to 'apps')
-rw-r--r--apps/dhparam.c22
-rw-r--r--apps/dsa.c4
-rw-r--r--apps/ec.c6
-rw-r--r--apps/ecparam.c4
-rw-r--r--apps/rsa.c6
5 files changed, 21 insertions, 21 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c
index 30fdfbbf6e..d3f96e61d2 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -254,14 +254,14 @@ int dhparam_main(int argc, char **argv)
* We check that we got one of those key types afterwards.
*/
decoderctx
- = OSSL_DECODER_CTX_new_by_EVP_PKEY(&tmppkey,
- (informat == FORMAT_ASN1)
+ = OSSL_DECODER_CTX_new_for_pkey(&tmppkey,
+ (informat == FORMAT_ASN1)
? "DER" : "PEM",
- NULL,
- (informat == FORMAT_ASN1)
+ NULL,
+ (informat == FORMAT_ASN1)
? keytype : NULL,
- OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS,
- NULL, NULL);
+ OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS,
+ NULL, NULL);
if (decoderctx != NULL
&& !OSSL_DECODER_from_bio(decoderctx, in)
@@ -328,11 +328,11 @@ int dhparam_main(int argc, char **argv)
if (!noout) {
OSSL_ENCODER_CTX *ectx =
- OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey,
- OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS,
- outformat == FORMAT_ASN1
- ? "DER" : "PEM",
- NULL, NULL);
+ OSSL_ENCODER_CTX_new_for_pkey(pkey,
+ OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS,
+ outformat == FORMAT_ASN1
+ ? "DER" : "PEM",
+ NULL, NULL);
if (ectx == NULL || !OSSL_ENCODER_to_bio(ectx, out)) {
OSSL_ENCODER_CTX_free(ectx);
diff --git a/apps/dsa.c b/apps/dsa.c
index c4baaf7de9..523dab80fc 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -260,8 +260,8 @@ int dsa_main(int argc, char **argv)
}
/* Perform the encoding */
- ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, selection, output_type,
- output_structure, NULL);
+ ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, output_type,
+ output_structure, NULL);
if (OSSL_ENCODER_CTX_get_num_encoders(ectx) == 0) {
BIO_printf(bio_err, "%s format not supported\n", output_type);
goto end;
diff --git a/apps/ec.c b/apps/ec.c
index d89c580020..490a64122b 100644
--- a/apps/ec.c
+++ b/apps/ec.c
@@ -256,9 +256,9 @@ int ec_main(int argc, char **argv)
assert(private);
}
- ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(eckey, selection,
- output_type, output_structure,
- NULL);
+ ectx = OSSL_ENCODER_CTX_new_for_pkey(eckey, selection,
+ output_type, output_structure,
+ NULL);
if (enc != NULL) {
OSSL_ENCODER_CTX_set_cipher(ectx, EVP_CIPHER_name(enc), NULL);
if (passout != NULL)
diff --git a/apps/ecparam.c b/apps/ecparam.c
index e05a3a495f..fc19ab6bf9 100644
--- a/apps/ecparam.c
+++ b/apps/ecparam.c
@@ -292,7 +292,7 @@ int ecparam_main(int argc, char **argv)
noout = 1;
if (!noout) {
- ectx_params = OSSL_ENCODER_CTX_new_by_EVP_PKEY(
+ ectx_params = OSSL_ENCODER_CTX_new_for_pkey(
params_key, OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS,
outformat == FORMAT_ASN1 ? "DER" : "PEM", NULL, NULL);
if (!OSSL_ENCODER_to_bio(ectx_params, out)) {
@@ -317,7 +317,7 @@ int ecparam_main(int argc, char **argv)
goto end;
}
assert(private);
- ectx_key = OSSL_ENCODER_CTX_new_by_EVP_PKEY(
+ ectx_key = OSSL_ENCODER_CTX_new_for_pkey(
key, OSSL_KEYMGMT_SELECT_ALL,
outformat == FORMAT_ASN1 ? "DER" : "PEM", NULL, NULL);
if (!OSSL_ENCODER_to_bio(ectx_key, out)) {
diff --git a/apps/rsa.c b/apps/rsa.c
index 1a75681c70..8658f58708 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -334,9 +334,9 @@ int rsa_main(int argc, char **argv)
}
/* Now, perform the encoding */
- ectx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, selection,
- output_type, output_structure,
- NULL);
+ ectx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection,
+ output_type, output_structure,
+ NULL);
if (OSSL_ENCODER_CTX_get_num_encoders(ectx) == 0) {
BIO_printf(bio_err, "%s format not supported\n", output_type);
goto end;