/* Dispatch functions for AES_CBC_HMAC_SHA ciphers */
+/* Only for SSL3_VERSION and TLS1_VERSION */
+#include <openssl/ssl.h>
#include "cipher_aes_cbc_hmac_sha.h"
#include "prov/implementations.h"
return 0;
}
}
+
+ p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_TLS_VERSION);
+ if (p != NULL) {
+ if (!OSSL_PARAM_get_uint(p, &ctx->base.tlsversion)) {
+ ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
+ return 0;
+ }
+ if (ctx->base.tlsversion == SSL3_VERSION
+ || ctx->base.tlsversion == TLS1_VERSION) {
+ if (!ossl_assert(ctx->base.removetlspad >= AES_BLOCK_SIZE)) {
+ ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR);
+ return 0;
+ }
+ /*
+ * There is no explicit IV with these TLS versions, so don't attempt
+ * to remove it.
+ */
+ ctx->base.removetlspad -= AES_BLOCK_SIZE;
+ }
+ }
return ret;
}