diff options
Diffstat (limited to 'secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3')
-rw-r--r-- | secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 b/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 index 5c10c9f..5c598f8 100644 --- a/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 +++ b/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_NAME_get_index_by_NID 3" -.TH X509_NAME_get_index_by_NID 3 "2015-06-12" "1.0.1o" "OpenSSL" +.TH X509_NAME_get_index_by_NID 3 "2015-07-09" "1.0.1p" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -166,6 +166,7 @@ and issuer names. \&\fIX509_NAME_get_index_by_NID()\fR and \fIX509_NAME_get_index_by_OBJ()\fR retrieve the next index matching \fBnid\fR or \fBobj\fR after \fBlastpos\fR. \fBlastpos\fR should initially be set to \-1. If there are no more entries \-1 is returned. +If \fBnid\fR is invalid (doesn't correspond to a valid \s-1OID\s0) then \-2 is returned. .PP \&\fIX509_NAME_entry_count()\fR returns the total number of entries in \fBname\fR. .PP @@ -198,6 +199,10 @@ various \fBX509_NAME_ENTRY\fR utility functions on the result. The list of all relevant \fBNID_*\fR and \fBOBJ_* codes\fR can be found in the source code header files <openssl/obj_mac.h> and/or <openssl/objects.h>. +.PP +Applications which could pass invalid NIDs to \fIX509_NAME_get_index_by_NID()\fR +should check for the return value of \-2. Alternatively the \s-1NID\s0 validity +can be determined first by checking OBJ_nid2obj(nid) is not \s-1NULL.\s0 .SH "EXAMPLES" .IX Header "EXAMPLES" Process all entries: @@ -233,6 +238,8 @@ Process all commonName entries: .IX Header "RETURN VALUES" \&\fIX509_NAME_get_index_by_NID()\fR and \fIX509_NAME_get_index_by_OBJ()\fR return the index of the next matching entry or \-1 if not found. +\&\fIX509_NAME_get_index_by_NID()\fR can also return \-2 if the supplied +\&\s-1NID\s0 is invalid. .PP \&\fIX509_NAME_entry_count()\fR returns the total number of entries. .PP |