1.\"	$OpenBSD: PKEY_USAGE_PERIOD_new.3,v 1.5 2019/06/06 01:06:59 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: June 6 2019 $
18.Dt PKEY_USAGE_PERIOD_NEW 3
19.Os
20.Sh NAME
21.Nm PKEY_USAGE_PERIOD_new ,
22.Nm PKEY_USAGE_PERIOD_free
23.Nd X.509 certificate private key usage period extension
24.Sh SYNOPSIS
25.In openssl/x509v3.h
26.Ft PKEY_USAGE_PERIOD *
27.Fn PKEY_USAGE_PERIOD_new void
28.Ft void
29.Fn PKEY_USAGE_PERIOD_free "PKEY_USAGE_PERIOD *period"
30.Sh DESCRIPTION
31.Fn PKEY_USAGE_PERIOD_new
32allocates and initializes an empty
33.Vt PKEY_USAGE_PERIOD
34object, representing an ASN.1
35.Vt PrivateKeyUsagePeriod
36structure defined in RFC 3280 section 4.2.1.4.
37It could be used in
38.Vt X509
39certificates to specify a validity period for the private key
40that differed from the validity period of the certificate.
41.Pp
42.Fn PKEY_USAGE_PERIOD_free
43frees
44.Fa period .
45.Sh RETURN VALUES
46.Fn PKEY_USAGE_PERIOD_new
47returns the new
48.Vt PKEY_USAGE_PERIOD
49object or
50.Dv NULL
51if an error occurs.
52.Sh SEE ALSO
53.Xr d2i_PKEY_USAGE_PERIOD 3 ,
54.Xr EXTENDED_KEY_USAGE_new 3 ,
55.Xr X509_CINF_new 3 ,
56.Xr X509_EXTENSION_new 3 ,
57.Xr X509_new 3
58.Sh STANDARDS
59RFC 3280: Internet X.509 Public Key Infrastructure Certificate and
60Certificate Revocation List (CRL) Profile,
61section 4.2.1.4: Private Key Usage Period
62.Pp
63RFC 3280 was obsoleted by RFC 5280, which says: "Section 4.2.1.4
64in RFC 3280, which specified the
65.Vt PrivateKeyUsagePeriod
66certificate extension but deprecated its use, was removed.
67Use of this ISO standard extension is neither deprecated
68nor recommended for use in the Internet PKI."
69.Sh HISTORY
70.Fn PKEY_USAGE_PERIOD_new
71and
72.Fn PKEY_USAGE_PERIOD_free
73first appeared in OpenSSL 0.9.2b and have been available since
74.Ox 2.6 .
75