diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509at_add1_attr.3 | 133 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509at_get_attr.3 | 158 |
4 files changed, 4 insertions, 299 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 11c990ebd2..3b636f2441 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.292 2024/08/29 20:25:13 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.293 2024/09/02 07:57:27 tb Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -376,8 +376,6 @@ MAN= \ | |||
| 376 | X509_sign.3 \ | 376 | X509_sign.3 \ |
| 377 | X509_signature_dump.3 \ | 377 | X509_signature_dump.3 \ |
| 378 | X509_verify_cert.3 \ | 378 | X509_verify_cert.3 \ |
| 379 | X509at_add1_attr.3 \ | ||
| 380 | X509at_get_attr.3 \ | ||
| 381 | X509v3_addr_add_inherit.3 \ | 379 | X509v3_addr_add_inherit.3 \ |
| 382 | X509v3_addr_get_range.3 \ | 380 | X509v3_addr_get_range.3 \ |
| 383 | X509v3_addr_inherits.3 \ | 381 | X509v3_addr_inherits.3 \ |
diff --git a/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 b/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 index 8d664cd69e..cc2b27d4c0 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.17 2024/08/24 09:15:36 tb Exp $ | 1 | .\" $OpenBSD: X509_ATTRIBUTE_new.3,v 1.18 2024/09/02 07:57:27 tb 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: August 24 2024 $ | 17 | .Dd $Mdocdate: September 2 2024 $ |
| 18 | .Dt X509_ATTRIBUTE_NEW 3 | 18 | .Dt X509_ATTRIBUTE_NEW 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -121,9 +121,7 @@ fails on | |||
| 121 | .Xr X509_EXTENSION_new 3 , | 121 | .Xr X509_EXTENSION_new 3 , |
| 122 | .Xr X509_new 3 , | 122 | .Xr X509_new 3 , |
| 123 | .Xr X509_REQ_add1_attr 3 , | 123 | .Xr X509_REQ_add1_attr 3 , |
| 124 | .Xr X509_REQ_new 3 , | 124 | .Xr X509_REQ_new 3 |
| 125 | .Xr X509at_add1_attr 3 , | ||
| 126 | .Xr X509at_get_attr 3 | ||
| 127 | .Sh STANDARDS | 125 | .Sh STANDARDS |
| 128 | .Bl -ohang | 126 | .Bl -ohang |
| 129 | .It Xo | 127 | .It Xo |
diff --git a/src/lib/libcrypto/man/X509at_add1_attr.3 b/src/lib/libcrypto/man/X509at_add1_attr.3 deleted file mode 100644 index 126b1b41ba..0000000000 --- a/src/lib/libcrypto/man/X509at_add1_attr.3 +++ /dev/null | |||
| @@ -1,133 +0,0 @@ | |||
| 1 | .\" $OpenBSD: X509at_add1_attr.3,v 1.6 2024/08/24 09:15:36 tb 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: August 24 2024 $ | ||
| 18 | .Dt X509AT_ADD1_ATTR 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm X509at_add1_attr , | ||
| 22 | .Nm X509at_add1_attr_by_OBJ , | ||
| 23 | .Nm X509at_add1_attr_by_NID , | ||
| 24 | .Nm X509at_add1_attr_by_txt , | ||
| 25 | .Nm X509at_delete_attr | ||
| 26 | .Nd change an array of X.501 Attribute objects | ||
| 27 | .Sh SYNOPSIS | ||
| 28 | .In openssl/x509.h | ||
| 29 | .Ft STACK_OF(X509_ATTRIBUTE) * | ||
| 30 | .Fo X509at_add1_attr | ||
| 31 | .Fa "STACK_OF(X509_ATTRIBUTE) **pattrs" | ||
| 32 | .Fa "X509_ATTRIBUTE *attr" | ||
| 33 | .Fc | ||
| 34 | .Ft STACK_OF(X509_ATTRIBUTE) * | ||
| 35 | .Fo X509at_add1_attr_by_OBJ | ||
| 36 | .Fa "STACK_OF(X509_ATTRIBUTE) **pattrs" | ||
| 37 | .Fa "const ASN1_OBJECT *obj" | ||
| 38 | .Fa "int type" | ||
| 39 | .Fa "const unsigned char *data" | ||
| 40 | .Fa "int len" | ||
| 41 | .Fc | ||
| 42 | .Ft STACK_OF(X509_ATTRIBUTE) * | ||
| 43 | .Fo X509at_add1_attr_by_NID | ||
| 44 | .Fa "STACK_OF(X509_ATTRIBUTE) **pattrs" | ||
| 45 | .Fa "int nid" | ||
| 46 | .Fa "int type" | ||
| 47 | .Fa "const unsigned char *data" | ||
| 48 | .Fa "int len" | ||
| 49 | .Fc | ||
| 50 | .Ft STACK_OF(X509_ATTRIBUTE) * | ||
| 51 | .Fo X509at_add1_attr_by_txt | ||
| 52 | .Fa "STACK_OF(X509_ATTRIBUTE) **pattrs" | ||
| 53 | .Fa "const char *name" | ||
| 54 | .Fa "int type" | ||
| 55 | .Fa "const unsigned char *data" | ||
| 56 | .Fa "int len" | ||
| 57 | .Fc | ||
| 58 | .Ft X509_ATTRIBUTE * | ||
| 59 | .Fo X509at_delete_attr | ||
| 60 | .Fa "STACK_OF(X509_ATTRIBUTE) *attrs" | ||
| 61 | .Fa "int index" | ||
| 62 | .Fc | ||
| 63 | .Sh DESCRIPTION | ||
| 64 | .Fn X509at_add1_attr | ||
| 65 | appends a deep copy of | ||
| 66 | .Fa attr | ||
| 67 | to the end of | ||
| 68 | .Pf ** Fa pattrs . | ||
| 69 | If | ||
| 70 | .Pf * Fa pattrs | ||
| 71 | is | ||
| 72 | .Dv NULL , | ||
| 73 | a new array is allocated, and in case of success, | ||
| 74 | a pointer to it is assigned to | ||
| 75 | .Pf * Fa pattrs . | ||
| 76 | .Pp | ||
| 77 | .Fn X509at_add1_attr_by_OBJ , | ||
| 78 | .Fn X509at_add1_attr_by_NID , | ||
| 79 | and | ||
| 80 | .Fn X509at_add1_attr_by_txt | ||
| 81 | create a new X.501 Attribute object using | ||
| 82 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
| 83 | .Xr X509_ATTRIBUTE_create_by_NID 3 , | ||
| 84 | or | ||
| 85 | .Xr X509_ATTRIBUTE_create_by_txt 3 , | ||
| 86 | respectively, and append it to | ||
| 87 | .Pf ** Fa pattrs | ||
| 88 | using | ||
| 89 | .Fn X509at_add1_attr . | ||
| 90 | .Pp | ||
| 91 | .Fn X509at_delete_attr | ||
| 92 | deletes the element with the zero-based | ||
| 93 | .Fa index | ||
| 94 | from the array | ||
| 95 | .Pf * Fa attrs . | ||
| 96 | .Sh RETURN VALUES | ||
| 97 | .Fn X509at_add1_attr , | ||
| 98 | .Fn X509at_add1_attr_by_OBJ , | ||
| 99 | .Fn X509at_add1_attr_by_NID , | ||
| 100 | and | ||
| 101 | .Fn X509at_add1_attr_by_txt | ||
| 102 | return a pointer to the modified or new array or | ||
| 103 | .Dv NULL | ||
| 104 | if the | ||
| 105 | .Fa pattrs | ||
| 106 | argument is | ||
| 107 | .Dv NULL | ||
| 108 | or if creating or copying the X.501 Attribute object | ||
| 109 | or memory allocation fails. | ||
| 110 | .Pp | ||
| 111 | .Fn X509at_delete_attr | ||
| 112 | returns the deleted element or | ||
| 113 | .Dv NULL | ||
| 114 | if | ||
| 115 | .Fa attrs | ||
| 116 | is | ||
| 117 | .Dv NULL | ||
| 118 | or if the requested | ||
| 119 | .Fa index | ||
| 120 | is negative or greater than or equal to the number of objects in | ||
| 121 | .Pf * Fa attrs . | ||
| 122 | .Sh SEE ALSO | ||
| 123 | .Xr OBJ_nid2obj 3 , | ||
| 124 | .Xr PKCS8_pkey_add1_attr_by_NID 3 , | ||
| 125 | .Xr STACK_OF 3 , | ||
| 126 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
| 127 | .Xr X509_ATTRIBUTE_new 3 , | ||
| 128 | .Xr X509_REQ_add1_attr 3 , | ||
| 129 | .Xr X509at_get_attr 3 | ||
| 130 | .Sh HISTORY | ||
| 131 | These functions first appeared in OpenSSL 0.9.5 | ||
| 132 | and have been available since | ||
| 133 | .Ox 2.7 . | ||
diff --git a/src/lib/libcrypto/man/X509at_get_attr.3 b/src/lib/libcrypto/man/X509at_get_attr.3 deleted file mode 100644 index 03581695b3..0000000000 --- a/src/lib/libcrypto/man/X509at_get_attr.3 +++ /dev/null | |||
| @@ -1,158 +0,0 @@ | |||
| 1 | .\" $OpenBSD: X509at_get_attr.3,v 1.9 2024/08/24 09:23:09 tb 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: August 24 2024 $ | ||
| 18 | .Dt X509AT_GET_ATTR 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm X509at_get_attr , | ||
| 22 | .Nm X509at_get_attr_count , | ||
| 23 | .Nm X509at_get_attr_by_OBJ , | ||
| 24 | .Nm X509at_get_attr_by_NID , | ||
| 25 | .Nm X509at_get0_data_by_OBJ | ||
| 26 | .\" In the following line, "X.501" and "Attribute" are not typos. | ||
| 27 | .\" The "Attribute" type is defined in X.501, not in X.509. | ||
| 28 | .\" The type is called "Attribute" with capital "A", not "attribute". | ||
| 29 | .Nd X.501 Attribute array read accessors | ||
| 30 | .Sh SYNOPSIS | ||
| 31 | .In openssl/x509.h | ||
| 32 | .Ft X509_ATTRIBUTE * | ||
| 33 | .Fo X509at_get_attr | ||
| 34 | .Fa "const STACK_OF(X509_ATTRIBUTE) *attrs" | ||
| 35 | .Fa "int index" | ||
| 36 | .Fc | ||
| 37 | .Ft int | ||
| 38 | .Fo X509at_get_attr_count | ||
| 39 | .Fa "const STACK_OF(X509_ATTRIBUTE) *attrs" | ||
| 40 | .Fc | ||
| 41 | .Ft int | ||
| 42 | .Fo X509at_get_attr_by_OBJ | ||
| 43 | .Fa "const STACK_OF(X509_ATTRIBUTE) *attrs" | ||
| 44 | .Fa "const ASN1_OBJECT *obj" | ||
| 45 | .Fa "int start_after" | ||
| 46 | .Fc | ||
| 47 | .Ft int | ||
| 48 | .Fo X509at_get_attr_by_NID | ||
| 49 | .Fa "const STACK_OF(X509_ATTRIBUTE) *attrs" | ||
| 50 | .Fa "int nid" | ||
| 51 | .Fa "int start_after" | ||
| 52 | .Fc | ||
| 53 | .Ft void * | ||
| 54 | .Fo X509at_get0_data_by_OBJ | ||
| 55 | .Fa "STACK_OF(X509_ATTRIBUTE) *attrs" | ||
| 56 | .Fa "const ASN1_OBJECT *obj" | ||
| 57 | .Fa "int start_after" | ||
| 58 | .Fa "int type" | ||
| 59 | .Fc | ||
| 60 | .Sh DESCRIPTION | ||
| 61 | These functions retrieve information from the | ||
| 62 | .Fa attrs | ||
| 63 | array of X.501 Attribute objects. | ||
| 64 | They all fail if | ||
| 65 | .Fa attrs | ||
| 66 | is a | ||
| 67 | .Dv NULL | ||
| 68 | pointer. | ||
| 69 | .Pp | ||
| 70 | .Fn X509at_get_attr | ||
| 71 | returns the array element at the zero-based | ||
| 72 | .Fa index . | ||
| 73 | It fails if the | ||
| 74 | .Fa index | ||
| 75 | is negative or greater than or equal to the number of objects in the array. | ||
| 76 | .Pp | ||
| 77 | .Fn X509at_get_attr_count | ||
| 78 | returns the number of objects currently stored in the array. | ||
| 79 | .Pp | ||
| 80 | The three remaining functions search the array starting after the index | ||
| 81 | .Fa start_after . | ||
| 82 | They fail if no matching object is found. | ||
| 83 | .Fn X509at_get0_data_by_OBJ | ||
| 84 | also fails if the data is not of the requested | ||
| 85 | .Fa type . | ||
| 86 | .Pp | ||
| 87 | Additionally, the | ||
| 88 | .Fa start_after | ||
| 89 | argument of | ||
| 90 | .Fn X509at_get0_data_by_OBJ | ||
| 91 | is interpreted in a special way. | ||
| 92 | If | ||
| 93 | .Fa start_after | ||
| 94 | is \-2 or smaller, | ||
| 95 | .Fn X509at_get0_data_by_OBJ | ||
| 96 | also fails if | ||
| 97 | .Fa attrs | ||
| 98 | contains more than one matching object. | ||
| 99 | If | ||
| 100 | .Fa start_after | ||
| 101 | is \-3 or smaller, it also fails unless the matching object | ||
| 102 | contains exactly one value. | ||
| 103 | .Sh RETURN VALUES | ||
| 104 | .Fn X509at_get_attr | ||
| 105 | returns an internal pointer or | ||
| 106 | .Dv NULL | ||
| 107 | on failure. | ||
| 108 | .Pp | ||
| 109 | .Fn X509at_get_attr_count | ||
| 110 | returns the number of array elements or \-1 on failure. | ||
| 111 | .Pp | ||
| 112 | .Fn X509at_get_attr_by_OBJ | ||
| 113 | and | ||
| 114 | .Fn X509at_get_attr_by_NID | ||
| 115 | return the index of the first object in the array | ||
| 116 | that has an index greater than | ||
| 117 | .Fa start_after | ||
| 118 | and a type matching | ||
| 119 | .Fa obj | ||
| 120 | or | ||
| 121 | .Fa nid , | ||
| 122 | respectively, or \-1 on failure. | ||
| 123 | In addition, | ||
| 124 | .Fn X509at_get_attr_by_NID | ||
| 125 | returns \-2 | ||
| 126 | if | ||
| 127 | .Xr OBJ_nid2obj 3 | ||
| 128 | fails on the requested | ||
| 129 | .Fa nid . | ||
| 130 | .Pp | ||
| 131 | .Fn X509at_get0_data_by_OBJ | ||
| 132 | returns an internal pointer to the data contained in the value | ||
| 133 | of the first object that has an index greater than | ||
| 134 | .Fa start_after | ||
| 135 | and a type matching | ||
| 136 | .Fa obj , | ||
| 137 | or | ||
| 138 | .Dv NULL | ||
| 139 | on failure. | ||
| 140 | .Sh SEE ALSO | ||
| 141 | .Xr OBJ_nid2obj 3 , | ||
| 142 | .Xr PKCS8_pkey_get0_attrs 3 , | ||
| 143 | .Xr STACK_OF 3 , | ||
| 144 | .Xr X509_ATTRIBUTE_get0_data 3 , | ||
| 145 | .Xr X509_ATTRIBUTE_new 3 , | ||
| 146 | .Xr X509_REQ_get_attr 3 | ||
| 147 | .Sh HISTORY | ||
| 148 | .Fn X509at_get_attr , | ||
| 149 | .Fn X509at_get_attr_count , | ||
| 150 | .Fn X509at_get_attr_by_OBJ , | ||
| 151 | and | ||
| 152 | .Fn X509at_get_attr_by_NID | ||
| 153 | first appeared in OpenSSL 0.9.5 and have been available since | ||
| 154 | .Ox 2.7 . | ||
| 155 | .Pp | ||
| 156 | .Fn X509at_get0_data_by_OBJ | ||
| 157 | first appeared in OpenSSL 0.9.8h and has been available since | ||
| 158 | .Ox 4.5 . | ||
