summaryrefslogtreecommitdiff
path: root/lib/libcrypto/pkcs12
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-05-13 14:28:15 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-05-13 14:28:15 +0000
commit023cbe0a1583342891f13c13f1888d026ec7869f (patch)
treee797a8079d28eb9c1024eedf9c22938997a1d4c2 /lib/libcrypto/pkcs12
parentafcd608a40944e76a048cb2fcecea428fd761197 (diff)
Add const qualifiers to the X509_SIG * and char * arguments of
PKCS8_decrypt(3). tested in a bulk build by sthen ok beck, jsing
Diffstat (limited to 'lib/libcrypto/pkcs12')
-rw-r--r--lib/libcrypto/pkcs12/p12_p8d.c4
-rw-r--r--lib/libcrypto/pkcs12/pkcs12.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/libcrypto/pkcs12/p12_p8d.c b/lib/libcrypto/pkcs12/p12_p8d.c
index 68af6bf5b53..0286d4acf54 100644
--- a/lib/libcrypto/pkcs12/p12_p8d.c
+++ b/lib/libcrypto/pkcs12/p12_p8d.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p12_p8d.c,v 1.6 2016/12/30 15:34:35 jsing Exp $ */
+/* $OpenBSD: p12_p8d.c,v 1.7 2018/05/13 14:28:14 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2001.
*/
@@ -61,7 +61,7 @@
#include <openssl/pkcs12.h>
PKCS8_PRIV_KEY_INFO *
-PKCS8_decrypt(X509_SIG *p8, const char *pass, int passlen)
+PKCS8_decrypt(const X509_SIG *p8, const char *pass, int passlen)
{
return PKCS12_item_decrypt_d2i(p8->algor,
&PKCS8_PRIV_KEY_INFO_it, pass, passlen, p8->digest, 1);
diff --git a/lib/libcrypto/pkcs12/pkcs12.h b/lib/libcrypto/pkcs12/pkcs12.h
index 9c2048e7d70..64a70f28e4c 100644
--- a/lib/libcrypto/pkcs12/pkcs12.h
+++ b/lib/libcrypto/pkcs12/pkcs12.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkcs12.h,v 1.22 2018/05/13 14:24:07 tb Exp $ */
+/* $OpenBSD: pkcs12.h,v 1.23 2018/05/13 14:28:14 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -178,7 +178,8 @@ X509_CRL *PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag);
PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it,
int nid1, int nid2);
PKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG(PKCS8_PRIV_KEY_INFO *p8);
-PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(X509_SIG *p8, const char *pass, int passlen);
+PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass,
+ int passlen);
PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag,
const char *pass, int passlen);
X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,