summaryrefslogtreecommitdiff
path: root/lib/libcrypto/evp/m_sha.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/evp/m_sha.c')
-rw-r--r--lib/libcrypto/evp/m_sha.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/libcrypto/evp/m_sha.c b/lib/libcrypto/evp/m_sha.c
index 1b82e61c266..238f677a972 100644
--- a/lib/libcrypto/evp/m_sha.c
+++ b/lib/libcrypto/evp/m_sha.c
@@ -88,18 +88,24 @@ final(EVP_MD_CTX *ctx, unsigned char *md)
}
static const EVP_MD sha_md = {
- NID_sha,
- NID_shaWithRSAEncryption,
- SHA_DIGEST_LENGTH,
- 0,
- init,
- update,
- final,
- NULL,
- NULL,
- EVP_PKEY_RSA_method,
- SHA_CBLOCK,
- sizeof(EVP_MD *) + sizeof(SHA_CTX),
+ .type = NID_sha,
+ .pkey_type = NID_shaWithRSAEncryption,
+ .md_size = SHA_DIGEST_LENGTH,
+ .flags = 0,
+ .init = init,
+ .update = update,
+ .final = final,
+ .copy = NULL,
+ .cleanup = NULL,
+#ifndef OPENSSL_NO_RSA
+ .sign = (evp_sign_method *)RSA_sign,
+ .verify = (evp_verify_method *)RSA_verify,
+ .required_pkey_type = {
+ EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0,
+ },
+#endif
+ .block_size = SHA_CBLOCK,
+ .ctx_size = sizeof(EVP_MD *) + sizeof(SHA_CTX),
};
const EVP_MD *