Lines Matching refs:hmac
199 if (ctx->hmac)
203 hmac_ctx_reset (ctx->hmac);
204 hmac_ctx_update (ctx->hmac, BPTR(&work), BLEN(&work));
205 output = buf_prepend (&work, hmac_ctx_size(ctx->hmac));
207 hmac_ctx_final (ctx->hmac, output);
247 if (ctx->hmac)
252 hmac_ctx_reset(ctx->hmac);
255 hmac_len = hmac_ctx_size (ctx->hmac);
261 hmac_ctx_update (ctx->hmac, BPTR (buf) + hmac_len, BLEN (buf) - hmac_len);
262 hmac_ctx_final (ctx->hmac, local_hmac);
488 ALLOC_OBJ(ctx->hmac, hmac_ctx_t);
489 hmac_ctx_init (ctx->hmac, key->hmac, kt->hmac_length, kt->digest);
496 format_hex (key->hmac, kt->hmac_length, 0, &gc));
501 hmac_ctx_size(ctx->hmac));
516 if (ctx->hmac)
518 hmac_ctx_cleanup(ctx->hmac);
519 free(ctx->hmac);
520 ctx->hmac = NULL;
646 || !rand_bytes (key->hmac, hmac_len))
650 dmsg (D_SHOW_KEY_SOURCE, "HMAC source entropy: %s", format_hex (key->hmac, hmac_len, 0, &gc));
673 dmsg (D_SHOW_KEY_SOURCE, "%s (hmac): %s",
675 format_hex (k->keys[0].hmac, kt->hmac_length, 0, &gc));
679 dmsg (D_SHOW_KEY_SOURCE, "%s (hmac): %s",
681 format_hex (k->keys[1].hmac, kt->hmac_length, 0, &gc));
790 key2.keys[0].hmac,
807 /* initialize hmac key in both directions */
1252 if (!buf_write (buf, key->hmac, kt->hmac_length))
1278 if (!buf_read (buf, key->hmac, hmac_length))
1292 "TLS Error: key length mismatch, local cipher/hmac %d/%d, remote cipher/hmac %d/%d",