#include <openssl/evp.h>
#include <openssl/asn1_mac.h>
#include <openssl/x509.h>
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
+#include <openssl/dh.h>
static void EVP_PKEY_free_it(EVP_PKEY *x);
else
return(1);
}
+#endif
+#ifndef OPENSSL_NO_EC
+ if (a->type == EVP_PKEY_EC && b->type == EVP_PKEY_EC)
+ {
+ if (EC_GROUP_cmp(a->pkey.eckey->group, b->pkey.eckey->group, NULL))
+ return 0;
+ else
+ return 1;
+ }
#endif
return(-1);
}
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;
+ if (EVP_PKEY_cmp_parameters(a, b) == 0)
+ return 0;
switch (a->type)
{