1.\" $OpenBSD: d2i_PKEY_USAGE_PERIOD.3,v 1.2 2018/03/21 16:09:51 schwarze Exp $ 2.\" 3.\" Copyright (c) 2016 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 21 2018 $ 18.Dt D2I_PKEY_USAGE_PERIOD 3 19.Os 20.Sh NAME 21.Nm d2i_PKEY_USAGE_PERIOD , 22.Nm i2d_PKEY_USAGE_PERIOD 23.Nd decode and encode X.509 key usage period extensions 24.Sh SYNOPSIS 25.In openssl/x509v3.h 26.Ft PKEY_USAGE_PERIOD * 27.Fo d2i_PKEY_USAGE_PERIOD 28.Fa "PKEY_USAGE_PERIOD **val_out" 29.Fa "const unsigned char **der_in" 30.Fa "long length" 31.Fc 32.Ft int 33.Fo i2d_PKEY_USAGE_PERIOD 34.Fa "PKEY_USAGE_PERIOD *val_in" 35.Fa "unsigned char **der_out" 36.Fc 37.Sh DESCRIPTION 38.Fn d2i_PKEY_USAGE_PERIOD 39and 40.Fn i2d_PKEY_USAGE_PERIOD 41decode and encode an ASN.1 42.Vt PrivateKeyUsagePeriod 43structure defined in RFC 3280 section 4.2.1.4. 44For details about the semantics, examples, caveats, and bugs, see 45.Xr ASN1_item_d2i 3 . 46.Sh RETURN VALUES 47.Fn d2i_PKEY_USAGE_PERIOD 48returns a 49.Vt PKEY_USAGE_PERIOD 50object or 51.Dv NULL 52if an error occurs. 53.Pp 54.Fn i2d_PKEY_USAGE_PERIOD 55returns the number of bytes successfully encoded or a negative value 56if an error occurs. 57.Sh SEE ALSO 58.Xr ASN1_item_d2i 3 , 59.Xr PKEY_USAGE_PERIOD_new 3 , 60.Xr X509_EXTENSION_new 3 61.Sh STANDARDS 62RFC 3280: Internet X.509 Public Key Infrastructure Certificate and 63Certificate Revocation List (CRL) Profile, 64section 4.2.1.4: Private Key Usage Period 65.Pp 66RFC 3280 was obsoleted by RFC 5280; see 67.Xr PKEY_USAGE_PERIOD_new 3 68for details. 69.Sh HISTORY 70.Fn d2i_PKEY_USAGE_PERIOD 71and 72.Fn i2d_PKEY_USAGE_PERIOD 73first appeared in OpenSSL 0.9.2b and have been available since 74.Ox 2.6 . 75