diff options
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509at_add1_attr.3 | 131 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509at_get_attr.3 | 5 |
4 files changed, 140 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index e31e6992a2..74b3a251af 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.197 2021/10/22 11:24:45 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.198 2021/10/22 13:29:41 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -275,8 +275,6 @@ MAN= \ | |||
| 275 | UI_get_string_type.3 \ | 275 | UI_get_string_type.3 \ |
| 276 | UI_new.3 \ | 276 | UI_new.3 \ |
| 277 | X25519.3 \ | 277 | X25519.3 \ |
| 278 | X509V3_get_d2i.3 \ | ||
| 279 | X509at_get_attr.3 \ | ||
| 280 | X509_ALGOR_dup.3 \ | 278 | X509_ALGOR_dup.3 \ |
| 281 | X509_ATTRIBUTE_get0_object.3 \ | 279 | X509_ATTRIBUTE_get0_object.3 \ |
| 282 | X509_ATTRIBUTE_new.3 \ | 280 | X509_ATTRIBUTE_new.3 \ |
| @@ -345,6 +343,9 @@ MAN= \ | |||
| 345 | X509_verify_cert.3 \ | 343 | X509_verify_cert.3 \ |
| 346 | X509V3_EXT_print.3 \ | 344 | X509V3_EXT_print.3 \ |
| 347 | X509V3_extensions_print.3 \ | 345 | X509V3_extensions_print.3 \ |
| 346 | X509V3_get_d2i.3 \ | ||
| 347 | X509at_add1_attr.3 \ | ||
| 348 | X509at_get_attr.3 \ | ||
| 348 | X509v3_get_ext_by_NID.3 \ | 349 | X509v3_get_ext_by_NID.3 \ |
| 349 | crypto.3 \ | 350 | crypto.3 \ |
| 350 | d2i_ASN1_NULL.3 \ | 351 | d2i_ASN1_NULL.3 \ |
diff --git a/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 b/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 index c25144531a..1d059accea 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.12 2021/10/22 11:24:45 schwarze Exp $ | 1 | .\" $OpenBSD: X509_ATTRIBUTE_new.3,v 1.13 2021/10/22 13:29:41 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 | .\" |
| @@ -120,6 +120,7 @@ fails on | |||
| 120 | .Xr X509_EXTENSION_new 3 , | 120 | .Xr X509_EXTENSION_new 3 , |
| 121 | .Xr X509_new 3 , | 121 | .Xr X509_new 3 , |
| 122 | .Xr X509_REQ_new 3 , | 122 | .Xr X509_REQ_new 3 , |
| 123 | .Xr X509at_add1_attr 3 , | ||
| 123 | .Xr X509at_get_attr 3 | 124 | .Xr X509at_get_attr 3 |
| 124 | .Sh STANDARDS | 125 | .Sh STANDARDS |
| 125 | .Bl -ohang | 126 | .Bl -ohang |
diff --git a/src/lib/libcrypto/man/X509at_add1_attr.3 b/src/lib/libcrypto/man/X509at_add1_attr.3 new file mode 100644 index 0000000000..cb5999a702 --- /dev/null +++ b/src/lib/libcrypto/man/X509at_add1_attr.3 | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | .\" $OpenBSD: X509at_add1_attr.3,v 1.1 2021/10/22 13:29:41 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 22 2021 $ | ||
| 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 STACK_OF 3 , | ||
| 125 | .Xr X509_ATTRIBUTE_create_by_OBJ 3 , | ||
| 126 | .Xr X509_ATTRIBUTE_new 3 , | ||
| 127 | .Xr X509at_get_attr 3 | ||
| 128 | .Sh HISTORY | ||
| 129 | These funtions first appeared in OpenSSL 0.9.5 | ||
| 130 | and have been available since | ||
| 131 | .Ox 2.7 . | ||
diff --git a/src/lib/libcrypto/man/X509at_get_attr.3 b/src/lib/libcrypto/man/X509at_get_attr.3 index 8e1a65e2d1..64a2d8d479 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.1 2021/10/22 11:24:45 schwarze Exp $ | 1 | .\" $OpenBSD: X509at_get_attr.3,v 1.2 2021/10/22 13:29:41 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -142,7 +142,8 @@ on failure. | |||
| 142 | .Xr OBJ_nid2obj 3 , | 142 | .Xr OBJ_nid2obj 3 , |
| 143 | .Xr STACK_OF 3 , | 143 | .Xr STACK_OF 3 , |
| 144 | .Xr X509_ATTRIBUTE_get0_data 3 , | 144 | .Xr X509_ATTRIBUTE_get0_data 3 , |
| 145 | .Xr X509_ATTRIBUTE_new 3 | 145 | .Xr X509_ATTRIBUTE_new 3 , |
| 146 | .Xr X509at_add1_attr 3 | ||
| 146 | .Sh HISTORY | 147 | .Sh HISTORY |
| 147 | .Fn X509at_get_attr , | 148 | .Fn X509at_get_attr , |
| 148 | .Fn X509at_get_attr_count , | 149 | .Fn X509at_get_attr_count , |
