summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_add.c
diff options
context:
space:
mode:
authortb <>2022-08-03 20:16:06 +0000
committertb <>2022-08-03 20:16:06 +0000
commit65a74ca85df35967792e35e1060f5c4f7cfea35c (patch)
tree2050ca3c5df6f38c2b64ca740e75145adf5ebc5a /src/lib/libcrypto/pkcs12/p12_add.c
parent0086325146fe45a6dcc6b30f48bdb72f604e792f (diff)
downloadopenbsd-65a74ca85df35967792e35e1060f5c4f7cfea35c.tar.gz
openbsd-65a74ca85df35967792e35e1060f5c4f7cfea35c.tar.bz2
openbsd-65a74ca85df35967792e35e1060f5c4f7cfea35c.zip
Prepare to provide PKCS12 accessors
In order to be able to make pkcs12/ opaque, we need an entire family of accessors. These are in a particularly nasty tangle since this was done in about a dozen steps while sprinkling const, renaming functions, etc. The public API also adds backward compat macros for functions that were in the tree for half a day and then renamed. Of course some of them got picked up by some ports. Some of the gruesome hacks in here will go away with the next bump, but that doesn't mean that the pkcs12 directory will be prettier afterward. ok jsing
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_add.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_add.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_add.c b/src/lib/libcrypto/pkcs12/p12_add.c
index 08bb75d312..e423c76411 100644
--- a/src/lib/libcrypto/pkcs12/p12_add.c
+++ b/src/lib/libcrypto/pkcs12/p12_add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_add.c,v 1.17 2018/05/13 14:24:07 tb Exp $ */ 1/* $OpenBSD: p12_add.c,v 1.18 2022/08/03 20:16:06 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -89,6 +89,9 @@ PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, int nid1, int nid2)
89 return safebag; 89 return safebag;
90} 90}
91 91
92#if !defined(LIBRESSL_NEXT_API)
93#undef PKCS12_MAKE_KEYBAG
94#undef PKCS12_MAKE_SHKEYBAG
92/* Turn PKCS8 object into a keybag */ 95/* Turn PKCS8 object into a keybag */
93 96
94PKCS12_SAFEBAG * 97PKCS12_SAFEBAG *
@@ -136,6 +139,7 @@ PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass, int passlen,
136 139
137 return bag; 140 return bag;
138} 141}
142#endif
139 143
140/* Turn a stack of SAFEBAGS into a PKCS#7 data Contentinfo */ 144/* Turn a stack of SAFEBAGS into a PKCS#7 data Contentinfo */
141PKCS7 * 145PKCS7 *