summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EVP_PKEY_cmp.3
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 09:35:34 +0000
committerschwarze <>2016-11-03 09:35:34 +0000
commit4d607f17ea3eb38ed9f7703afd423f6055c686d4 (patch)
tree58d82d0d7f6aeee380eaadbcfaa231ecbe6b90a0 /src/lib/libcrypto/man/EVP_PKEY_cmp.3
parentcf67afe5881727d740e9f6c772aa478123f7d698 (diff)
downloadopenbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.tar.gz
openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.tar.bz2
openbsd-4d607f17ea3eb38ed9f7703afd423f6055c686d4.zip
convert EVP manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_cmp.3')
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_cmp.392
1 files changed, 92 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_cmp.3 b/src/lib/libcrypto/man/EVP_PKEY_cmp.3
new file mode 100644
index 0000000000..a3c3ba4fec
--- /dev/null
+++ b/src/lib/libcrypto/man/EVP_PKEY_cmp.3
@@ -0,0 +1,92 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt EVP_PKEY_CMP 3
3.Os
4.Sh NAME
5.Nm EVP_PKEY_copy_parameters ,
6.Nm EVP_PKEY_missing_parameters ,
7.Nm EVP_PKEY_cmp_parameters ,
8.Nm EVP_PKEY_cmp
9.Nd public key parameter and comparison functions
10.Sh SYNOPSIS
11.In openssl/evp.h
12.Ft int
13.Fo EVP_PKEY_missing_parameters
14.Fa "const EVP_PKEY *pkey"
15.Fc
16.Ft int
17.Fo EVP_PKEY_copy_parameters
18.Fa "EVP_PKEY *to"
19.Fa "const EVP_PKEY *from"
20.Fc
21.Ft int
22.Fo EVP_PKEY_cmp_parameters
23.Fa "const EVP_PKEY *a"
24.Fa "const EVP_PKEY *b"
25.Fc
26.Ft int
27.Fo EVP_PKEY_cmp
28.Fa "const EVP_PKEY *a"
29.Fa "const EVP_PKEY *b"
30.Fc
31.Sh DESCRIPTION
32The function
33.Fn EVP_PKEY_missing_parameters
34returns 1 if the public key parameters of
35.Fa pkey
36are missing and 0 if they are present or the algorithm doesn't use
37parameters.
38.Pp
39The function
40.Fn EVP_PKEY_copy_parameters
41copies the parameters from key
42.Fa from
43to key
44.Fa to .
45.Pp
46The function
47.Fn EVP_PKEY_cmp_parameters
48compares the parameters of keys
49.Fa a
50and
51.Fa b .
52.Pp
53The function
54.Fn EVP_PKEY_cmp
55compares the public key components and parameters (if present) of keys
56.Fa a
57and
58.Fa b .
59.Pp
60The main purpose of the functions
61.Fn EVP_PKEY_missing_parameters
62and
63.Fn EVP_PKEY_copy_parameters
64is to handle public keys in certificates where the parameters are
65sometimes omitted from a public key if they are inherited from the CA
66that signed it.
67.Pp
68Since OpenSSL private keys contain public key components too, the
69function
70.Fn EVP_PKEY_cmp
71can also be used to determine if a private key matches a public key.
72.Sh RETURN VALUES
73The function
74.Fn EVP_PKEY_missing_parameters
75returns 1 if the public key parameters of
76.Fa pkey
77are missing and 0 if they are present or the algorithm doesn't use
78parameters.
79.Pp
80The function
81.Fn EVP_PKEY_copy_parameters
82returns 1 for success and 0 for failure.
83.Pp
84The function
85.Fn EVP_PKEY_cmp_parameters
86and
87.Fn EVP_PKEY_cmp
88return 1 if the keys match, 0 if they don't match, -1 if the key types
89are different and -2 if the operation is not supported.
90.Sh SEE ALSO
91.Xr EVP_PKEY_CTX_new 3 ,
92.Xr EVP_PKEY_keygen 3