version 1.35, 2000/09/07 20:27:52 |
version 1.36, 2000/10/03 17:59:57 |
|
|
buffer_len(&outgoing_packet), |
buffer_len(&outgoing_packet), |
mac->key, mac->key_len |
mac->key, mac->key_len |
); |
); |
DBG(debug("done calc HMAC out #%d", seqnr)); |
DBG(debug("done calc MAC out #%d", seqnr)); |
} |
} |
/* encrypt packet and append to output buffer. */ |
/* encrypt packet and append to output buffer. */ |
buffer_append_space(&output, &cp, buffer_len(&outgoing_packet)); |
buffer_append_space(&output, &cp, buffer_len(&outgoing_packet)); |
|
|
mac->key, mac->key_len |
mac->key, mac->key_len |
); |
); |
if (memcmp(macbuf, buffer_ptr(&input), mac->mac_len) != 0) |
if (memcmp(macbuf, buffer_ptr(&input), mac->mac_len) != 0) |
packet_disconnect("Corrupted HMAC on input."); |
packet_disconnect("Corrupted MAC on input."); |
DBG(debug("HMAC #%d ok", seqnr)); |
DBG(debug("MAC #%d ok", seqnr)); |
buffer_consume(&input, mac->mac_len); |
buffer_consume(&input, mac->mac_len); |
} |
} |
if (++seqnr == 0) |
if (++seqnr == 0) |