Lines Matching refs:recs
167 static int tls1_cipher(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *recs, in tls1_cipher() argument
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()
249 reclen[ctr] = recs[ctr].length; in tls1_cipher()
271 buf[ctr][8] = recs[ctr].type; 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()
285 recs[ctr].length += pad; in tls1_cipher()
303 recs[ctr].input[loop] = padval; in tls1_cipher()
305 recs[ctr].length += padnum; in tls1_cipher()
318 data[ctr] = recs[ctr].data; in tls1_cipher()
327 data[ctr] = recs[ctr].input; in tls1_cipher()
366 if (!EVP_CipherUpdate(ds, recs[0].data, &outlen, recs[0].input, in tls1_cipher()
369 recs[0].length = outlen; in tls1_cipher()
378 recs[0].data += EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
379 recs[0].input += EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
381 recs[0].data += EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
382 recs[0].input += EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_cipher()
384 recs[0].data += bs; in tls1_cipher()
385 recs[0].input += bs; in tls1_cipher()
386 recs[0].orig_len -= bs; in tls1_cipher()
412 tmpr = EVP_Cipher(ds, recs[0].data, recs[0].input, 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()