Skip to content

Commit c82e543

Browse files
authored
Merge pull request #164 from MSP-Greg/00-derive-ssl_ivnames
net/http.rb - derive SSL_IVNAMES from SSL_ATTRIBUTES
2 parents d6edfa2 + 7191bb9 commit c82e543

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

lib/net/http.rb

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,23 +1481,6 @@ def use_ssl=(flag)
14811481
@use_ssl = flag
14821482
end
14831483

1484-
SSL_IVNAMES = [
1485-
:@ca_file,
1486-
:@ca_path,
1487-
:@cert,
1488-
:@cert_store,
1489-
:@ciphers,
1490-
:@extra_chain_cert,
1491-
:@key,
1492-
:@ssl_timeout,
1493-
:@ssl_version,
1494-
:@min_version,
1495-
:@max_version,
1496-
:@verify_callback,
1497-
:@verify_depth,
1498-
:@verify_mode,
1499-
:@verify_hostname,
1500-
] # :nodoc:
15011484
SSL_ATTRIBUTES = [
15021485
:ca_file,
15031486
:ca_path,
@@ -1516,6 +1499,8 @@ def use_ssl=(flag)
15161499
:verify_hostname,
15171500
] # :nodoc:
15181501

1502+
SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym } # :nodoc:
1503+
15191504
# Sets or returns the path to a CA certification file in PEM format.
15201505
attr_accessor :ca_file
15211506

0 commit comments

Comments
 (0)