Don't check whether we are using KTLS before calling the cipher function
The KTLS cipher function is a no-op so it doesn't matter if we call it.
We shouldn't special case KTLS in tls_common.c
@@ -1750,7 +1750,6 @@ int tls_write_records_default(OSSL_RECORD_LAYER *rl,
}
}
- if (!using_ktls) {
if (prefix) {
if (rl->funcs->cipher(rl, wr, 1, 1, NULL, mac_size) < 1) {
if (rl->alert == SSL_AD_NO_ALERT) {
@@ -1760,14 +1759,12 @@ int tls_write_records_default(OSSL_RECORD_LAYER *rl,
}
}
- if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL,
- mac_size) < 1) {
+ if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL, mac_size) < 1) {
if (rl->alert == SSL_AD_NO_ALERT) {
RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
}
goto err;
}
- }
for (j = 0; j < numtempl + prefix; j++) {
size_t origlen;
