diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-02 14:21:33 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-02 14:21:33 +0000 |
commit | a5b196a22c62d9d1d113bff6d8fc8c17d5f5734a (patch) | |
tree | f0b5bab467444ea1ef7504a1041e2bd04cc4b4b5 /crypto | |
parent | b6104f9ad8a704cf75f32faed4b47bed216dd58d (diff) |
Add sign/verify digest API to handle an explicit digest instead of finalising
a context.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dsa/dsa.h | 3 | ||||
-rw-r--r-- | crypto/rsa/rsa.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h index 06a7b1431d..b68fbce169 100644 --- a/crypto/dsa/dsa.h +++ b/crypto/dsa/dsa.h @@ -209,7 +209,10 @@ int DSA_set_method(DSA *dsa, const DSA_METHOD *); #ifdef OPENSSL_FIPS DSA * FIPS_dsa_new(void); void FIPS_dsa_free (DSA *r); +DSA_SIG * FIPS_dsa_sign_digest(DSA *dsa, const unsigned char *dig, int dlen); DSA_SIG * FIPS_dsa_sign_ctx(DSA *dsa, EVP_MD_CTX *ctx); +int FIPS_dsa_verify_digest(DSA *dsa, + const unsigned char *dig, int dlen, DSA_SIG *s); int FIPS_dsa_verify_ctx(DSA *dsa, EVP_MD_CTX *ctx, DSA_SIG *s); #endif diff --git a/crypto/rsa/rsa.h b/crypto/rsa/rsa.h index 47ba358eb6..4287b83f8a 100644 --- a/crypto/rsa/rsa.h +++ b/crypto/rsa/rsa.h @@ -321,9 +321,17 @@ void FIPS_rsa_free(RSA *r); int FIPS_rsa_sign_ctx(RSA *rsa, EVP_MD_CTX *ctx, int rsa_pad_mode, int saltlen, const EVP_MD *mgf1Hash, unsigned char *sigret, unsigned int *siglen); +int FIPS_rsa_sign_digest(RSA *rsa, const unsigned char *md, int md_len, + const EVP_MD *mhash, int rsa_pad_mode, int saltlen, + const EVP_MD *mgf1Hash, + unsigned char *sigret, unsigned int *siglen); int FIPS_rsa_verify_ctx(RSA *rsa, EVP_MD_CTX *ctx, int rsa_pad_mode, int saltlen, const EVP_MD *mgf1Hash, unsigned char *sigbuf, unsigned int siglen); +int FIPS_rsa_verify_digest(RSA *rsa, const unsigned char *dig, int diglen, + const EVP_MD *mhash, int rsa_pad_mode, int saltlen, + const EVP_MD *mgf1Hash, + unsigned char *sigbuf, unsigned int siglen); #endif void RSA_set_default_method(const RSA_METHOD *meth); |