summaryrefslogtreecommitdiffstats
path: root/crypto/pem
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-07-10 15:08:29 +0200
committerRichard Levitte <levitte@openssl.org>2020-07-24 16:43:20 +0200
commit45396db0e3bfd796e89669baf3a3ecc9602d36d5 (patch)
tree60843db25f88d3049fef12880689c5a35b87f82e /crypto/pem
parent5a23d78c9b141e31ab9b7d551b2125b124a75e49 (diff)
SERIALIZER: No enc argument for OSSL_SERIALIZER_CTX_set_passphrase_cb()
Serialization will only encrypt, so there's no point telling OSSL_SERIALIZER_CTX_set_passphrase_cb() that's going to happen. We fix the declaration of OSSL_DESERIALIZER_CTX_set_passphrase_cb() the same way. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12410)
Diffstat (limited to 'crypto/pem')
-rw-r--r--crypto/pem/pem_local.h2
-rw-r--r--crypto/pem/pem_pk8.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/crypto/pem/pem_local.h b/crypto/pem/pem_local.h
index 3b501abde7..9563925f73 100644
--- a/crypto/pem/pem_local.h
+++ b/crypto/pem/pem_local.h
@@ -45,7 +45,7 @@
&& !OSSL_SERIALIZER_CTX_set_passphrase(ctx, kstr, klen)) \
ret = 0; \
else if (cb != NULL \
- && !OSSL_SERIALIZER_CTX_set_passphrase_cb(ctx, 1, \
+ && !OSSL_SERIALIZER_CTX_set_passphrase_cb(ctx, \
cb, u)) \
ret = 0; \
} \
diff --git a/crypto/pem/pem_pk8.c b/crypto/pem/pem_pk8.c
index 8dbcb65bf7..12a25b7a82 100644
--- a/crypto/pem/pem_pk8.c
+++ b/crypto/pem/pem_pk8.c
@@ -109,8 +109,7 @@ static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid,
&& !OSSL_SERIALIZER_CTX_set_passphrase(ctx, ukstr, klen))
ret = 0;
else if (cb != NULL
- && !OSSL_SERIALIZER_CTX_set_passphrase_cb(ctx, 1,
- cb, u))
+ && !OSSL_SERIALIZER_CTX_set_passphrase_cb(ctx, cb, u))
ret = 0;
}
}