Mercurial > dropbear
comparison packet.c @ 1251:52a456a3add0
Merge branch '20151231_indent' of https://github.com/fperrad/dropbear into fperrad-20151231_indent
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Mar 2016 21:41:06 +0800 |
parents | 2bb4c662d1c2 |
children | 9169e4e7cbee |
comparison
equal
deleted
inserted
replaced
1248:739b3909c499 | 1251:52a456a3add0 |
---|---|
574 &ses.keys->trans.cipher_state) != CRYPT_OK) { | 574 &ses.keys->trans.cipher_state) != CRYPT_OK) { |
575 dropbear_exit("Error encrypting"); | 575 dropbear_exit("Error encrypting"); |
576 } | 576 } |
577 buf_incrpos(writebuf, len); | 577 buf_incrpos(writebuf, len); |
578 | 578 |
579 /* stick the MAC on it */ | 579 /* stick the MAC on it */ |
580 buf_putbytes(writebuf, mac_bytes, mac_size); | 580 buf_putbytes(writebuf, mac_bytes, mac_size); |
581 | 581 |
582 /* Update counts */ | 582 /* Update counts */ |
583 ses.kexstate.datatrans += writebuf->len; | 583 ses.kexstate.datatrans += writebuf->len; |
584 | 584 |
585 writebuf_enqueue(writebuf, packet_type); | 585 writebuf_enqueue(writebuf, packet_type); |
643 buf_getptr(clear_buf, clear_len), | 643 buf_getptr(clear_buf, clear_len), |
644 clear_len) != CRYPT_OK) { | 644 clear_len) != CRYPT_OK) { |
645 dropbear_exit("HMAC error"); | 645 dropbear_exit("HMAC error"); |
646 } | 646 } |
647 | 647 |
648 bufsize = MAX_MAC_LEN; | 648 bufsize = MAX_MAC_LEN; |
649 if (hmac_done(&hmac, output_mac, &bufsize) != CRYPT_OK) { | 649 if (hmac_done(&hmac, output_mac, &bufsize) != CRYPT_OK) { |
650 dropbear_exit("HMAC error"); | 650 dropbear_exit("HMAC error"); |
651 } | 651 } |
652 } | 652 } |
653 TRACE2(("leave writemac")) | 653 TRACE2(("leave writemac")) |