summaryrefslogtreecommitdiffstats
path: root/providers/implementations/encode_decode
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-02-05 18:51:37 +0100
committerTomas Mraz <tomas@openssl.org>2021-02-11 09:34:31 +0100
commitf5f29796f00b94d150087bc72469a4f60a67a23b (patch)
treeb1e64bf9f3b39d9a099e2b595ffc1b41cac5a175 /providers/implementations/encode_decode
parent2741128e9deeb7f6fd73f10a1c657c05433a41cb (diff)
Various cleanup of PROV_R_ reason codes
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14086)
Diffstat (limited to 'providers/implementations/encode_decode')
-rw-r--r--providers/implementations/encode_decode/decode_der2key.c2
-rw-r--r--providers/implementations/encode_decode/encode_key2any.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c
index a22e3a6406..09776127d4 100644
--- a/providers/implementations/encode_decode/decode_der2key.c
+++ b/providers/implementations/encode_decode/decode_der2key.c
@@ -87,7 +87,7 @@ static int der_from_p8(unsigned char **new_der, long *new_der_len,
size_t plen = 0;
if (!pw_cb(pbuf, sizeof(pbuf), &plen, NULL, pw_cbarg)) {
- ERR_raise(ERR_LIB_PROV, PROV_R_READ_KEY);
+ ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PASSPHRASE);
} else {
const X509_ALGOR *alg = NULL;
const ASN1_OCTET_STRING *oct = NULL;
diff --git a/providers/implementations/encode_decode/encode_key2any.c b/providers/implementations/encode_decode/encode_key2any.c
index a8c9432f2d..8f868249ee 100644
--- a/providers/implementations/encode_decode/encode_key2any.c
+++ b/providers/implementations/encode_decode/encode_key2any.c
@@ -96,7 +96,7 @@ static X509_SIG *p8info_to_encp8(PKCS8_PRIV_KEY_INFO *p8info,
if (!ossl_pw_get_passphrase(kstr, sizeof(kstr), &klen, NULL, 1,
&ctx->pwdata)) {
- ERR_raise(ERR_LIB_PROV, PROV_R_READ_KEY);
+ ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PASSPHRASE);
return NULL;
}
/* First argument == -1 means "standard" */