Lines Matching refs:padlen

487     int padlen;  in ssl_mac()  local
493 padlen = 48; in ssl_mac()
495 padlen = 40; in ssl_mac()
502 memset( padding, 0x36, padlen ); in ssl_mac()
505 mbedtls_md_update( md_ctx, padding, padlen ); in ssl_mac()
510 memset( padding, 0x5C, padlen ); in ssl_mac()
513 mbedtls_md_update( md_ctx, padding, padlen ); in ssl_mac()
895 size_t padlen, i; in mbedtls_ssl_encrypt_buf() local
900 padlen = transform->ivlen - ( rec->data_len + 1 ) % transform->ivlen; in mbedtls_ssl_encrypt_buf()
901 if( padlen == transform->ivlen ) in mbedtls_ssl_encrypt_buf()
902 padlen = 0; in mbedtls_ssl_encrypt_buf()
905 if( post_avail < padlen + 1 ) in mbedtls_ssl_encrypt_buf()
911 for( i = 0; i <= padlen; i++ ) in mbedtls_ssl_encrypt_buf()
912 data[rec->data_len + i] = (unsigned char) padlen; in mbedtls_ssl_encrypt_buf()
914 rec->data_len += padlen + 1; in mbedtls_ssl_encrypt_buf()
915 post_avail -= padlen + 1; in mbedtls_ssl_encrypt_buf()
953 padlen + 1 ) ); in mbedtls_ssl_encrypt_buf()
1293 size_t padlen = 0, correct = 1; in mbedtls_ssl_decrypt_buf() local
1331 padlen = 0; in mbedtls_ssl_decrypt_buf()
1622 padlen = data[rec->data_len - 1]; in mbedtls_ssl_decrypt_buf()
1628 padlen + 1 ); in mbedtls_ssl_decrypt_buf()
1630 padlen &= mask; in mbedtls_ssl_decrypt_buf()
1635 if( rec->data_len < transform->maclen + padlen + 1 ) in mbedtls_ssl_decrypt_buf()
1642 padlen + 1 ) ); in mbedtls_ssl_decrypt_buf()
1648 transform->maclen + padlen + 1 ); in mbedtls_ssl_decrypt_buf()
1650 padlen &= mask; in mbedtls_ssl_decrypt_buf()
1653 padlen++; in mbedtls_ssl_decrypt_buf()
1665 if( padlen > transform->ivlen ) in mbedtls_ssl_decrypt_buf()
1670 padlen, transform->ivlen ) ); in mbedtls_ssl_decrypt_buf()
1692 size_t const padding_idx = rec->data_len - padlen; in mbedtls_ssl_decrypt_buf()
1704 padlen - 1 ); in mbedtls_ssl_decrypt_buf()
1707 correct &= mbedtls_ssl_cf_bool_eq( pad_count, padlen ); in mbedtls_ssl_decrypt_buf()
1710 if( padlen > 0 && correct == 0 ) in mbedtls_ssl_decrypt_buf()
1713 padlen &= mbedtls_ssl_cf_mask_from_bit( correct ); in mbedtls_ssl_decrypt_buf()
1727 rec->data_len -= padlen; in mbedtls_ssl_decrypt_buf()
1794 const size_t max_len = rec->data_len + padlen; in mbedtls_ssl_decrypt_buf()