Lines Matching refs:padding_length
114 unsigned padding_length, good; in ssl3_cbc_remove_padding() local
122 padding_length = rec->data[rec->length-1]; in ssl3_cbc_remove_padding()
123 good = constant_time_ge(rec->length, padding_length+overhead); in ssl3_cbc_remove_padding()
125 good &= constant_time_ge(block_size, padding_length+1); in ssl3_cbc_remove_padding()
126 padding_length = good & (padding_length+1); in ssl3_cbc_remove_padding()
127 rec->length -= padding_length; in ssl3_cbc_remove_padding()
128 rec->type |= padding_length<<8; /* kludge: pass padding length */ in ssl3_cbc_remove_padding()
148 unsigned padding_length, good, to_check, i; in tls1_cbc_remove_padding() local
166 padding_length = rec->data[rec->length-1]; in tls1_cbc_remove_padding()
177 !(padding_length & 1)) in tls1_cbc_remove_padding()
182 padding_length > 0) in tls1_cbc_remove_padding()
184 padding_length--; in tls1_cbc_remove_padding()
191 rec->length -= padding_length + 1; in tls1_cbc_remove_padding()
195 good = constant_time_ge(rec->length, overhead+padding_length); in tls1_cbc_remove_padding()
211 unsigned char mask = constant_time_ge(padding_length, i); in tls1_cbc_remove_padding()
215 good &= ~(mask&(padding_length ^ b)); in tls1_cbc_remove_padding()
228 padding_length = good & (padding_length+1); in tls1_cbc_remove_padding()
229 rec->length -= padding_length; in tls1_cbc_remove_padding()
230 rec->type |= padding_length<<8; /* kludge: pass padding length */ in tls1_cbc_remove_padding()