summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-02-23 15:02:34 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-02-28 22:54:53 +0000
commit4b0555ec9d322abec2ddf769387e1228dc9a440b (patch)
tree1cb0b0154252da3c40fe13aa6e15b2b3ae91609a /include
parent8dcfdbf510085fd5740abe78f1f8ca120b475f05 (diff)
Add no signing flag.
Add a flag to EC_METHOD for curves which do not support signing. New function EC_KEY_can_sign() returns 1 is key can be used for signing. Return an explicit error is an attempt is made to sign with no signing curves. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'include')
-rw-r--r--include/openssl/ec.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 8530c569a4..ccd410f772 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -901,6 +901,12 @@ int EC_KEY_generate_key(EC_KEY *key);
*/
int EC_KEY_check_key(const EC_KEY *key);
+/** Indicates if an EC_KEY can be used for signing.
+ * \param key the EC_KEY object
+ * \return 1 if can can sign and 0 otherwise.
+ */
+int EC_KEY_can_sign(const EC_KEY *eckey);
+
/** Sets a public key from affine coordindates performing
* necessary NIST PKV tests.
* \param key the EC_KEY object