diff options
| author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
| commit | b1ddde874c215cc8891531ed92876f091b7eb83e (patch) | |
| tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libcrypto/man/ASN1_BIT_STRING_set.3 | |
| parent | f0a36529837a161734c802ae4c42e84e42347be2 (diff) | |
| download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libcrypto/man/ASN1_BIT_STRING_set.3')
| -rw-r--r-- | src/lib/libcrypto/man/ASN1_BIT_STRING_set.3 | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/src/lib/libcrypto/man/ASN1_BIT_STRING_set.3 b/src/lib/libcrypto/man/ASN1_BIT_STRING_set.3 deleted file mode 100644 index a916ca3ab2..0000000000 --- a/src/lib/libcrypto/man/ASN1_BIT_STRING_set.3 +++ /dev/null | |||
| @@ -1,139 +0,0 @@ | |||
| 1 | .\" $OpenBSD: ASN1_BIT_STRING_set.3,v 1.5 2024/12/24 09:48:56 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: December 24 2024 $ | ||
| 18 | .Dt ASN1_BIT_STRING_SET 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm ASN1_BIT_STRING_set , | ||
| 22 | .Nm ASN1_BIT_STRING_set_bit , | ||
| 23 | .Nm ASN1_BIT_STRING_get_bit | ||
| 24 | .Nd ASN.1 BIT STRING accessors | ||
| 25 | .Sh SYNOPSIS | ||
| 26 | .In openssl/asn1.h | ||
| 27 | .Ft int | ||
| 28 | .Fo ASN1_BIT_STRING_set | ||
| 29 | .Fa "ASN1_BIT_STRING *bitstr" | ||
| 30 | .Fa "unsigned char *data" | ||
| 31 | .Fa "int len" | ||
| 32 | .Fc | ||
| 33 | .Ft int | ||
| 34 | .Fo ASN1_BIT_STRING_set_bit | ||
| 35 | .Fa "ASN1_BIT_STRING *bitstr" | ||
| 36 | .Fa "int bitnumber" | ||
| 37 | .Fa "int set" | ||
| 38 | .Fc | ||
| 39 | .Ft int | ||
| 40 | .Fo ASN1_BIT_STRING_get_bit | ||
| 41 | .Fa "ASN1_BIT_STRING *bitstr" | ||
| 42 | .Fa "int bitnumber" | ||
| 43 | .Fc | ||
| 44 | .Sh DESCRIPTION | ||
| 45 | .Fn ASN1_BIT_STRING_set | ||
| 46 | sets the length attribute of | ||
| 47 | .Fa bitstr | ||
| 48 | to | ||
| 49 | .Fa len | ||
| 50 | and copies that number of bytes from | ||
| 51 | .Fa data | ||
| 52 | into | ||
| 53 | .Fa bitstr , | ||
| 54 | overwriting any previous data, by merely calling | ||
| 55 | .Xr ASN1_STRING_set 3 . | ||
| 56 | This function does no validation whatsoever. | ||
| 57 | In particular, it neither checks that | ||
| 58 | .Fa bitstr | ||
| 59 | is actually of the type | ||
| 60 | .Dv V_ASN1_BIT_STRING | ||
| 61 | nor, even if it is, that the | ||
| 62 | .Fa data | ||
| 63 | and | ||
| 64 | .Fa len | ||
| 65 | arguments make sense for this particular bit string. | ||
| 66 | .Pp | ||
| 67 | If the | ||
| 68 | .Fa set | ||
| 69 | argument is non-zero, | ||
| 70 | .Fn ASN1_BIT_STRING_set_bit | ||
| 71 | sets the bit with the given | ||
| 72 | .Fa bitnumber | ||
| 73 | in the | ||
| 74 | .Fa bitstr ; | ||
| 75 | otherwise, it clears that bit. | ||
| 76 | A | ||
| 77 | .Fa bitnumber | ||
| 78 | of 0 addresses the most significant bit in the first data byte of | ||
| 79 | .Fa bitstr , | ||
| 80 | 7 the least significant bit in the same byte, | ||
| 81 | 8 the most significant bit in the second data byte, and so on. | ||
| 82 | .Pp | ||
| 83 | If setting a bit is requested beyond the last existing data byte, | ||
| 84 | additional bytes are added to the | ||
| 85 | .Fa bitstr | ||
| 86 | as needed. | ||
| 87 | After clearing a bit, any trailing NUL bytes are removed from the | ||
| 88 | .Fa bitstr . | ||
| 89 | .Pp | ||
| 90 | .Fn ASN1_BIT_STRING_get_bit | ||
| 91 | checks that the bit with the given | ||
| 92 | .Fa bitnumber | ||
| 93 | is set in | ||
| 94 | .Fa bitstr . | ||
| 95 | .Sh RETURN VALUES | ||
| 96 | .Fn ASN1_BIT_STRING_set | ||
| 97 | returns 1 on success or 0 if memory allocation fails or if | ||
| 98 | .Fa data | ||
| 99 | is | ||
| 100 | .Dv NULL | ||
| 101 | and | ||
| 102 | .Fa len | ||
| 103 | is \-1 in the same call. | ||
| 104 | .Pp | ||
| 105 | .Fn ASN1_BIT_STRING_set_bit | ||
| 106 | returns 1 on success or 0 if | ||
| 107 | .Fa bitstr | ||
| 108 | is | ||
| 109 | .Dv NULL | ||
| 110 | or if memory allocation fails. | ||
| 111 | .Pp | ||
| 112 | .Fn ASN1_BIT_STRING_get_bit | ||
| 113 | returns 1 if the bit with the given | ||
| 114 | .Fa bitnumber | ||
| 115 | is set in the | ||
| 116 | .Fa bitstr | ||
| 117 | or 0 if | ||
| 118 | .Fa bitstr | ||
| 119 | is | ||
| 120 | .Dv NULL , | ||
| 121 | if | ||
| 122 | .Fa bitnumber | ||
| 123 | points beyond the last data byte in | ||
| 124 | .Fa bitstr , | ||
| 125 | or if the requested bit is not set. | ||
| 126 | .Sh SEE ALSO | ||
| 127 | .Xr ASN1_BIT_STRING_new 3 , | ||
| 128 | .Xr ASN1_STRING_set 3 , | ||
| 129 | .Xr d2i_ASN1_BIT_STRING 3 , | ||
| 130 | .Xr v2i_ASN1_BIT_STRING 3 | ||
| 131 | .Sh HISTORY | ||
| 132 | .Fn ASN1_BIT_STRING_set | ||
| 133 | first appeared in SSLeay 0.6.5. | ||
| 134 | .Fn ASN1_BIT_STRING_set_bit | ||
| 135 | and | ||
| 136 | .Fn ASN1_BIT_STRING_get_bit | ||
| 137 | first appeared in SSLeay 0.9.0. | ||
| 138 | These functions have been available since | ||
| 139 | .Ox 2.4 . | ||
