Have EVP_PKEY_cmp() call EVP_PKEY_cmp_parameters(), and make a note
about the lack of parameter comparison for EC.
return(0);
}
-int EVP_PKEY_copy_parameters(EVP_PKEY *to, cpnst EVP_PKEY *from)
+int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
{
if (to->type != from->type)
{
if (a->type != b->type)
return -1;
+ /* XXXXX
+ We should really check for != 0, but cmp_paramters doesn't compare EC
+ groups, and I'm currently unsure how to handle that case... Except for
+ adding such functionality to cmp_parameters, but that would require
+ things like EC_GROUP_cmp(), which I'm not currently ready to write.
+ -- Richard Levitte */
+ if (EVP_PKEY_cmp_parameters(a, b) == 1)
+ return 1;
+
switch (a->type)
{
#ifndef OPENSSL_NO_RSA