1EVP_PKEY_cmp(3)                     OpenSSL                    EVP_PKEY_cmp(3)
2
3
4

NAME

6       EVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters,
7       EVP_PKEY_cmp_parameters, EVP_PKEY_cmp - public key parameter and
8       comparison functions
9

SYNOPSIS

11        #include <openssl/evp.h>
12
13        int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
14        int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
15
16        int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
17        int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
18

DESCRIPTION

20       The function EVP_PKEY_missing_parameters() returns 1 if the public key
21       parameters of pkey are missing and 0 if they are present or the
22       algorithm doesn't use parameters.
23
24       The function EVP_PKEY_copy_parameters() copies the parameters from key
25       from to key to.
26
27       The funcion EVP_PKEY_cmp_parameters() compares the parameters of keys a
28       and b.
29
30       The funcion EVP_PKEY_cmp() compares the public key components and
31       paramters (if present) of keys a and b.
32

NOTES

34       The main purpose of the functions EVP_PKEY_missing_parameters() and
35       EVP_PKEY_copy_parameters() is to handle public keys in certificates
36       where the parameters are sometimes omitted from a public key if they
37       are inherited from the CA that signed it.
38
39       Since OpenSSL private keys contain public key components too the
40       function EVP_PKEY_cmp() can also be used to determine if a private key
41       matches a public key.
42

RETURN VALUES

44       The function EVP_PKEY_missing_parameters() returns 1 if the public key
45       parameters of pkey are missing and 0 if they are present or the
46       algorithm doesn't use parameters.
47
48       These functions EVP_PKEY_copy_parameters() returns 1 for success and 0
49       for failure.
50
51       The function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if
52       the keys match, 0 if they don't match, -1 if the key types are
53       different and -2 if the operation is not supported.
54

SEE ALSO

56       EVP_PKEY_CTX_new(3), EVP_PKEY_keygen(3)
57
58
59
601.0.1e                            2013-02-11                   EVP_PKEY_cmp(3)
Impressum