diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_cmp.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_cmp.3 | 92 |
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 | ||
| 32 | The function | ||
| 33 | .Fn EVP_PKEY_missing_parameters | ||
| 34 | returns 1 if the public key parameters of | ||
| 35 | .Fa pkey | ||
| 36 | are missing and 0 if they are present or the algorithm doesn't use | ||
| 37 | parameters. | ||
| 38 | .Pp | ||
| 39 | The function | ||
| 40 | .Fn EVP_PKEY_copy_parameters | ||
| 41 | copies the parameters from key | ||
| 42 | .Fa from | ||
| 43 | to key | ||
| 44 | .Fa to . | ||
| 45 | .Pp | ||
| 46 | The function | ||
| 47 | .Fn EVP_PKEY_cmp_parameters | ||
| 48 | compares the parameters of keys | ||
| 49 | .Fa a | ||
| 50 | and | ||
| 51 | .Fa b . | ||
| 52 | .Pp | ||
| 53 | The function | ||
| 54 | .Fn EVP_PKEY_cmp | ||
| 55 | compares the public key components and parameters (if present) of keys | ||
| 56 | .Fa a | ||
| 57 | and | ||
| 58 | .Fa b . | ||
| 59 | .Pp | ||
| 60 | The main purpose of the functions | ||
| 61 | .Fn EVP_PKEY_missing_parameters | ||
| 62 | and | ||
| 63 | .Fn EVP_PKEY_copy_parameters | ||
| 64 | is to handle public keys in certificates where the parameters are | ||
| 65 | sometimes omitted from a public key if they are inherited from the CA | ||
| 66 | that signed it. | ||
| 67 | .Pp | ||
| 68 | Since OpenSSL private keys contain public key components too, the | ||
| 69 | function | ||
| 70 | .Fn EVP_PKEY_cmp | ||
| 71 | can also be used to determine if a private key matches a public key. | ||
| 72 | .Sh RETURN VALUES | ||
| 73 | The function | ||
| 74 | .Fn EVP_PKEY_missing_parameters | ||
| 75 | returns 1 if the public key parameters of | ||
| 76 | .Fa pkey | ||
| 77 | are missing and 0 if they are present or the algorithm doesn't use | ||
| 78 | parameters. | ||
| 79 | .Pp | ||
| 80 | The function | ||
| 81 | .Fn EVP_PKEY_copy_parameters | ||
| 82 | returns 1 for success and 0 for failure. | ||
| 83 | .Pp | ||
| 84 | The function | ||
| 85 | .Fn EVP_PKEY_cmp_parameters | ||
| 86 | and | ||
| 87 | .Fn EVP_PKEY_cmp | ||
| 88 | return 1 if the keys match, 0 if they don't match, -1 if the key types | ||
| 89 | are 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 | ||
