Lines Matching refs:ctr
176 size_t bs, ctr, padnum, loop; in tls1_cipher() local
211 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher()
212 if (recs[ctr].data != recs[ctr].input) { in tls1_cipher()
215 } else if (RAND_bytes_ex(rl->libctx, recs[ctr].input, in tls1_cipher()
248 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher()
249 reclen[ctr] = recs[ctr].length; in tls1_cipher()
262 memcpy(buf[ctr], dtlsseq, 8); in tls1_cipher()
264 memcpy(buf[ctr], seq, 8); in tls1_cipher()
271 buf[ctr][8] = recs[ctr].type; in tls1_cipher()
272 buf[ctr][9] = (unsigned char)(rl->version >> 8); in tls1_cipher()
273 buf[ctr][10] = (unsigned char)(rl->version); in tls1_cipher()
274 buf[ctr][11] = (unsigned char)(recs[ctr].length >> 8); in tls1_cipher()
275 buf[ctr][12] = (unsigned char)(recs[ctr].length & 0xff); in tls1_cipher()
277 EVP_AEAD_TLS1_AAD_LEN, buf[ctr]); in tls1_cipher()
284 reclen[ctr] += pad; in tls1_cipher()
285 recs[ctr].length += pad; in tls1_cipher()
292 padnum = bs - (reclen[ctr] % bs); in tls1_cipher()
302 for (loop = reclen[ctr]; loop < reclen[ctr] + padnum; loop++) in tls1_cipher()
303 recs[ctr].input[loop] = padval; in tls1_cipher()
304 reclen[ctr] += padnum; in tls1_cipher()
305 recs[ctr].length += padnum; in tls1_cipher()
309 if (reclen[ctr] == 0 || reclen[ctr] % bs != 0) { in tls1_cipher()
317 for (ctr = 0; ctr < n_recs; ctr++) in tls1_cipher()
318 data[ctr] = recs[ctr].data; in tls1_cipher()
326 for (ctr = 0; ctr < n_recs; ctr++) in tls1_cipher()
327 data[ctr] = recs[ctr].input; in tls1_cipher()
423 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_cipher()
426 recs[ctr].data += EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
427 recs[ctr].input += EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
428 recs[ctr].length -= EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
430 recs[ctr].data += EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
431 recs[ctr].input += EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
432 recs[ctr].length -= EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
434 if (recs[ctr].length < bs) in tls1_cipher()
436 recs[ctr].data += bs; in tls1_cipher()
437 recs[ctr].input += bs; in tls1_cipher()
438 recs[ctr].length -= bs; in tls1_cipher()
439 recs[ctr].orig_len -= bs; in tls1_cipher()
446 if (!tls1_cbc_remove_padding_and_mac(&recs[ctr].length, in tls1_cipher()
447 recs[ctr].orig_len, in tls1_cipher()
448 recs[ctr].data, in tls1_cipher()
449 (macs != NULL) ? &macs[ctr].mac : NULL, in tls1_cipher()
450 (macs != NULL) ? &macs[ctr].alloced in tls1_cipher()