diff options
author | tb <> | 2022-08-03 20:16:06 +0000 |
---|---|---|
committer | tb <> | 2022-08-03 20:16:06 +0000 |
commit | 65a74ca85df35967792e35e1060f5c4f7cfea35c (patch) | |
tree | 2050ca3c5df6f38c2b64ca740e75145adf5ebc5a /src/lib/libcrypto/pkcs12/p12_utl.c | |
parent | 0086325146fe45a6dcc6b30f48bdb72f604e792f (diff) | |
download | openbsd-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_utl.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_utl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_utl.c b/src/lib/libcrypto/pkcs12/p12_utl.c index ff3a035d3f..8efe7a2653 100644 --- a/src/lib/libcrypto/pkcs12/p12_utl.c +++ b/src/lib/libcrypto/pkcs12/p12_utl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_utl.c,v 1.16 2018/05/30 15:32:11 tb Exp $ */ | 1 | /* $OpenBSD: p12_utl.c,v 1.17 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 | */ |
@@ -148,6 +148,12 @@ d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) | |||
148 | return ASN1_item_d2i_fp(&PKCS12_it, fp, p12); | 148 | return ASN1_item_d2i_fp(&PKCS12_it, fp, p12); |
149 | } | 149 | } |
150 | 150 | ||
151 | #if !defined(LIBRESSL_NEXT_API) | ||
152 | #undef PKCS12_x5092certbag | ||
153 | #undef PKCS12_x509crl2certbag | ||
154 | #undef PKCS12_certbag2x509 | ||
155 | #undef PKCS12_certbag2x509crl | ||
156 | |||
151 | PKCS12_SAFEBAG * | 157 | PKCS12_SAFEBAG * |
152 | PKCS12_x5092certbag(X509 *x509) | 158 | PKCS12_x5092certbag(X509 *x509) |
153 | { | 159 | { |
@@ -183,3 +189,4 @@ PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag) | |||
183 | return ASN1_item_unpack(bag->value.bag->value.octet, | 189 | return ASN1_item_unpack(bag->value.bag->value.octet, |
184 | &X509_CRL_it); | 190 | &X509_CRL_it); |
185 | } | 191 | } |
192 | #endif | ||