Home | History | Annotate | Download | only in tls

Lines Matching defs:hmac

140  * header, IV (TLS v1.1), and HMAC)
147 * This function fills in the TLS record layer header, adds HMAC, and encrypts
155 struct crypto_hash *hmac;
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
209 if (hmac == NULL) {
211 "to initialize HMAC");
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
217 crypto_hash_update(hmac, payload, payload_len);
222 crypto_hash_finish(hmac, NULL, NULL);
226 if (crypto_hash_finish(hmac, pos, &clen) < 0) {
228 "to calculate HMAC");
231 wpa_hexdump(MSG_MSGDUMP, "TLSv1: Record Layer - Write HMAC",
275 * This function decrypts the received message, verifies HMAC and TLS record
284 struct crypto_hash *hmac;
436 hmac = crypto_hash_init(rl->hash_alg, rl->read_mac_secret,
438 if (hmac == NULL) {
440 "to initialize HMAC");
445 crypto_hash_update(hmac, rl->read_seq_num, TLS_SEQ_NUM_LEN);
447 crypto_hash_update(hmac, in_data - TLS_RECORD_HEADER_LEN, 3);
449 crypto_hash_update(hmac, len, 2);
450 crypto_hash_update(hmac, out_data, plen);
452 if (crypto_hash_finish(hmac, hash, &hlen) < 0) {
454 "to calculate HMAC");
461 wpa_printf(MSG_DEBUG, "TLSv1: Invalid HMAC value in "