1.\" $OpenBSD: d2i_X509_ALGOR.3,v 1.10 2021/11/03 15:02:14 schwarze 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: November 3 2021 $ 18.Dt D2I_X509_ALGOR 3 19.Os 20.Sh NAME 21.Nm d2i_X509_ALGOR , 22.Nm i2d_X509_ALGOR , 23.Nm d2i_X509_ALGORS , 24.Nm i2d_X509_ALGORS 25.Nd decode and encode algorithm identifiers 26.Sh SYNOPSIS 27.In openssl/x509.h 28.Ft X509_ALGOR * 29.Fo d2i_X509_ALGOR 30.Fa "X509_ALGOR **val_out" 31.Fa "unsigned char **der_in" 32.Fa "long length" 33.Fc 34.Ft int 35.Fo i2d_X509_ALGOR 36.Fa "X509_ALGOR *val_in" 37.Fa "unsigned char **der_out" 38.Fc 39.Ft X509_ALGORS * 40.Fo d2i_X509_ALGORS 41.Fa "X509_ALGORS **val_out" 42.Fa "const unsigned char **der_in" 43.Fa "long length" 44.Fc 45.Ft int 46.Fo i2d_X509_ALGORS 47.Fa "X509_ALGORS *val_in" 48.Fa "unsigned char **der_out" 49.Fc 50.Sh DESCRIPTION 51.Fn d2i_X509_ALGOR 52and 53.Fn i2d_X509_ALGOR 54decode and encode an ASN.1 55.Vt AlgorithmIdentifier 56structure defined in RFC 5280 section 4.1.1.2. 57.Pp 58.Fn d2i_X509_ALGORS 59and 60.Fn i2d_X509_ALGORS 61decode and encode an ASN.1 sequence of 62.Vt AlgorithmIdentifier 63structures. 64The data type 65.Vt X509_ALGORS 66is defined as 67.Vt STACK_OF(X509_ALGOR) . 68.Pp 69For details about the semantics, examples, caveats, and bugs, see 70.Xr ASN1_item_d2i 3 . 71.Sh SEE ALSO 72.Xr ASN1_item_d2i 3 , 73.Xr STACK_OF 3 , 74.Xr X509_ALGOR_new 3 75.Sh STANDARDS 76RFC 5280: Internet X.509 Public Key Infrastructure Certificate and 77Certificate Revocation List (CRL) Profile 78.Sh HISTORY 79.Fn d2i_X509_ALGOR 80and 81.Fn i2d_X509_ALGOR 82first appeared in SSLeay 0.5.1 and have been available since 83.Ox 2.4 . 84.Pp 85.Fn d2i_X509_ALGORS 86and 87.Fn i2d_X509_ALGORS 88first appeared in OpenSSL 0.9.8h and have been available since 89.Ox 4.5 . 90