projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix style issues in HMAC_size()
[openssl.git]
/
crypto
/
hmac
/
hmac.c
diff --git
a/crypto/hmac/hmac.c
b/crypto/hmac/hmac.c
index 3374105cbb941209f89e01cc5ef028e57ab7526d..ffca891db1cb90e1247a387d40e617ee89ccce5d 100644
(file)
--- a/
crypto/hmac/hmac.c
+++ b/
crypto/hmac/hmac.c
@@
-118,7
+118,9
@@
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)
size_t HMAC_size(const HMAC_CTX *ctx)
{
- return EVP_MD_size((ctx)->md);
+ int size = EVP_MD_size((ctx)->md);
+
+ return (size < 0) ? 0 : size;
}
HMAC_CTX *HMAC_CTX_new(void)