diff options
| author | schwarze <> | 2021-10-26 12:56:48 +0000 |
|---|---|---|
| committer | schwarze <> | 2021-10-26 12:56:48 +0000 |
| commit | 040c31b7b4e4aab44ac0765a4d50c78ab26fa790 (patch) | |
| tree | 7a604b43b8af79c1d81f11314a1645012b09ce82 /src/lib/libcrypto/man | |
| parent | 5a4a739c4b71042de2a0dafa6a73784cf51f7c5c (diff) | |
| download | openbsd-040c31b7b4e4aab44ac0765a4d50c78ab26fa790.tar.gz openbsd-040c31b7b4e4aab44ac0765a4d50c78ab26fa790.tar.bz2 openbsd-040c31b7b4e4aab44ac0765a4d50c78ab26fa790.zip | |
new manual page X509_REQ_add1_attr(3) documenting nine functions
for X.501 Attributes in PKCS#10 certification requests
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_REQ_add1_attr.3 | 186 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_REQ_new.3 | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509at_add1_attr.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509at_get_attr.3 | 5 |
6 files changed, 199 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index c697734c7e..6d83257fe7 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.202 2021/10/25 15:23:50 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.203 2021/10/26 12:56:48 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -303,6 +303,7 @@ MAN= \ | |||
| 303 | X509_PKEY_new.3 \ | 303 | X509_PKEY_new.3 \ |
| 304 | X509_PUBKEY_new.3 \ | 304 | X509_PUBKEY_new.3 \ |
| 305 | X509_PURPOSE_set.3 \ | 305 | X509_PURPOSE_set.3 \ |
| 306 | X509_REQ_add1_attr.3 \ | ||
| 306 | X509_REQ_new.3 \ | 307 | X509_REQ_new.3 \ |
| 307 | X509_REVOKED_new.3 \ | 308 | X509_REVOKED_new.3 \ |
| 308 | X509_SIG_new.3 \ | 309 | X509_SIG_new.3 \ |
diff --git a/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 b/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 index a01b465c04..5dcdc6e214 100644 --- a/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 +++ b/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_ATTRIBUTE_new.3,v 1.15 2021/10/25 12:25:14 schwarze Exp $ | 1 | .\" $OpenBSD: X509_ATTRIBUTE_new.3,v 1.16 2021/10/26 12:56:48 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2016, 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016, 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | .\" | 16 | .\" |
| 17 | .Dd $Mdocdate: October 25 2021 $ | 17 | .Dd $Mdocdate: October 26 2021 $ |
| 18 | .Dt X509_ATTRIBUTE_NEW 3 | 18 | .Dt X509_ATTRIBUTE_NEW 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -121,6 +121,7 @@ fails on | |||
| 121 | .Xr X509_ATTRIBUTE_set1_object 3 , | 121 | .Xr X509_ATTRIBUTE_set1_object 3 , |
| 122 | .Xr X509_EXTENSION_new 3 , | 122 | .Xr X509_EXTENSION_new 3 , |
| 123 | .Xr X509_new 3 , | 123 | .Xr X509_new 3 , |
| 124 | .Xr X509_REQ_add1_attr 3 , | ||
| 124 | .Xr X509_REQ_new 3 , | 125 | .Xr X509_REQ_new 3 , |
| 125 | .Xr X509at_add1_attr 3 , | 126 | .Xr X509at_add1_attr 3 , |
| 126 | .Xr X509at_get_attr 3 | 127 | .Xr X509at_get_attr 3 |
diff --git a/src/lib/libcrypto/man/X509_REQ_add1_attr.3 b/src/lib/libcrypto/man/X509_REQ_add1_attr.3 new file mode 100644 index 0000000000..c75bffeb4f --- /dev/null +++ b/src/lib/libcrypto/man/X509_REQ_add1_attr.3 | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | .\" $OpenBSD: X509_REQ_add1_attr.3,v 1.1 2021/10/26 12:56:48 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: October 26 2021 $ | ||
| 18 | .Dt X509_REQ_ADD1_ATTR 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm X509_REQ_add1_attr , | ||
| 22 | .Nm X509_REQ_add1_attr_by_OBJ , | ||
| 23 | .Nm X509_REQ_add1_attr_by_NID , | ||
| 24 | .Nm X509_REQ_add1_attr_by_txt , | ||
| 25 | .Nm X509_REQ_delete_attr , | ||
| 26 | .Nm X509_REQ_get_attr , | ||
| 27 | .Nm X509_REQ_get_attr_count , | ||
| 28 | .Nm X509_REQ_get_attr_by_OBJ , | ||
| 29 | .Nm X509_REQ_get_attr_by_NID | ||
| 30 | .Nd X.501 Attributes of PKCS#10 certification requests | ||
| 31 | .Sh SYNOPSIS | ||
| 32 | .In openssl/x509.h | ||
| 33 | .Ft int | ||
| 34 | .Fo X509_REQ_add1_attr | ||
| 35 | .Fa "X509_REQ *req" | ||
| 36 | .Fa "X509_ATTRIBUTE *attr" | ||
| 37 | .Fc | ||
| 38 | .Ft int | ||
| 39 | .Fo X509_REQ_add1_attr_by_OBJ | ||
| 40 | .Fa "X509_REQ *req" | ||
| 41 | .Fa "const ASN1_OBJECT *obj" | ||
| 42 | .Fa "int type" | ||
| 43 | .Fa "const unsigned char *data" | ||
| 44 | .Fa "int len" | ||
| 45 | .Fc | ||
| 46 | .Ft int | ||
| 47 | .Fo X509_REQ_add1_attr_by_NID | ||
| 48 | .Fa "X509_REQ *req" | ||
| 49 | .Fa "int nid" | ||
| 50 | .Fa "int type" | ||
| 51 | .Fa "const unsigned char *data" | ||
| 52 | .Fa "int len" | ||
| 53 | .Fc | ||
| 54 | .Ft int | ||
| 55 | .Fo X509_REQ_add1_attr_by_txt | ||
| 56 | .Fa "X509_REQ *req" | ||
| 57 | .Fa "const char *name" | ||
| 58 | .Fa "int type" | ||
| 59 | .Fa "const unsigned char *data" | ||
| 60 | .Fa "int len" | ||
| 61 | .Fc | ||
| 62 | .Ft X509_ATTRIBUTE * | ||
| 63 | .Fo X509_REQ_delete_attr | ||
| 64 | .Fa "X509_REQ *req" | ||
| 65 | .Fa "int index" | ||
| 66 | .Fc | ||
| 67 | .Ft X509_ATTRIBUTE * | ||
| 68 | .Fo X509_REQ_get_attr | ||
| 69 | .Fa "const X509_REQ *req" | ||
| 70 | .Fa "int index" | ||
| 71 | .Fc | ||
| 72 | .Ft int | ||
| 73 | .Fo X509_REQ_get_attr_count | ||
| 74 | .Fa "const X509_REQ *req" | ||
| 75 | .Fc | ||
| 76 | .Ft int | ||
| 77 | .Fo X509_REQ_get_attr_by_OBJ | ||
| 78 | .Fa "const X509_REQ *req" | ||
| 79 | .Fa "const ASN1_OBJECT *obj" | ||
| 80 | .Fa "int start_after" | ||
| 81 | .Fc | ||
| 82 | .Ft int | ||
| 83 | .Fo X509_REQ_get_attr_by_NID | ||
| 84 | .Fa "const X509_REQ *req" | ||
| 85 | .Fa "int nid" | ||
| 86 | .Fa "int start_after" | ||
| 87 | .Fc | ||
| 88 | .Sh DESCRIPTION | ||
| 89 | These functions support associating an array of X.501 Attributes | ||
| 90 | with a PKCS#10 certification request. | ||
| 91 | .Pp | ||
| 92 | .Fn X509_REQ_add1_attr | ||
| 93 | appends a deep copy of the | ||
| 94 | .Fa attr | ||
| 95 | using | ||
| 96 | .Xr X509at_add1_attr 3 . | ||
| 97 | .Pp | ||
| 98 | .Fn X509_REQ_add1_attr_by_OBJ , | ||
| 99 | .Fn X509_REQ_add1_attr_by_NID , | ||
| 100 | and | ||
| 101 | .Fn X509_REQ_add1_attr_by_txt | ||
| 102 | create a new X.501 Attribute object using | ||
| 103 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
| 104 | .Xr X509_ATTRIBUTE_create_by_NID 3 , | ||
| 105 | or | ||
| 106 | .Xr X509_ATTRIBUTE_create_by_txt 3 , | ||
| 107 | respectively, and append it using | ||
| 108 | .Xr X509at_add1_attr 3 . | ||
| 109 | .Pp | ||
| 110 | .Fn X509_REQ_delete_attr | ||
| 111 | deletes the attribute with the zero-based | ||
| 112 | .Fa index | ||
| 113 | using | ||
| 114 | .Xr X509at_delete_attr 3 . | ||
| 115 | .Pp | ||
| 116 | .Fn X509_REQ_get_attr | ||
| 117 | returns the attribute with the zero-based | ||
| 118 | .Fa index | ||
| 119 | using | ||
| 120 | .Xr X509at_get_attr 3 . | ||
| 121 | .Pp | ||
| 122 | .Fn X509_REQ_get_attr_count | ||
| 123 | returns the number of attributes currently associated with | ||
| 124 | .Fa req | ||
| 125 | using | ||
| 126 | .Xr X509at_get_attr_count 3 . | ||
| 127 | .Pp | ||
| 128 | .Fn X509_REQ_get_attr_by_OBJ | ||
| 129 | and | ||
| 130 | .Fn X509_REQ_get_attr_by_NID | ||
| 131 | search for an attribute of the type | ||
| 132 | .Fa obj | ||
| 133 | or | ||
| 134 | .Fa nid | ||
| 135 | using | ||
| 136 | .Xr X509at_get_attr_by_OBJ 3 | ||
| 137 | or | ||
| 138 | .Xr X509at_get_attr_by_NID 3 , | ||
| 139 | respectively. | ||
| 140 | .Sh RETURN VALUES | ||
| 141 | .Fn X509_REQ_add1_attr , | ||
| 142 | .Fn X509_REQ_add1_attr_by_OBJ , | ||
| 143 | .Fn X509_REQ_add1_attr_by_NID , | ||
| 144 | and | ||
| 145 | .Fn X509_REQ_add1_attr_by_txt | ||
| 146 | return 1 for success or 0 for failure. | ||
| 147 | .Pp | ||
| 148 | .Fn X509_REQ_delete_attr | ||
| 149 | and | ||
| 150 | .Fn X509_REQ_get_attr | ||
| 151 | return the deleted or requested attribute or | ||
| 152 | .Dv NULL | ||
| 153 | if the requested index is negative or greater than or equal to | ||
| 154 | the current number of attributes associated with | ||
| 155 | .Fa req . | ||
| 156 | .Pp | ||
| 157 | .Fn X509_REQ_get_attr_count | ||
| 158 | returns the current number of attributes. | ||
| 159 | .Pp | ||
| 160 | .Fn X509_REQ_get_attr_by_OBJ | ||
| 161 | and | ||
| 162 | .Fn X509_REQ_get_attr_by_NID | ||
| 163 | return the index of the first attribute that has an index greater than | ||
| 164 | .Fa start_after | ||
| 165 | and a type matching | ||
| 166 | .Fa obj | ||
| 167 | or | ||
| 168 | .Fa nid , | ||
| 169 | respectively, or \-1 on failure. | ||
| 170 | In addition, | ||
| 171 | .Fn X509_REQ_get_attr_by_NID | ||
| 172 | returns \-2 if | ||
| 173 | .Xr OBJ_nid2obj 3 | ||
| 174 | fails on the requested | ||
| 175 | .Fa nid . | ||
| 176 | .Sh SEE ALSO | ||
| 177 | .Xr OBJ_nid2obj 3 , | ||
| 178 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
| 179 | .Xr X509_ATTRIBUTE_new 3 , | ||
| 180 | .Xr X509_REQ_new 3 , | ||
| 181 | .Xr X509at_add1_attr 3 , | ||
| 182 | .Xr X509at_get_attr 3 | ||
| 183 | .Sh HISTORY | ||
| 184 | These funtions first appeared in OpenSSL 0.9.5 | ||
| 185 | and have been available since | ||
| 186 | .Ox 2.7 . | ||
diff --git a/src/lib/libcrypto/man/X509_REQ_new.3 b/src/lib/libcrypto/man/X509_REQ_new.3 index 76d3d35277..16c6f0bd78 100644 --- a/src/lib/libcrypto/man/X509_REQ_new.3 +++ b/src/lib/libcrypto/man/X509_REQ_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_REQ_new.3,v 1.7 2021/10/26 10:50:08 schwarze Exp $ | 1 | .\" $OpenBSD: X509_REQ_new.3,v 1.8 2021/10/26 12:56:48 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2016, 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016, 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -98,6 +98,7 @@ if an error occurs. | |||
| 98 | .Xr d2i_X509_REQ 3 , | 98 | .Xr d2i_X509_REQ 3 , |
| 99 | .Xr PEM_read_X509_REQ 3 , | 99 | .Xr PEM_read_X509_REQ 3 , |
| 100 | .Xr X509_new 3 , | 100 | .Xr X509_new 3 , |
| 101 | .Xr X509_REQ_add1_attr 3 , | ||
| 101 | .Xr X509_REQ_check_private_key 3 , | 102 | .Xr X509_REQ_check_private_key 3 , |
| 102 | .Xr X509_REQ_digest 3 , | 103 | .Xr X509_REQ_digest 3 , |
| 103 | .Xr X509_REQ_get0_signature 3 , | 104 | .Xr X509_REQ_get0_signature 3 , |
diff --git a/src/lib/libcrypto/man/X509at_add1_attr.3 b/src/lib/libcrypto/man/X509at_add1_attr.3 index b501b1ca62..3d29c56ef9 100644 --- a/src/lib/libcrypto/man/X509at_add1_attr.3 +++ b/src/lib/libcrypto/man/X509at_add1_attr.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509at_add1_attr.3,v 1.4 2021/10/25 12:25:14 schwarze Exp $ | 1 | .\" $OpenBSD: X509at_add1_attr.3,v 1.5 2021/10/26 12:56:48 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | .\" | 16 | .\" |
| 17 | .Dd $Mdocdate: October 25 2021 $ | 17 | .Dd $Mdocdate: October 26 2021 $ |
| 18 | .Dt X509AT_ADD1_ATTR 3 | 18 | .Dt X509AT_ADD1_ATTR 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -126,6 +126,7 @@ is negative or greater than or equal to the number of objects in | |||
| 126 | .Xr STACK_OF 3 , | 126 | .Xr STACK_OF 3 , |
| 127 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | 127 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , |
| 128 | .Xr X509_ATTRIBUTE_new 3 , | 128 | .Xr X509_ATTRIBUTE_new 3 , |
| 129 | .Xr X509_REQ_add1_attr 3 , | ||
| 129 | .Xr X509at_get_attr 3 | 130 | .Xr X509at_get_attr 3 |
| 130 | .Sh HISTORY | 131 | .Sh HISTORY |
| 131 | These functions first appeared in OpenSSL 0.9.5 | 132 | These functions first appeared in OpenSSL 0.9.5 |
diff --git a/src/lib/libcrypto/man/X509at_get_attr.3 b/src/lib/libcrypto/man/X509at_get_attr.3 index 45b93f9243..418302b1b3 100644 --- a/src/lib/libcrypto/man/X509at_get_attr.3 +++ b/src/lib/libcrypto/man/X509at_get_attr.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509at_get_attr.3,v 1.4 2021/10/25 12:25:14 schwarze Exp $ | 1 | .\" $OpenBSD: X509at_get_attr.3,v 1.5 2021/10/26 12:56:48 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | .\" | 16 | .\" |
| 17 | .Dd $Mdocdate: October 25 2021 $ | 17 | .Dd $Mdocdate: October 26 2021 $ |
| 18 | .Dt X509AT_GET_ATTR 3 | 18 | .Dt X509AT_GET_ATTR 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -145,6 +145,7 @@ on failure. | |||
| 145 | .Xr STACK_OF 3 , | 145 | .Xr STACK_OF 3 , |
| 146 | .Xr X509_ATTRIBUTE_get0_data 3 , | 146 | .Xr X509_ATTRIBUTE_get0_data 3 , |
| 147 | .Xr X509_ATTRIBUTE_new 3 , | 147 | .Xr X509_ATTRIBUTE_new 3 , |
| 148 | .Xr X509_REQ_get_attr 3 , | ||
| 148 | .Xr X509at_add1_attr 3 | 149 | .Xr X509at_add1_attr 3 |
| 149 | .Sh HISTORY | 150 | .Sh HISTORY |
| 150 | .Fn X509at_get_attr , | 151 | .Fn X509at_get_attr , |
