summaryrefslogtreecommitdiffstats
path: root/src/crypto/evp/p_hmac.c
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-06-09 00:31:54 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-09 00:31:54 +0000
commit9d4bc055d8634ee6203925335464b4d9bec34be2 (patch)
tree2aa613266128178591aa10ef500a92702ddbe054 /src/crypto/evp/p_hmac.c
parent907362640544fea73968f6adf34f2b2b5e9b5a00 (diff)
parentf4e427204234da139fd0585def4b4e22502e33f0 (diff)
downloadexternal_boringssl-9d4bc055d8634ee6203925335464b4d9bec34be2.zip
external_boringssl-9d4bc055d8634ee6203925335464b4d9bec34be2.tar.gz
external_boringssl-9d4bc055d8634ee6203925335464b4d9bec34be2.tar.bz2
am f4e42720: Bump revision of BoringSSL.
* commit 'f4e427204234da139fd0585def4b4e22502e33f0': Bump revision of BoringSSL.
Diffstat (limited to 'src/crypto/evp/p_hmac.c')
-rw-r--r--src/crypto/evp/p_hmac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/evp/p_hmac.c b/src/crypto/evp/p_hmac.c
index 21703ed..7d3254a 100644
--- a/src/crypto/evp/p_hmac.c
+++ b/src/crypto/evp/p_hmac.c
@@ -64,6 +64,7 @@
#include <openssl/obj.h>
#include "internal.h"
+#include "../digest/internal.h"
typedef struct {
@@ -142,15 +143,14 @@ static int pkey_hmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
return 1;
}
-static int int_update(EVP_MD_CTX *ctx, const void *data, size_t count) {
+static void int_update(EVP_MD_CTX *ctx, const void *data, size_t count) {
HMAC_PKEY_CTX *hctx = ctx->pctx->data;
- return HMAC_Update(&hctx->ctx, data, count);
+ HMAC_Update(&hctx->ctx, data, count);
}
static int hmac_signctx_init(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx) {
- HMAC_PKEY_CTX *hctx = ctx->data;
-
- HMAC_CTX_set_flags(&hctx->ctx, mctx->flags & ~EVP_MD_CTX_FLAG_NO_INIT);
+ /* |mctx| gets repurposed as a hook to call |HMAC_Update|. Suppress the
+ * automatic setting of |mctx->update| and the rest of its initialization. */
EVP_MD_CTX_set_flags(mctx, EVP_MD_CTX_FLAG_NO_INIT);
mctx->update = int_update;
return 1;