Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-11-12 07:47:50 +0300
committerAdam Langley <agl@google.com>2014-11-19 01:18:36 +0300
commitc20febe17747674ede52072e85fb944cd55637a6 (patch)
tree4643338c1bb11a85c62cdfaad3eed463829b7d27 /include/openssl/rsa.h
parentca6c82643ae885f94acff27ddd93bfb73fda3af5 (diff)
Add EVP_PKEY_supports_digest.
This is intended for TLS client auth with Windows CAPI- and CNG-backed keys which implement sign over sign_raw and do not support all hash functions. Only plumbed through RSA for now. Change-Id: Ica42e7fb026840f817a169da9372dda226f7d6fd Reviewed-on: https://boringssl-review.googlesource.com/2250 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/rsa.h')
-rw-r--r--include/openssl/rsa.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h
index 16683cec..a545734e 100644
--- a/include/openssl/rsa.h
+++ b/include/openssl/rsa.h
@@ -259,9 +259,13 @@ OPENSSL_EXPORT int RSA_public_decrypt(int flen, const uint8_t *from,
OPENSSL_EXPORT unsigned RSA_size(const RSA *rsa);
/* RSA_is_opaque returns one if |rsa| is opaque and doesn't expose its key
- * material. Otherwise it return zero. */
+ * material. Otherwise it returns zero. */
OPENSSL_EXPORT int RSA_is_opaque(const RSA *rsa);
+/* RSA_supports_digest returns one if |rsa| supports signing digests
+ * of type |md|. Otherwise it returns zero. */
+OPENSSL_EXPORT int RSA_supports_digest(const RSA *rsa, const EVP_MD *md);
+
/* RSAPublicKey_dup allocates a fresh |RSA| and copies the private key from
* |rsa| into it. It returns the fresh |RSA| object, or NULL on error. */
OPENSSL_EXPORT RSA *RSAPublicKey_dup(const RSA *rsa);
@@ -410,6 +414,10 @@ struct rsa_meth_st {
int flags;
int (*keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
+
+ /* supports_digest returns one if |rsa| supports digests of type
+ * |md|. If null, it is assumed that all digests are supported. */
+ int (*supports_digest)(const RSA *rsa, const EVP_MD *md);
};