diff options
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 b/src/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 index 71dd98ce46..19a123a4ac 100644 --- a/src/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 +++ b/src/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_NAME_get_index_by_NID.3,v 1.13 2022/07/02 17:09:09 jsing Exp $ | 1 | .\" $OpenBSD: X509_NAME_get_index_by_NID.3,v 1.14 2023/05/02 14:13:05 beck Exp $ |
| 2 | .\" OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 | 2 | .\" OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
| @@ -49,7 +49,7 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 51 | .\" | 51 | .\" |
| 52 | .Dd $Mdocdate: July 2 2022 $ | 52 | .Dd $Mdocdate: May 2 2023 $ |
| 53 | .Dt X509_NAME_GET_INDEX_BY_NID 3 | 53 | .Dt X509_NAME_GET_INDEX_BY_NID 3 |
| 54 | .Os | 54 | .Os |
| 55 | .Sh NAME | 55 | .Sh NAME |
| @@ -136,22 +136,32 @@ run from 0 to | |||
| 136 | .Fn X509_NAME_get_text_by_NID | 136 | .Fn X509_NAME_get_text_by_NID |
| 137 | and | 137 | and |
| 138 | .Fn X509_NAME_get_text_by_OBJ | 138 | .Fn X509_NAME_get_text_by_OBJ |
| 139 | retrieve the "text" from the first entry in | 139 | retrieve the bytes encoded as UTF-8 from the first entry in |
| 140 | .Fa name | 140 | .Fa name |
| 141 | which matches | 141 | which matches |
| 142 | .Fa nid | 142 | .Fa nid |
| 143 | or | 143 | or |
| 144 | .Fa obj . | 144 | .Fa obj . |
| 145 | At most | ||
| 146 | .Fa len | ||
| 147 | bytes will be written and the text written to | ||
| 148 | .Fa buf | ||
| 149 | will be NUL terminated. | ||
| 150 | If | 145 | If |
| 151 | .Fa buf | 146 | .Fa buf |
| 152 | is | 147 | is |
| 153 | .Dv NULL , | 148 | .Dv NULL , |
| 154 | nothing is written, but the return value is calculated as usual. | 149 | nothing is written, but the return value is calculated as usual. |
| 150 | If | ||
| 151 | .Fa buf | ||
| 152 | is not | ||
| 153 | .Dv NULL , | ||
| 154 | no more than | ||
| 155 | .Fa len | ||
| 156 | bytes will be written and the text written to | ||
| 157 | .Fa buf | ||
| 158 | will be NUL terminated. | ||
| 159 | .Pp | ||
| 160 | Nothing is written and it is a failure if | ||
| 161 | .Fa len | ||
| 162 | is not large enough to hold the NUL byte terminated UTF-8 encoding of | ||
| 163 | the text, or if the UTF-8 encoding ot the text would contins a NUL | ||
| 164 | byte. | ||
| 155 | .Pp | 165 | .Pp |
| 156 | All relevant | 166 | All relevant |
| 157 | .Dv NID_* | 167 | .Dv NID_* |
| @@ -189,8 +199,8 @@ if the index is invalid. | |||
| 189 | .Fn X509_NAME_get_text_by_NID | 199 | .Fn X509_NAME_get_text_by_NID |
| 190 | and | 200 | and |
| 191 | .Fn X509_NAME_get_text_by_OBJ | 201 | .Fn X509_NAME_get_text_by_OBJ |
| 192 | return the length of the output string written, not counting the | 202 | return the length of the output UTF-8 string written, not counting the |
| 193 | terminating NUL, or -1 if no match is found. | 203 | terminating NUL, or -1 in the case of an error or no match being found. |
| 194 | .Pp | 204 | .Pp |
| 195 | In some cases of failure of | 205 | In some cases of failure of |
| 196 | .Fn X509_NAME_get_index_by_NID | 206 | .Fn X509_NAME_get_index_by_NID |
