From 0f02bc648da8fdc5e20592af0edc8c308dd8f4ae Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 3 May 2023 08:10:23 +0000 Subject: Revert utf-8 fix for X509_NAME_get_index_by_NID to avoid libtls regress for the moment. this will come back after we rethink the failure versus not there case. ok tb@ jsing@ --- src/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 | 30 ++++++++-------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'src/lib/libcrypto/man') 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 19a123a4ac..20730fb52a 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 @@ -.\" $OpenBSD: X509_NAME_get_index_by_NID.3,v 1.14 2023/05/02 14:13:05 beck Exp $ +.\" $OpenBSD: X509_NAME_get_index_by_NID.3,v 1.15 2023/05/03 08:10:23 beck Exp $ .\" OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 .\" .\" This file was written by Dr. Stephen Henson . @@ -49,7 +49,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 2 2023 $ +.Dd $Mdocdate: May 3 2023 $ .Dt X509_NAME_GET_INDEX_BY_NID 3 .Os .Sh NAME @@ -136,32 +136,22 @@ run from 0 to .Fn X509_NAME_get_text_by_NID and .Fn X509_NAME_get_text_by_OBJ -retrieve the bytes encoded as UTF-8 from the first entry in +retrieve the "text" from the first entry in .Fa name which matches .Fa nid or .Fa obj . +At most +.Fa len +bytes will be written and the text written to +.Fa buf +will be NUL terminated. If .Fa buf is .Dv NULL , nothing is written, but the return value is calculated as usual. -If -.Fa buf -is not -.Dv NULL , -no more than -.Fa len -bytes will be written and the text written to -.Fa buf -will be NUL terminated. -.Pp -Nothing is written and it is a failure if -.Fa len -is not large enough to hold the NUL byte terminated UTF-8 encoding of -the text, or if the UTF-8 encoding ot the text would contins a NUL -byte. .Pp All relevant .Dv NID_* @@ -199,8 +189,8 @@ if the index is invalid. .Fn X509_NAME_get_text_by_NID and .Fn X509_NAME_get_text_by_OBJ -return the length of the output UTF-8 string written, not counting the -terminating NUL, or -1 in the case of an error or no match being found. +return the length of the output string written, not counting the +terminating NUL, or -1 if no match is found. .Pp In some cases of failure of .Fn X509_NAME_get_index_by_NID -- cgit v1.2.3-55-g6feb