EVP_Digest*Update, EVP_DigestFinal, and HMAC_Update can never fail.
Enough code fails to check their return codes anyway. We ought to make
it official.
Change-Id: Ie646360fd7073ea943036f5e21bed13df7e1b77a
Reviewed-on: https://boringssl-review.googlesource.com/4954
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/digest/internal.h b/crypto/digest/internal.h
index 94dbfaa..1134702 100644
--- a/crypto/digest/internal.h
+++ b/crypto/digest/internal.h
@@ -75,15 +75,14 @@
/* flags contains the OR of |EVP_MD_FLAG_*| values. */
uint32_t flags;
- /* init initialises the state in |ctx->md_data|. It returns one on success
- * and zero otherwise. */
- int (*init)(EVP_MD_CTX *ctx);
+ /* init initialises the state in |ctx->md_data|. */
+ void (*init)(EVP_MD_CTX *ctx);
/* update hashes |len| bytes of |data| into the state in |ctx->md_data|. */
- int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count);
+ void (*update)(EVP_MD_CTX *ctx, const void *data, size_t count);
/* final completes the hash and writes |md_size| bytes of digest to |out|. */
- int (*final)(EVP_MD_CTX *ctx, uint8_t *out);
+ void (*final)(EVP_MD_CTX *ctx, uint8_t *out);
/* block_size contains the hash's native block size. */
unsigned block_size;