Skip to content

Commit 5ac9121

Browse files
author
Stephen von Takach
committed
add cipher list to options
1 parent 36f3cbc commit 5ac9121

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class transport
3030
is_server = true
3131
callback_obj = self
3232
options = {
33-
33+
verify_peer: true,
34+
private_key: '/file/path.pem',
35+
cert_chain: '/file/path.crt',
36+
ciphers: 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!CAMELLIA:@STRENGTH' # (default)
3437
}
3538
@ssl_layer = RubyTls::SSL::Box.new(is_server, callback_obj, options)
3639
end

lib/ruby-tls/ssl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def initialize(server, options = {})
273273
set_certificate(options[:cert_chain] || SSL::DEFAULT_CERT)
274274
end
275275

276-
SSL.SSL_CTX_set_cipher_list(@ssl_ctx, CIPHERS)
276+
SSL.SSL_CTX_set_cipher_list(@ssl_ctx, options[:ciphers] || CIPHERS)
277277

278278
if @is_server
279279
SSL.SSL_CTX_sess_set_cache_size(@ssl_ctx, 128)

0 commit comments

Comments
 (0)