diff options
| author | schwarze <> | 2021-07-08 12:30:27 +0000 |
|---|---|---|
| committer | schwarze <> | 2021-07-08 12:30:27 +0000 |
| commit | 5f8a25ac6c3db152a08bb32c7c9d4789761b4357 (patch) | |
| tree | 4c181e6a027b17ae8709ce12c9bfeb324915c7b1 /src/lib/libcrypto/man/X509_add1_trust_object.3 | |
| parent | a746e0c0caa24fb2144d00b0597fb940d34d3cfd (diff) | |
| download | openbsd-5f8a25ac6c3db152a08bb32c7c9d4789761b4357.tar.gz openbsd-5f8a25ac6c3db152a08bb32c7c9d4789761b4357.tar.bz2 openbsd-5f8a25ac6c3db152a08bb32c7c9d4789761b4357.zip | |
add new manual page for X509_add1_trust_object(3) and X509_trust_clear(3)
Diffstat (limited to 'src/lib/libcrypto/man/X509_add1_trust_object.3')
| -rw-r--r-- | src/lib/libcrypto/man/X509_add1_trust_object.3 | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/X509_add1_trust_object.3 b/src/lib/libcrypto/man/X509_add1_trust_object.3 new file mode 100644 index 0000000000..ed21a6da37 --- /dev/null +++ b/src/lib/libcrypto/man/X509_add1_trust_object.3 | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | .\" $OpenBSD: X509_add1_trust_object.3,v 1.1 2021/07/08 12:30:27 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 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: July 8 2021 $ | ||
| 18 | .Dt X509_ADD1_TRUST_OBJECT 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm X509_add1_trust_object , | ||
| 22 | .Nm X509_trust_clear | ||
| 23 | .Nd mark an X.509 certificate as intended for a specific purpose | ||
| 24 | .Sh SYNOPSIS | ||
| 25 | .In openssl/x509.h | ||
| 26 | .Ft int | ||
| 27 | .Fo X509_add1_trust_object | ||
| 28 | .Fa "X509 *x" | ||
| 29 | .Fa "const ASN1_OBJECT *purpose" | ||
| 30 | .Fc | ||
| 31 | .Ft void | ||
| 32 | .Fo X509_trust_clear | ||
| 33 | .Fa "X509 *x" | ||
| 34 | .Fc | ||
| 35 | .Sh DESCRIPTION | ||
| 36 | .Fn X509_add1_trust_object | ||
| 37 | appends a deep copy of the | ||
| 38 | .Fa purpose | ||
| 39 | object to the set of intended purposes that | ||
| 40 | .Fa x | ||
| 41 | contains as non-standard auxiliary data. | ||
| 42 | The function | ||
| 43 | .Xr OBJ_nid2obj 3 | ||
| 44 | can be used to create appropriate purpose objects from the | ||
| 45 | .Dv NID_* | ||
| 46 | constants mentioned in | ||
| 47 | .Xr X509_check_purpose 3 , | ||
| 48 | even though the | ||
| 49 | .Dv X509_PURPOSE_* | ||
| 50 | constants listed in that manual page are not intended for use with | ||
| 51 | .Fn X509_add1_trust_object . | ||
| 52 | .Pp | ||
| 53 | .Fn X509_trust_clear | ||
| 54 | frees and removes all purpose objects | ||
| 55 | contained in the non-standard auxiliary data of | ||
| 56 | .Fa x . | ||
| 57 | .Pp | ||
| 58 | As an alternative to using the functions documented in the present | ||
| 59 | manual page, X.509 certificate extensions can be used. | ||
| 60 | At the price of higher complexity, those allow storing the purpose | ||
| 61 | inside the certificate itself in a standard-conforming way rather than | ||
| 62 | merely in non-standard auxiliary data associated with the certificate. | ||
| 63 | See | ||
| 64 | .Xr EXTENDED_KEY_USAGE_new 3 | ||
| 65 | for details. | ||
| 66 | .Sh RETURN VALUES | ||
| 67 | .Fn X509_add1_trust_object | ||
| 68 | returns the new number of purposes that | ||
| 69 | .Fa x | ||
| 70 | is intended for, or 0 if an error occurs, in particular if memory | ||
| 71 | allocation fails or if | ||
| 72 | .Fa x | ||
| 73 | does not contain a sub-object that can hold non-standard auxiliary data. | ||
| 74 | .Sh SEE ALSO | ||
| 75 | .Xr ASN1_OBJECT_new 3 , | ||
| 76 | .Xr EXTENDED_KEY_USAGE_new 3 , | ||
| 77 | .Xr OBJ_nid2obj 3 , | ||
| 78 | .Xr X509_CERT_AUX_new 3 , | ||
| 79 | .Xr X509_new 3 | ||
| 80 | .Sh HISTORY | ||
| 81 | These functions first appeared in OpenSSL 0.9.4 and have been available since | ||
| 82 | .Ox 2.7 . | ||
