Match OpenSSL's EVP_MD_CTX_reset return value.

In neither OpenSSL nor BoringSSL can this function actually fail, but
OpenSSL makes it return one anyway. Match them for compatibility.

Change-Id: I497437321ad9ccc5da738f06cd5b19c467167575
Reviewed-on: https://boringssl-review.googlesource.com/28784
Commit-Queue: Steven Valdez <svaldez@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/fipsmodule/digest/digest.c b/crypto/fipsmodule/digest/digest.c
index 1c35809..e49d552 100644
--- a/crypto/fipsmodule/digest/digest.c
+++ b/crypto/fipsmodule/digest/digest.c
@@ -166,9 +166,10 @@
   return EVP_MD_CTX_copy_ex(out, in);
 }
 
-void EVP_MD_CTX_reset(EVP_MD_CTX *ctx) {
+int EVP_MD_CTX_reset(EVP_MD_CTX *ctx) {
   EVP_MD_CTX_cleanup(ctx);
   EVP_MD_CTX_init(ctx);
+  return 1;
 }
 
 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *engine) {
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index 81f5892..4077d90 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -122,8 +122,9 @@
 // copy of |in|. It returns one on success and zero on error.
 OPENSSL_EXPORT int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
 
-// EVP_MD_CTX_reset calls |EVP_MD_CTX_cleanup| followed by |EVP_MD_CTX_init|.
-OPENSSL_EXPORT void EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
+// EVP_MD_CTX_reset calls |EVP_MD_CTX_cleanup| followed by |EVP_MD_CTX_init|. It
+// returns one.
+OPENSSL_EXPORT int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
 
 
 // Digest operations.