From 8ab50eb501eb6bde2031153606892adcf116b569 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Sat, 7 Jan 2017 01:25:14 +0000 Subject: Document X509_NAME_hash(3), listed in ; jmc@ reported that X509_LOOKUP_hash_dir(3) references it. Even though OpenSSL does not document it, given that it is used for file names that users have to create, it is sufficiently exposed to users to be worth documenting. --- src/lib/libcrypto/man/d2i_X509_NAME.3 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/man/d2i_X509_NAME.3 b/src/lib/libcrypto/man/d2i_X509_NAME.3 index f5dc62fb8e..3bca5c9bff 100644 --- a/src/lib/libcrypto/man/d2i_X509_NAME.3 +++ b/src/lib/libcrypto/man/d2i_X509_NAME.3 @@ -1,7 +1,7 @@ -.\" $OpenBSD: d2i_X509_NAME.3,v 1.8 2016/12/28 14:33:34 schwarze Exp $ +.\" $OpenBSD: d2i_X509_NAME.3,v 1.9 2017/01/07 01:25:14 schwarze Exp $ .\" OpenSSL d900a015 Oct 8 14:40:42 2015 +0200 .\" -.\" Copyright (c) 2016 Ingo Schwarze +.\" Copyright (c) 2016, 2017 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -15,13 +15,14 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 28 2016 $ +.Dd $Mdocdate: January 7 2017 $ .Dt D2I_X509_NAME 3 .Os .Sh NAME .Nm d2i_X509_NAME , .Nm i2d_X509_NAME , .Nm X509_NAME_dup , +.Nm X509_NAME_hash , .Nm d2i_X509_NAME_ENTRY , .Nm i2d_X509_NAME_ENTRY , .Nm X509_NAME_ENTRY_dup @@ -46,6 +47,10 @@ .Fo X509_NAME_dup .Fa "X509_NAME *val_in" .Fc +.Ft unsigned long +.Fo X509_NAME_hash +.Fa "X509_NAME *val_in" +.Fc .Ft X509_NAME_ENTRY * .Fo d2i_X509_NAME_ENTRY .Fa "X509_NAME_ENTRY **val_out" @@ -83,6 +88,15 @@ by calling and .Fn d2i_X509_NAME . .Pp +.Fn X509_NAME_hash +calculates an +.Xr SHA1 3 +hash of the DER-encoded form of the name +.Pf * Fa val_in . +It is for example used by +.Xr X509_LOOKUP_hash_dir 3 +to locate certificate files in the file system. +.Pp .Fn d2i_X509_NAME_ENTRY and .Fn i2d_X509_NAME_ENTRY @@ -107,6 +121,9 @@ object or .Dv NULL if an error occurs. .Pp +.Fn X509_NAME_hash +returns the hash value or 0 if an error occurs. +.Pp .Fn d2i_X509_NAME_ENTRY and .Fn X509_NAME_ENTRY_dup -- cgit v1.2.3-55-g6feb