class HTTPClient::JRubySSLSocket::SystemTrustManagerFactory::SystemTrustManager
Public Class Methods
Source
# File lib/httpclient/jruby_ssl_socket.rb, line 240 def initialize(original, verify_callback) @original = original @verify_callback = JSSEVerifyCallback.new(verify_callback) end
Public Instance Methods
Source
# File lib/httpclient/jruby_ssl_socket.rb, line 267 def checkClientTrusted(chain, authType); end
Source
# File lib/httpclient/jruby_ssl_socket.rb, line 245 def checkServerTrusted(chain, authType) is_ok = false excn = nil # TODO can we detect the depth from excn? error_depth = -1 error = nil error_message = nil begin @original.checkServerTrusted(chain, authType) is_ok = true rescue java.security.cert.CertificateException => excn is_ok = false error = excn.class.name error_message = excn.getMessage end is_ok = @verify_callback.call(is_ok, chain, error_depth, error, error_message) unless is_ok excn ||= OpenSSL::SSL::SSLError.new('verifycallback failed') raise excn end end
Source
# File lib/httpclient/jruby_ssl_socket.rb, line 268 def getAcceptedIssuers; end