Lines Matching refs:ctr
953 size_t bs, ctr, padnum, loop; in tls1_enc() local
986 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc()
987 if (recs[ctr].data != recs[ctr].input) { in tls1_enc()
994 } else if (RAND_bytes_ex(s->ctx->libctx, recs[ctr].input, in tls1_enc()
1018 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc()
1019 memmove(recs[ctr].data, recs[ctr].input, recs[ctr].length); in tls1_enc()
1020 recs[ctr].input = recs[ctr].data; in tls1_enc()
1038 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc()
1039 reclen[ctr] = recs[ctr].length; in tls1_enc()
1055 memcpy(buf[ctr], dtlsseq, 8); in tls1_enc()
1057 memcpy(buf[ctr], seq, 8); in tls1_enc()
1065 buf[ctr][8] = recs[ctr].type; in tls1_enc()
1066 buf[ctr][9] = (unsigned char)(s->version >> 8); in tls1_enc()
1067 buf[ctr][10] = (unsigned char)(s->version); in tls1_enc()
1068 buf[ctr][11] = (unsigned char)(recs[ctr].length >> 8); in tls1_enc()
1069 buf[ctr][12] = (unsigned char)(recs[ctr].length & 0xff); in tls1_enc()
1071 EVP_AEAD_TLS1_AAD_LEN, buf[ctr]); in tls1_enc()
1078 reclen[ctr] += pad; in tls1_enc()
1079 recs[ctr].length += pad; in tls1_enc()
1087 padnum = bs - (reclen[ctr] % bs); in tls1_enc()
1097 for (loop = reclen[ctr]; loop < reclen[ctr] + padnum; loop++) in tls1_enc()
1098 recs[ctr].input[loop] = padval; in tls1_enc()
1099 reclen[ctr] += padnum; in tls1_enc()
1100 recs[ctr].length += padnum; in tls1_enc()
1104 if (reclen[ctr] == 0 || reclen[ctr] % bs != 0) { in tls1_enc()
1114 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc()
1115 data[ctr] = recs[ctr].data; in tls1_enc()
1123 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc()
1124 data[ctr] = recs[ctr].input; in tls1_enc()
1221 for (ctr = 0; ctr < n_recs; ctr++) { in tls1_enc()
1224 recs[ctr].data += EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_enc()
1225 recs[ctr].input += EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_enc()
1226 recs[ctr].length -= EVP_GCM_TLS_EXPLICIT_IV_LEN; in tls1_enc()
1228 recs[ctr].data += EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_enc()
1229 recs[ctr].input += EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_enc()
1230 recs[ctr].length -= EVP_CCM_TLS_EXPLICIT_IV_LEN; in tls1_enc()
1232 if (recs[ctr].length < bs) in tls1_enc()
1234 recs[ctr].data += bs; in tls1_enc()
1235 recs[ctr].input += bs; in tls1_enc()
1236 recs[ctr].length -= bs; in tls1_enc()
1237 recs[ctr].orig_len -= bs; in tls1_enc()
1244 if (!tls1_cbc_remove_padding_and_mac(&recs[ctr].length, in tls1_enc()
1245 recs[ctr].orig_len, in tls1_enc()
1246 recs[ctr].data, in tls1_enc()
1247 (macs != NULL) ? &macs[ctr].mac : NULL, in tls1_enc()
1248 (macs != NULL) ? &macs[ctr].alloced in tls1_enc()