1.\" $OpenBSD: d2i_X509_CRL.3,v 1.9 2024/03/06 02:34:14 tb Exp $ 2.\" 3.\" Copyright (c) 2016, 2021 Ingo Schwarze <schwarze@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: March 6 2024 $ 18.Dt D2I_X509_CRL 3 19.Os 20.Sh NAME 21.Nm d2i_X509_CRL , 22.Nm i2d_X509_CRL , 23.Nm d2i_X509_CRL_bio , 24.Nm d2i_X509_CRL_fp , 25.Nm i2d_X509_CRL_bio , 26.Nm i2d_X509_CRL_fp , 27.Nm d2i_X509_CRL_INFO , 28.Nm i2d_X509_CRL_INFO , 29.Nm d2i_X509_REVOKED , 30.Nm i2d_X509_REVOKED 31.Nd decode and encode X.509 certificate revocation lists 32.Sh SYNOPSIS 33.In openssl/x509.h 34.Ft X509_CRL * 35.Fo d2i_X509_CRL 36.Fa "X509_CRL **val_out" 37.Fa "const unsigned char **der_in" 38.Fa "long length" 39.Fc 40.Ft int 41.Fo i2d_X509_CRL 42.Fa "X509_CRL *val_in" 43.Fa "unsigned char **der_out" 44.Fc 45.Ft X509_CRL * 46.Fo d2i_X509_CRL_bio 47.Fa "BIO *in_bio" 48.Fa "X509_CRL **der_out" 49.Fc 50.Ft X509_CRL * 51.Fo d2i_X509_CRL_fp 52.Fa "FILE *in_fp" 53.Fa "X509_CRL **der_out" 54.Fc 55.Ft int 56.Fo i2d_X509_CRL_bio 57.Fa "BIO *out_bio" 58.Fa "X509_CRL *der_in" 59.Fc 60.Ft int 61.Fo i2d_X509_CRL_fp 62.Fa "FILE *out_fp" 63.Fa "X509_CRL *der_in" 64.Fc 65.Ft X509_CRL_INFO * 66.Fo d2i_X509_CRL_INFO 67.Fa "X509_CRL_INFO **val_out" 68.Fa "const unsigned char **der_in" 69.Fa "long length" 70.Fc 71.Ft int 72.Fo i2d_X509_CRL_INFO 73.Fa "X509_CRL_INFO *val_in" 74.Fa "unsigned char **der_out" 75.Fc 76.Ft X509_REVOKED * 77.Fo d2i_X509_REVOKED 78.Fa "X509_REVOKED **val_out" 79.Fa "const unsigned char **der_in" 80.Fa "long length" 81.Fc 82.Ft int 83.Fo i2d_X509_REVOKED 84.Fa "X509_REVOKED *val_in" 85.Fa "unsigned char **der_out" 86.Fc 87.Sh DESCRIPTION 88These functions decode and encode X.509 certificate revocation lists. 89For details about the semantics, examples, caveats, and bugs, see 90.Xr ASN1_item_d2i 3 . 91.Pp 92.Fn d2i_X509_CRL 93and 94.Fn i2d_X509_CRL 95decode and encode an ASN.1 96.Vt CertificateList 97structure defined in RFC 5280 section 5.1. 98.Pp 99.Fn d2i_X509_CRL_bio , 100.Fn d2i_X509_CRL_fp , 101.Fn i2d_X509_CRL_bio , 102and 103.Fn i2d_X509_CRL_fp 104are similar except that they decode or encode using a 105.Vt BIO 106or 107.Vt FILE 108pointer. 109.Pp 110.Fn d2i_X509_CRL_INFO 111and 112.Fn i2d_X509_CRL_INFO 113decode and encode an ASN.1 114.Vt TBSCertList 115structure defined in RFC 5280 section 5.1. 116.Pp 117.Fn d2i_X509_REVOKED 118and 119.Fn i2d_X509_REVOKED 120decode and encode an ASN.1 structure representing one element of 121the revokedCertificates field of the ASN.1 122.Vt TBSCertList 123structure. 124.Sh SEE ALSO 125.Xr ASN1_item_d2i 3 , 126.Xr X509_CRL_new 3 , 127.Xr X509_REVOKED_new 3 128.Sh STANDARDS 129RFC 5280: Internet X.509 Public Key Infrastructure Certificate and 130Certificate Revocation List (CRL) Profile, 131section 5: CRL and CRL Extensions Profile 132.Sh HISTORY 133.Fn d2i_X509_CRL , 134.Fn i2d_X509_CRL , 135.Fn d2i_X509_CRL_fp , 136.Fn i2d_X509_CRL_fp , 137.Fn d2i_X509_CRL_INFO , 138.Fn i2d_X509_CRL_INFO , 139.Fn d2i_X509_REVOKED , 140and 141.Fn i2d_X509_REVOKED 142first appeared in SSLeay 0.5.1. 143.Fn d2i_X509_CRL_bio 144and 145.Fn i2d_X509_CRL_bio 146first appeared in SSLeay 0.6.0. 147These functions have been available since 148.Ox 2.4 . 149