New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interact with TLSv1 #43

Closed
rnelson0 opened this Issue Feb 16, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@rnelson0
Copy link

rnelson0 commented Feb 16, 2016

I use zabbixapi with puppet (via https://forge.puppetlabs.com/wdijkerman/zabbix) so the following may be slightly abstracted...

When my zabbix web frontend is configured to disable TLSV1:

SSLProtocol ALL -SSLv2 -SSLv3 -TLSV1

I receive SSL_connect errors:

Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[kickstart.example.com]: Could not evaluate: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A

If I remove the -TLSV1 and restart httpd, I no longer receive the SSL_connect errors. I can otherwise interact with the zabbix web frontend via https and the SYSCALL error string shows up in numerous ruby projects, so I believe this is an issue with the zabbixapi gem itself. Let me know if I can do anything else to help troubleshoot this.

@rnelson0

This comment has been minimized.

Copy link

rnelson0 commented Feb 17, 2016

This is a system ruby issue, not a zabbixapi issue, I will close this out.

For those curious, http://stackoverflow.com/questions/22550213/how-to-set-tls-context-options-in-ruby-like-opensslsslssl-op-no-sslv2 helps to enumerate the issue. The Zabbix server in this instance runs on EL6 with Ruby 1.8.7. There is only SSLv2 and 3 and TLSv1 support in Ruby's net/http module (versions moved to the front):

irb(main):004:0> OpenSSL::SSL.constants.grep(/OP_/)
=> ["OP_NO_SSLv3", "OP_NO_SSLv2", "OP_NO_TLSv1", "OP_TLS_D5_BUG", "OP_SSLREF2_REUSE_CERT_TYPE_BUG", "OP_EPHEMERAL_RSA", "OP_ALL", "OP_PKCS1_CHECK_1", "OP_SSLEAY_080_CLIENT_DH_BUG", "OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG", "OP_SINGLE_DH_USE", "OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", "OP_DONT_INSERT_EMPTY_FRAGMENTS", "OP_NO_TICKET", "OP_MSIE_SSLV2_RSA_PADDING", "OP_TLS_ROLLBACK_BUG", "OP_NETSCAPE_CHALLENGE_BUG", "OP_SINGLE_ECDH_USE", "OP_NETSCAPE_CA_DN_BUG", "OP_TLS_BLOCK_PADDING_BUG", "OP_MICROSOFT_BIG_SSLV3_BUFFER", "OP_CIPHER_SERVER_PREFERENCE", "OP_MICROSOFT_SESS_ID_BUG", "OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION", "OP_PKCS1_CHECK_2"]

By comparison, using EL7 and Ruby 2.0.0, there is support for versions beyond TLSv1:

irb(main):002:0> OpenSSL::SSL.constants.grep(/OP_/)
=> [:OP_NO_SSLv2, :OP_NO_SSLv3, :OP_NO_TLSv1, :OP_NO_TLSv1_1, :OP_NO_TLSv1_2, :OP_MICROSOFT_SESS_ID_BUG, :OP_NETSCAPE_CHALLENGE_BUG, :OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG, :OP_SSLREF2_REUSE_CERT_TYPE_BUG, :OP_MICROSOFT_BIG_SSLV3_BUFFER, :OP_MSIE_SSLV2_RSA_PADDING, :OP_SSLEAY_080_CLIENT_DH_BUG, :OP_TLS_D5_BUG, :OP_TLS_BLOCK_PADDING_BUG, :OP_DONT_INSERT_EMPTY_FRAGMENTS, :OP_ALL, :OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, :OP_SINGLE_ECDH_USE, :OP_SINGLE_DH_USE, :OP_EPHEMERAL_RSA, :OP_CIPHER_SERVER_PREFERENCE, :OP_TLS_ROLLBACK_BUG, :OP_NO_TICKET, :OP_NO_COMPRESSION, :OP_PKCS1_CHECK_1, :OP_PKCS1_CHECK_2, :OP_NETSCAPE_CA_DN_BUG, :OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG]

In this case, the fix is to have a newer system ruby. Hope that helps someone else.

@rnelson0 rnelson0 closed this Feb 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment