1 .\" $OpenBSD: EXTENDED_KEY_USAGE_new.3,v 1.2 2016/12/25 22:15:10 schwarze Exp $
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
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.
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.
17 .Dd $Mdocdate: December 25 2016 $
18 .Dt EXTENDED_KEY_USAGE_NEW 3
21 .Nm EXTENDED_KEY_USAGE_new ,
22 .Nm EXTENDED_KEY_USAGE_free
23 .Nd X.509 key usage restrictions
26 .Ft EXTENDED_KEY_USAGE
27 .Fn EXTENDED_KEY_USAGE_new void
29 .Fn EXTENDED_KEY_USAGE_free "EXTENDED_KEY_USAGE *eku"
31 By using the key usage extension, the extended key usage extension,
34 end entity certificates may indicate that the key contained in them
35 is only intended to be used for the specified purposes.
36 If both extensions are present, only uses compatible with both
37 extensions are intended.
39 .Fn EXTENDED_KEY_USAGE_new
40 allocates and initializes an empty
41 .Vt EXTENDED_KEY_USAGE
43 .Vt STACK_OF(ASN1_OBJECT)
44 and represents an ASN.1
46 structure defined in RFC 5280 section 4.2.1.12.
47 It can hold key purpose identifiers.
49 .Fn EXTENDED_KEY_USAGE_free
53 The key usage extension uses the ASN.1 BIT STRING data type
54 and doesn't require any dedicated object.
56 .Fn EXTENDED_KEY_USAGE_new
58 .Vt EXTENDED_KEY_USAGE
63 .Xr BASIC_CONSTRAINTS_new 3 ,
64 .Xr POLICYINFO_new 3 ,
65 .Xr X509_EXTENSION_new 3 ,
68 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
69 Certificate Revocation List (CRL) Profile:
72 section 4.2.1.3: Key Usage
74 section 4.2.1.12: Extended Key Usage