summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2023-09-07 16:32:41 +0000
committerschwarze <>2023-09-07 16:32:41 +0000
commit5ac123b6cba33347bb62c1e2a0361961d13b53b9 (patch)
tree52fb44dffeaf57addbc7fecdf785231dfebcd1bc /src
parentdfa84a8260fbf7a4973ae27e125b3215b5150261 (diff)
downloadopenbsd-5ac123b6cba33347bb62c1e2a0361961d13b53b9.tar.gz
openbsd-5ac123b6cba33347bb62c1e2a0361961d13b53b9.tar.bz2
openbsd-5ac123b6cba33347bb62c1e2a0361961d13b53b9.zip
document EVP_MD_nid(3) and EVP_MD_name(3)
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/EVP_MD_nid.345
1 files changed, 41 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/EVP_MD_nid.3 b/src/lib/libcrypto/man/EVP_MD_nid.3
index 950e7af930..acc0c704f4 100644
--- a/src/lib/libcrypto/man/EVP_MD_nid.3
+++ b/src/lib/libcrypto/man/EVP_MD_nid.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: EVP_MD_nid.3,v 1.2 2023/09/07 15:57:04 schwarze Exp $ 1.\" $OpenBSD: EVP_MD_nid.3,v 1.3 2023/09/07 16:32:41 schwarze Exp $
2.\" full merge up to: OpenSSL man3/EVP_DigestInit.pod 2.\" full merge up to: OpenSSL man3/EVP_DigestInit.pod
3.\" 24a535ea Sep 22 13:14:20 2020 +0100 3.\" 24a535ea Sep 22 13:14:20 2020 +0100
4.\" 4.\"
@@ -69,11 +69,13 @@
69.\" OF THE POSSIBILITY OF SUCH DAMAGE. 69.\" OF THE POSSIBILITY OF SUCH DAMAGE.
70.\" 70.\"
71.Dd $Mdocdate: September 7 2023 $ 71.Dd $Mdocdate: September 7 2023 $
72.Dt EVP_MD_TYPE 3 72.Dt EVP_MD_NID 3
73.Os 73.Os
74.Sh NAME 74.Sh NAME
75.Nm EVP_MD_nid ,
75.Nm EVP_MD_type , 76.Nm EVP_MD_type ,
76.Nm EVP_MD_CTX_type , 77.Nm EVP_MD_CTX_type ,
78.Nm EVP_MD_name ,
77.Nm EVP_MD_size , 79.Nm EVP_MD_size ,
78.Nm EVP_MD_CTX_size , 80.Nm EVP_MD_CTX_size ,
79.Nm EVP_MD_block_size , 81.Nm EVP_MD_block_size ,
@@ -84,6 +86,10 @@
84.Sh SYNOPSIS 86.Sh SYNOPSIS
85.In openssl/evp.h 87.In openssl/evp.h
86.Ft int 88.Ft int
89.Fo EVP_MD_nid
90.Fa "const EVP_MD *md"
91.Fc
92.Ft int
87.Fo EVP_MD_type 93.Fo EVP_MD_type
88.Fa "const EVP_MD *md" 94.Fa "const EVP_MD *md"
89.Fc 95.Fc
@@ -91,6 +97,10 @@
91.Fo EVP_MD_CTX_type 97.Fo EVP_MD_CTX_type
92.Fa "const EVP_MD_CTX *ctx" 98.Fa "const EVP_MD_CTX *ctx"
93.Fc 99.Fc
100.Ft const char *
101.Fo EVP_MD_name
102.Fa "const EVP_MD *md"
103.Fc
94.Ft int 104.Ft int
95.Fo EVP_MD_size 105.Fo EVP_MD_size
96.Fa "const EVP_MD *md" 106.Fa "const EVP_MD *md"
@@ -116,8 +126,10 @@
116.Fa "const EVP_MD *md" 126.Fa "const EVP_MD *md"
117.Fc 127.Fc
118.Sh DESCRIPTION 128.Sh DESCRIPTION
129.Fn EVP_MD_nid
130and
119.Fn EVP_MD_type 131.Fn EVP_MD_type
120returns the numerical identifier (NID) of 132are identical and return the numerical identifier (NID) of
121.Fa md . 133.Fa md .
122The NID is an internal value which may or may not have 134The NID is an internal value which may or may not have
123a corresponding ASN.1 OBJECT IDENTIFIER; see 135a corresponding ASN.1 OBJECT IDENTIFIER; see
@@ -133,6 +145,12 @@ returns the NID of the message digest algorithm that
133is configured to use. 145is configured to use.
134These functions are normally used when setting ASN.1 OIDs. 146These functions are normally used when setting ASN.1 OIDs.
135.Pp 147.Pp
148.Fn EVP_MD_name
149converts the NID of
150.Fa md
151to its short name with
152.Xr OBJ_nid2sn 3 .
153.Pp
136.Fn EVP_MD_size 154.Fn EVP_MD_size
137returns the size in bytes of the message digests (hashes) produced by 155returns the size in bytes of the message digests (hashes) produced by
138.Fa md . 156.Fa md .
@@ -169,12 +187,15 @@ is associated with RSA, so this returns
169Since digests and signature algorithms are no longer linked, this 187Since digests and signature algorithms are no longer linked, this
170function is only retained for compatibility reasons. 188function is only retained for compatibility reasons.
171.Pp 189.Pp
190.Fn EVP_MD_nid ,
172.Fn EVP_MD_CTX_type , 191.Fn EVP_MD_CTX_type ,
192.Fn EVP_MD_name ,
173.Fn EVP_MD_CTX_size , 193.Fn EVP_MD_CTX_size ,
174and 194and
175.Fn EVP_MD_CTX_block_size 195.Fn EVP_MD_CTX_block_size
176are implemented as macros. 196are implemented as macros.
177.Sh RETURN VALUES 197.Sh RETURN VALUES
198.Fn EVP_MD_nid ,
178.Fn EVP_MD_type , 199.Fn EVP_MD_type ,
179.Fn EVP_MD_CTX_type , 200.Fn EVP_MD_CTX_type ,
180and 201and
@@ -183,6 +204,15 @@ return the NID of the corresponding OBJECT IDENTIFIER or
183.Dv NID_undef 204.Dv NID_undef
184if none exists. 205if none exists.
185.Pp 206.Pp
207.Fn EVP_MD_name
208returns a pointer to a string
209that is owned by an internal library object or
210.Dv NULL
211if the NID is neither built into the library nor added to the global
212object table by one of the functions documented in the manual page
213.Xr OBJ_create 3 ,
214or if the object does not contain a short name.
215.Pp
186.Fn EVP_MD_size , 216.Fn EVP_MD_size ,
187.Fn EVP_MD_CTX_size , 217.Fn EVP_MD_CTX_size ,
188.Fn EVP_MD_block_size , 218.Fn EVP_MD_block_size ,
@@ -192,7 +222,8 @@ return the digest or block size in bytes.
192.Sh SEE ALSO 222.Sh SEE ALSO
193.Xr evp 3 , 223.Xr evp 3 ,
194.Xr EVP_DigestInit 3 , 224.Xr EVP_DigestInit 3 ,
195.Xr EVP_MD_CTX_ctrl 3 225.Xr EVP_MD_CTX_ctrl 3 ,
226.Xr OBJ_nid2obj 3
196.Sh HISTORY 227.Sh HISTORY
197.Fn EVP_MD_size 228.Fn EVP_MD_size
198first appeared in SSLeay 0.6.6, 229first appeared in SSLeay 0.6.6,
@@ -211,6 +242,12 @@ in SSLeay 0.9.0.
211All these functions have been available since 242All these functions have been available since
212.Ox 2.4 . 243.Ox 2.4 .
213.Pp 244.Pp
245.Fn EVP_MD_nid
246and
247.Fn EVP_MD_name
248first appeared in OpenSSL 0.9.7 and have been available since
249.Ox 3.2 .
250.Pp
214.Fn EVP_MD_flags 251.Fn EVP_MD_flags
215first appeared in OpenSSL 1.0.0 252first appeared in OpenSSL 1.0.0
216and has been available since 253and has been available since