class HTTPClient::JRubySSLSocket::SystemTrustManagerFactory::SystemTrustManager

Public Class Methods

new(original, verify_callback) click to toggle source
# File lib/httpclient/jruby_ssl_socket.rb, line 236
def initialize(original, verify_callback)
  @original = original
  @verify_callback = JSSEVerifyCallback.new(verify_callback)
end

Public Instance Methods

checkClientTrusted(chain, authType) click to toggle source
# File lib/httpclient/jruby_ssl_socket.rb, line 263
def checkClientTrusted(chain, authType); end
checkServerTrusted(chain, authType) click to toggle source
# File lib/httpclient/jruby_ssl_socket.rb, line 241
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
getAcceptedIssuers() click to toggle source
# File lib/httpclient/jruby_ssl_socket.rb, line 264
def getAcceptedIssuers; end