-/* $OpenBSD: m_md5_sha1.c,v 1.1 2017/02/28 14:15:37 jsing Exp $ */
+/* $OpenBSD: m_md5_sha1.c,v 1.2 2018/08/10 17:30:29 jsing Exp $ */
/*
* Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
*
#include <openssl/objects.h>
#include <openssl/sha.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+
struct md5_sha1_ctx {
MD5_CTX md5;
SHA_CTX sha1;
.final = md5_sha1_final,
.block_size = MD5_CBLOCK, /* MD5_CBLOCK == SHA_CBLOCK */
.ctx_size = sizeof(EVP_MD *) + sizeof(struct md5_sha1_ctx),
+#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
};
const EVP_MD *