diff options
| author | schwarze <> | 2016-12-23 20:43:02 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-12-23 20:43:02 +0000 |
| commit | c9656325c1d871404ea9e24d835bc00e45296089 (patch) | |
| tree | 77db9015459f4b1fed7ca2115213b9c89cc8b39f /src | |
| parent | 5246a988e08994a21a195408daf562579b90b8f1 (diff) | |
| download | openbsd-c9656325c1d871404ea9e24d835bc00e45296089.tar.gz openbsd-c9656325c1d871404ea9e24d835bc00e45296089.tar.bz2 openbsd-c9656325c1d871404ea9e24d835bc00e45296089.zip | |
Write new EXTENDED_KEY_USAGE_new(3) manual page from scratch.
Both functions are listed in <openssl/x509v3.h>
and in OpenSSL doc/man3/X509_dup.pod.
OpenSSL documentation specifies the wrong header file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/EXTENDED_KEY_USAGE_new.3 | 74 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
2 files changed, 76 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/EXTENDED_KEY_USAGE_new.3 b/src/lib/libcrypto/man/EXTENDED_KEY_USAGE_new.3 new file mode 100644 index 0000000000..ae986839fb --- /dev/null +++ b/src/lib/libcrypto/man/EXTENDED_KEY_USAGE_new.3 | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | .\" $OpenBSD: EXTENDED_KEY_USAGE_new.3,v 1.1 2016/12/23 20:43:02 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: December 23 2016 $ | ||
| 18 | .Dt EXTENDED_KEY_USAGE_NEW 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm EXTENDED_KEY_USAGE_new , | ||
| 22 | .Nm EXTENDED_KEY_USAGE_free | ||
| 23 | .Nd X.509 key usage restrictions | ||
| 24 | .Sh SYNOPSIS | ||
| 25 | .In openssl/x509v3.h | ||
| 26 | .Ft EXTENDED_KEY_USAGE | ||
| 27 | .Fn EXTENDED_KEY_USAGE_new void | ||
| 28 | .Ft void | ||
| 29 | .Fn EXTENDED_KEY_USAGE_free "EXTENDED_KEY_USAGE *eku" | ||
| 30 | .Sh DESCRIPTION | ||
| 31 | By using the key usage extension, the extended key usage extension, | ||
| 32 | or both of them, | ||
| 33 | .Vt X509 | ||
| 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. | ||
| 38 | .Pp | ||
| 39 | .Fn EXTENDED_KEY_USAGE_new | ||
| 40 | allocates and initializes an empty | ||
| 41 | .Vt EXTENDED_KEY_USAGE | ||
| 42 | object, which is a | ||
| 43 | .Vt STACK_OF(ASN1_OBJECT) | ||
| 44 | and represents an ASN.1 ExtKeyUsageSyntax structure | ||
| 45 | defined in RFC 5280 section 4.2.1.12. | ||
| 46 | It can hold key purpose identifiers. | ||
| 47 | .Pp | ||
| 48 | .Fn EXTENDED_KEY_USAGE_free | ||
| 49 | frees | ||
| 50 | .Fa eku . | ||
| 51 | .Pp | ||
| 52 | The key usage extension uses the ASN.1 BIT STRING data type | ||
| 53 | and doesn't require any dedicated object. | ||
| 54 | .Sh RETURN VALUES | ||
| 55 | .Fn EXTENDED_KEY_USAGE_new | ||
| 56 | returns the new | ||
| 57 | .Vt EXTENDED_KEY_USAGE | ||
| 58 | object or | ||
| 59 | .Dv NULL | ||
| 60 | if an error occurs. | ||
| 61 | .Sh SEE ALSO | ||
| 62 | .Xr BASIC_CONSTRAINTS_new 3 , | ||
| 63 | .Xr POLICYINFO_new 3 , | ||
| 64 | .Xr X509_EXTENSION_new 3 , | ||
| 65 | .Xr X509_new 3 | ||
| 66 | .Sh STANDARDS | ||
| 67 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate and | ||
| 68 | Certificate Revocation List (CRL) Profile: | ||
| 69 | .Bl -dash -compact | ||
| 70 | .It | ||
| 71 | section 4.2.1.3: Key Usage | ||
| 72 | .It | ||
| 73 | section 4.2.1.12: Extended Key Usage | ||
| 74 | .El | ||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index a29fb912ec..57122993b9 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.95 2016/12/23 18:50:23 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.96 2016/12/23 20:43:02 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -123,6 +123,7 @@ MAN= \ | |||
| 123 | EVP_SealInit.3 \ | 123 | EVP_SealInit.3 \ |
| 124 | EVP_SignInit.3 \ | 124 | EVP_SignInit.3 \ |
| 125 | EVP_VerifyInit.3 \ | 125 | EVP_VerifyInit.3 \ |
| 126 | EXTENDED_KEY_USAGE_new.3 \ | ||
| 126 | GENERAL_NAME_new.3 \ | 127 | GENERAL_NAME_new.3 \ |
| 127 | HMAC.3 \ | 128 | HMAC.3 \ |
| 128 | MD5.3 \ | 129 | MD5.3 \ |
