@@ -343,7 +343,7 @@ static int aead_tls_open(const EVP_AEAD_CTX *ctx, uint8_t *out, size_t *out_len,
343343 if (EVP_CIPHER_CTX_mode (& tls_ctx -> cipher_ctx ) == EVP_CIPH_CBC_MODE &&
344344 EVP_tls_cbc_record_digest_supported (tls_ctx -> hmac_ctx .md )) {
345345 if (!EVP_tls_cbc_digest_record (tls_ctx -> hmac_ctx .md , mac , & mac_len ,
346- ad_fixed , out , data_plus_mac_len , total ,
346+ ad_fixed , out , data_len , total ,
347347 tls_ctx -> mac_key , tls_ctx -> mac_key_len )) {
348348 OPENSSL_PUT_ERROR (CIPHER , CIPHER_R_BAD_DECRYPT );
349349 return 0 ;
@@ -406,14 +406,6 @@ static int aead_aes_128_cbc_sha1_tls_implicit_iv_init(
406406 EVP_sha1 (), 1 );
407407}
408408
409- static int aead_aes_128_cbc_sha256_tls_init (EVP_AEAD_CTX * ctx ,
410- const uint8_t * key , size_t key_len ,
411- size_t tag_len ,
412- enum evp_aead_direction_t dir ) {
413- return aead_tls_init (ctx , key , key_len , tag_len , dir , EVP_aes_128_cbc (),
414- EVP_sha256 (), 0 );
415- }
416-
417409static int aead_aes_256_cbc_sha1_tls_init (EVP_AEAD_CTX * ctx , const uint8_t * key ,
418410 size_t key_len , size_t tag_len ,
419411 enum evp_aead_direction_t dir ) {
@@ -428,22 +420,6 @@ static int aead_aes_256_cbc_sha1_tls_implicit_iv_init(
428420 EVP_sha1 (), 1 );
429421}
430422
431- static int aead_aes_256_cbc_sha256_tls_init (EVP_AEAD_CTX * ctx ,
432- const uint8_t * key , size_t key_len ,
433- size_t tag_len ,
434- enum evp_aead_direction_t dir ) {
435- return aead_tls_init (ctx , key , key_len , tag_len , dir , EVP_aes_256_cbc (),
436- EVP_sha256 (), 0 );
437- }
438-
439- static int aead_aes_256_cbc_sha384_tls_init (EVP_AEAD_CTX * ctx ,
440- const uint8_t * key , size_t key_len ,
441- size_t tag_len ,
442- enum evp_aead_direction_t dir ) {
443- return aead_tls_init (ctx , key , key_len , tag_len , dir , EVP_aes_256_cbc (),
444- EVP_sha384 (), 0 );
445- }
446-
447423static int aead_des_ede3_cbc_sha1_tls_init (EVP_AEAD_CTX * ctx ,
448424 const uint8_t * key , size_t key_len ,
449425 size_t tag_len ,
@@ -513,23 +489,6 @@ static const EVP_AEAD aead_aes_128_cbc_sha1_tls_implicit_iv = {
513489 aead_tls_tag_len ,
514490};
515491
516- static const EVP_AEAD aead_aes_128_cbc_sha256_tls = {
517- SHA256_DIGEST_LENGTH + 16 , // key len (SHA256 + AES128)
518- 16 , // nonce len (IV)
519- 16 + SHA256_DIGEST_LENGTH , // overhead (padding + SHA256)
520- SHA256_DIGEST_LENGTH , // max tag length
521- 0 , // seal_scatter_supports_extra_in
522-
523- NULL , // init
524- aead_aes_128_cbc_sha256_tls_init ,
525- aead_tls_cleanup ,
526- aead_tls_open ,
527- aead_tls_seal_scatter ,
528- NULL , // open_gather
529- NULL , // get_iv
530- aead_tls_tag_len ,
531- };
532-
533492static const EVP_AEAD aead_aes_256_cbc_sha1_tls = {
534493 SHA_DIGEST_LENGTH + 32 , // key len (SHA1 + AES256)
535494 16 , // nonce len (IV)
@@ -564,40 +523,6 @@ static const EVP_AEAD aead_aes_256_cbc_sha1_tls_implicit_iv = {
564523 aead_tls_tag_len ,
565524};
566525
567- static const EVP_AEAD aead_aes_256_cbc_sha256_tls = {
568- SHA256_DIGEST_LENGTH + 32 , // key len (SHA256 + AES256)
569- 16 , // nonce len (IV)
570- 16 + SHA256_DIGEST_LENGTH , // overhead (padding + SHA256)
571- SHA256_DIGEST_LENGTH , // max tag length
572- 0 , // seal_scatter_supports_extra_in
573-
574- NULL , // init
575- aead_aes_256_cbc_sha256_tls_init ,
576- aead_tls_cleanup ,
577- aead_tls_open ,
578- aead_tls_seal_scatter ,
579- NULL , // open_gather
580- NULL , // get_iv
581- aead_tls_tag_len ,
582- };
583-
584- static const EVP_AEAD aead_aes_256_cbc_sha384_tls = {
585- SHA384_DIGEST_LENGTH + 32 , // key len (SHA384 + AES256)
586- 16 , // nonce len (IV)
587- 16 + SHA384_DIGEST_LENGTH , // overhead (padding + SHA384)
588- SHA384_DIGEST_LENGTH , // max tag length
589- 0 , // seal_scatter_supports_extra_in
590-
591- NULL , // init
592- aead_aes_256_cbc_sha384_tls_init ,
593- aead_tls_cleanup ,
594- aead_tls_open ,
595- aead_tls_seal_scatter ,
596- NULL , // open_gather
597- NULL , // get_iv
598- aead_tls_tag_len ,
599- };
600-
601526static const EVP_AEAD aead_des_ede3_cbc_sha1_tls = {
602527 SHA_DIGEST_LENGTH + 24 , // key len (SHA1 + 3DES)
603528 8 , // nonce len (IV)
@@ -657,10 +582,6 @@ const EVP_AEAD *EVP_aead_aes_128_cbc_sha1_tls_implicit_iv(void) {
657582 return & aead_aes_128_cbc_sha1_tls_implicit_iv ;
658583}
659584
660- const EVP_AEAD * EVP_aead_aes_128_cbc_sha256_tls (void ) {
661- return & aead_aes_128_cbc_sha256_tls ;
662- }
663-
664585const EVP_AEAD * EVP_aead_aes_256_cbc_sha1_tls (void ) {
665586 return & aead_aes_256_cbc_sha1_tls ;
666587}
@@ -669,14 +590,6 @@ const EVP_AEAD *EVP_aead_aes_256_cbc_sha1_tls_implicit_iv(void) {
669590 return & aead_aes_256_cbc_sha1_tls_implicit_iv ;
670591}
671592
672- const EVP_AEAD * EVP_aead_aes_256_cbc_sha256_tls (void ) {
673- return & aead_aes_256_cbc_sha256_tls ;
674- }
675-
676- const EVP_AEAD * EVP_aead_aes_256_cbc_sha384_tls (void ) {
677- return & aead_aes_256_cbc_sha384_tls ;
678- }
679-
680593const EVP_AEAD * EVP_aead_des_ede3_cbc_sha1_tls (void ) {
681594 return & aead_des_ede3_cbc_sha1_tls ;
682595}
0 commit comments