aboutsummaryrefslogtreecommitdiff
path: root/crypto/evp/p_lib.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2003-07-21 13:43:28 +0000
committerBodo Möller <bodo@openssl.org>2003-07-21 13:43:28 +0000
commitada0e717fa36f4202298b797b9b663831a47548c (patch)
tree8d1f4a95fe4573559540003db39e317203996e68 /crypto/evp/p_lib.c
parent2c789c82be736604ede5485519f070a1ae0d176d (diff)
downloadopenssl-ada0e717fa36f4202298b797b9b663831a47548c.zip
openssl-ada0e717fa36f4202298b797b9b663831a47548c.tar.gz
openssl-ada0e717fa36f4202298b797b9b663831a47548c.tar.bz2
new function EC_GROUP_cmp() (used by EVP_PKEY_cmp())
Submitted by: Nils Larsch
Diffstat (limited to 'crypto/evp/p_lib.c')
-rw-r--r--crypto/evp/p_lib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 730ef4d..d6d7234 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -234,6 +234,15 @@ int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b)
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);
}