aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2000-05-16 21:22:45 +0000
committerBen Laurie <ben@openssl.org>2000-05-16 21:22:45 +0000
commit5de603abc8fe6fedca529ce58d3741b50ff99592 (patch)
tree7a255f319401b15b440ec6a692951b2ff92f635a /crypto/x509
parentf2716dada0527bcf200e628fd572514bd395fbfb (diff)
downloadopenssl-5de603abc8fe6fedca529ce58d3741b50ff99592.tar.gz
Typesafety Thought Police part 3.
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index 57f9bab0fb..d2ad77815e 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -92,6 +92,28 @@ extern "C" {
#undef X509_NAME
#endif
+ /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
+#define DECLARE_PKCS12_STACK_OF(type) \
+STACK_OF(type) *PKCS12_decrypt_d2i_##type(struct X509_algor_st *algor, \
+ type *(*d2i)(type **, \
+ unsigned char **, \
+ long), \
+ void (*free_func)(type *), \
+ const char *pass, int passlen, \
+ ASN1_STRING *oct, int seq);
+
+#define IMPLEMENT_PKCS12_STACK_OF(type) \
+STACK_OF(type) *PKCS12_decrypt_d2i_##type(struct X509_algor_st *algor, \
+ type *(*d2i)(type **, \
+ unsigned char **, \
+ long), \
+ void (*free_func)(type *), \
+ const char *pass, int passlen, \
+ ASN1_STRING *oct, int seq) \
+ { return (STACK_OF(type) *)PKCS12_decrypt_d2i(algor,(char *(*)())d2i, \
+ (void(*)(void *))free_func, \
+ pass,passlen,oct,seq); }
+
#define X509_FILETYPE_PEM 1
#define X509_FILETYPE_ASN1 2
#define X509_FILETYPE_DEFAULT 3