|
@@ -513,6 +513,16 @@ static int tls_select_cipher ( struct tls_session *tls,
|
513
|
513
|
cipher = &aes_cbc_algorithm;
|
514
|
514
|
digest = &sha1_algorithm;
|
515
|
515
|
break;
|
|
516
|
+ case htons ( TLS_RSA_WITH_AES_128_CBC_SHA256 ):
|
|
517
|
+ key_len = ( 128 / 8 );
|
|
518
|
+ cipher = &aes_cbc_algorithm;
|
|
519
|
+ digest = &sha256_algorithm;
|
|
520
|
+ break;
|
|
521
|
+ case htons ( TLS_RSA_WITH_AES_256_CBC_SHA256 ):
|
|
522
|
+ key_len = ( 256 / 8 );
|
|
523
|
+ cipher = &aes_cbc_algorithm;
|
|
524
|
+ digest = &sha256_algorithm;
|
|
525
|
+ break;
|
516
|
526
|
default:
|
517
|
527
|
DBGC ( tls, "TLS %p does not support cipher %04x\n",
|
518
|
528
|
tls, ntohs ( cipher_suite ) );
|
|
@@ -677,7 +687,7 @@ static int tls_send_client_hello ( struct tls_session *tls ) {
|
677
|
687
|
uint8_t random[32];
|
678
|
688
|
uint8_t session_id_len;
|
679
|
689
|
uint16_t cipher_suite_len;
|
680
|
|
- uint16_t cipher_suites[2];
|
|
690
|
+ uint16_t cipher_suites[4];
|
681
|
691
|
uint8_t compression_methods_len;
|
682
|
692
|
uint8_t compression_methods[1];
|
683
|
693
|
uint16_t extensions_len;
|
|
@@ -702,8 +712,10 @@ static int tls_send_client_hello ( struct tls_session *tls ) {
|
702
|
712
|
hello.version = htons ( tls->version );
|
703
|
713
|
memcpy ( &hello.random, &tls->client_random, sizeof ( hello.random ) );
|
704
|
714
|
hello.cipher_suite_len = htons ( sizeof ( hello.cipher_suites ) );
|
705
|
|
- hello.cipher_suites[0] = htons ( TLS_RSA_WITH_AES_128_CBC_SHA );
|
706
|
|
- hello.cipher_suites[1] = htons ( TLS_RSA_WITH_AES_256_CBC_SHA );
|
|
715
|
+ hello.cipher_suites[0] = htons ( TLS_RSA_WITH_AES_256_CBC_SHA256 );
|
|
716
|
+ hello.cipher_suites[1] = htons ( TLS_RSA_WITH_AES_128_CBC_SHA256 );
|
|
717
|
+ hello.cipher_suites[2] = htons ( TLS_RSA_WITH_AES_256_CBC_SHA );
|
|
718
|
+ hello.cipher_suites[3] = htons ( TLS_RSA_WITH_AES_128_CBC_SHA );
|
707
|
719
|
hello.compression_methods_len = sizeof ( hello.compression_methods );
|
708
|
720
|
hello.extensions_len = htons ( sizeof ( hello.extensions ) );
|
709
|
721
|
hello.extensions.server_name_type = htons ( TLS_SERVER_NAME );
|