diff options
Diffstat (limited to 'lib/libcrypto/asn1/x_crl.c')
-rw-r--r-- | lib/libcrypto/asn1/x_crl.c | 80 |
1 files changed, 76 insertions, 4 deletions
diff --git a/lib/libcrypto/asn1/x_crl.c b/lib/libcrypto/asn1/x_crl.c index bdec50dc800..2539fd92c40 100644 --- a/lib/libcrypto/asn1/x_crl.c +++ b/lib/libcrypto/asn1/x_crl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_crl.c,v 1.18 2014/07/11 13:54:41 miod Exp $ */ +/* $OpenBSD: x_crl.c,v 1.19 2015/02/09 15:05:59 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -337,9 +337,81 @@ ASN1_SEQUENCE_ref(X509_CRL, crl_cb, CRYPTO_LOCK_X509_CRL) = { ASN1_SIMPLE(X509_CRL, signature, ASN1_BIT_STRING) } ASN1_SEQUENCE_END_ref(X509_CRL, X509_CRL) -IMPLEMENT_ASN1_FUNCTIONS(X509_REVOKED) -IMPLEMENT_ASN1_FUNCTIONS(X509_CRL_INFO) -IMPLEMENT_ASN1_FUNCTIONS(X509_CRL) + +X509_REVOKED * +d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len) +{ + return (X509_REVOKED *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, + &X509_REVOKED_it); +} + +int +i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **out) +{ + return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REVOKED_it); +} + +X509_REVOKED * +X509_REVOKED_new(void) +{ + return (X509_REVOKED *)ASN1_item_new(&X509_REVOKED_it); +} + +void +X509_REVOKED_free(X509_REVOKED *a) +{ + ASN1_item_free((ASN1_VALUE *)a, &X509_REVOKED_it); +} + +X509_CRL_INFO * +d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len) +{ + return (X509_CRL_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, + &X509_CRL_INFO_it); +} + +int +i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **out) +{ + return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_INFO_it); +} + +X509_CRL_INFO * +X509_CRL_INFO_new(void) +{ + return (X509_CRL_INFO *)ASN1_item_new(&X509_CRL_INFO_it); +} + +void +X509_CRL_INFO_free(X509_CRL_INFO *a) +{ + ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_INFO_it); +} + +X509_CRL * +d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) +{ + return (X509_CRL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, + &X509_CRL_it); +} + +int +i2d_X509_CRL(X509_CRL *a, unsigned char **out) +{ + return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_it); +} + +X509_CRL * +X509_CRL_new(void) +{ + return (X509_CRL *)ASN1_item_new(&X509_CRL_it); +} + +void +X509_CRL_free(X509_CRL *a) +{ + ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_it); +} IMPLEMENT_ASN1_DUP_FUNCTION(X509_CRL) static int |