@@ -125,7 +125,6 @@ def test_add_certificate
125
125
126
126
def test_add_certificate_multiple_certs
127
127
pend "EC is not supported" unless defined? ( OpenSSL ::PKey ::EC )
128
- pend "TLS 1.2 is not supported" unless tls12_supported?
129
128
130
129
ca2_key = Fixtures . pkey ( "rsa-3" )
131
130
ca2_exts = [
@@ -554,8 +553,6 @@ def test_sslctx_set_params
554
553
end
555
554
556
555
def test_post_connect_check_with_anon_ciphers
557
- pend "TLS 1.2 is not supported" unless tls12_supported?
558
-
559
556
ctx_proc = -> ctx {
560
557
ctx . ssl_version = :TLSv1_2
561
558
ctx . ciphers = "aNULL"
@@ -1355,7 +1352,6 @@ def test_alpn_protocol_selection_cancel
1355
1352
end
1356
1353
1357
1354
def test_npn_protocol_selection_ary
1358
- pend "TLS 1.2 is not supported" unless tls12_supported?
1359
1355
pend "NPN is not supported" unless \
1360
1356
OpenSSL ::SSL ::SSLContext . method_defined? ( :npn_select_cb )
1361
1357
pend "LibreSSL 2.6 has broken NPN functions" if libressl? ( 2 , 6 , 1 )
@@ -1376,7 +1372,6 @@ def test_npn_protocol_selection_ary
1376
1372
end
1377
1373
1378
1374
def test_npn_protocol_selection_enum
1379
- pend "TLS 1.2 is not supported" unless tls12_supported?
1380
1375
pend "NPN is not supported" unless \
1381
1376
OpenSSL ::SSL ::SSLContext . method_defined? ( :npn_select_cb )
1382
1377
pend "LibreSSL 2.6 has broken NPN functions" if libressl? ( 2 , 6 , 1 )
@@ -1401,7 +1396,6 @@ def advertised.each
1401
1396
end
1402
1397
1403
1398
def test_npn_protocol_selection_cancel
1404
- pend "TLS 1.2 is not supported" unless tls12_supported?
1405
1399
pend "NPN is not supported" unless \
1406
1400
OpenSSL ::SSL ::SSLContext . method_defined? ( :npn_select_cb )
1407
1401
pend "LibreSSL 2.6 has broken NPN functions" if libressl? ( 2 , 6 , 1 )
@@ -1415,7 +1409,6 @@ def test_npn_protocol_selection_cancel
1415
1409
end
1416
1410
1417
1411
def test_npn_advertised_protocol_too_long
1418
- pend "TLS 1.2 is not supported" unless tls12_supported?
1419
1412
pend "NPN is not supported" unless \
1420
1413
OpenSSL ::SSL ::SSLContext . method_defined? ( :npn_select_cb )
1421
1414
pend "LibreSSL 2.6 has broken NPN functions" if libressl? ( 2 , 6 , 1 )
@@ -1429,7 +1422,6 @@ def test_npn_advertised_protocol_too_long
1429
1422
end
1430
1423
1431
1424
def test_npn_selected_protocol_too_long
1432
- pend "TLS 1.2 is not supported" unless tls12_supported?
1433
1425
pend "NPN is not supported" unless \
1434
1426
OpenSSL ::SSL ::SSLContext . method_defined? ( :npn_select_cb )
1435
1427
pend "LibreSSL 2.6 has broken NPN functions" if libressl? ( 2 , 6 , 1 )
@@ -1470,40 +1462,36 @@ def test_sync_close_without_connect
1470
1462
end
1471
1463
1472
1464
def test_get_ephemeral_key
1473
- if tls12_supported?
1474
- # kRSA
1475
- ctx_proc1 = proc { |ctx |
1476
- ctx . ssl_version = :TLSv1_2
1477
- ctx . ciphers = "kRSA"
1478
- }
1479
- start_server ( ctx_proc : ctx_proc1 , ignore_listener_error : true ) do |port |
1480
- ctx = OpenSSL ::SSL ::SSLContext . new
1481
- ctx . ssl_version = :TLSv1_2
1482
- ctx . ciphers = "kRSA"
1483
- begin
1484
- server_connect ( port , ctx ) { |ssl | assert_nil ssl . tmp_key }
1485
- rescue OpenSSL ::SSL ::SSLError
1486
- # kRSA seems disabled
1487
- raise unless $!. message =~ /no cipher/
1488
- end
1465
+ # kRSA
1466
+ ctx_proc1 = proc { |ctx |
1467
+ ctx . ssl_version = :TLSv1_2
1468
+ ctx . ciphers = "kRSA"
1469
+ }
1470
+ start_server ( ctx_proc : ctx_proc1 , ignore_listener_error : true ) do |port |
1471
+ ctx = OpenSSL ::SSL ::SSLContext . new
1472
+ ctx . ssl_version = :TLSv1_2
1473
+ ctx . ciphers = "kRSA"
1474
+ begin
1475
+ server_connect ( port , ctx ) { |ssl | assert_nil ssl . tmp_key }
1476
+ rescue OpenSSL ::SSL ::SSLError
1477
+ # kRSA seems disabled
1478
+ raise unless $!. message =~ /no cipher/
1489
1479
end
1490
1480
end
1491
1481
1492
- if defined? ( OpenSSL ::PKey ::DH ) && tls12_supported?
1493
- # DHE
1494
- # TODO: How to test this with TLS 1.3?
1495
- ctx_proc2 = proc { |ctx |
1496
- ctx . ssl_version = :TLSv1_2
1497
- ctx . ciphers = "EDH"
1482
+ # DHE
1483
+ # TODO: How to test this with TLS 1.3?
1484
+ ctx_proc2 = proc { |ctx |
1485
+ ctx . ssl_version = :TLSv1_2
1486
+ ctx . ciphers = "EDH"
1487
+ }
1488
+ start_server ( ctx_proc : ctx_proc2 ) do |port |
1489
+ ctx = OpenSSL ::SSL ::SSLContext . new
1490
+ ctx . ssl_version = :TLSv1_2
1491
+ ctx . ciphers = "EDH"
1492
+ server_connect ( port , ctx ) { |ssl |
1493
+ assert_instance_of OpenSSL ::PKey ::DH , ssl . tmp_key
1498
1494
}
1499
- start_server ( ctx_proc : ctx_proc2 ) do |port |
1500
- ctx = OpenSSL ::SSL ::SSLContext . new
1501
- ctx . ssl_version = :TLSv1_2
1502
- ctx . ciphers = "EDH"
1503
- server_connect ( port , ctx ) { |ssl |
1504
- assert_instance_of OpenSSL ::PKey ::DH , ssl . tmp_key
1505
- }
1506
- end
1507
1495
end
1508
1496
1509
1497
if defined? ( OpenSSL ::PKey ::EC )
@@ -1633,8 +1621,6 @@ def test_tmp_dh
1633
1621
end
1634
1622
1635
1623
def test_ecdh_curves_tls12
1636
- pend "EC is disabled" unless defined? ( OpenSSL ::PKey ::EC )
1637
-
1638
1624
ctx_proc = -> ctx {
1639
1625
# Enable both ECDHE (~ TLS 1.2) cipher suites and TLS 1.3
1640
1626
ctx . max_version = OpenSSL ::SSL ::TLS1_2_VERSION
0 commit comments