class Mallory::SSL::MemoryStorage
Public Class Methods
new()
click to toggle source
# File lib/mallory/ssl/memory_storage.rb, line 5 def initialize @certs = {} end
Public Instance Methods
get(domain)
click to toggle source
# File lib/mallory/ssl/memory_storage.rb, line 9 def get domain @certs[domain] end
put(cert)
click to toggle source
# File lib/mallory/ssl/memory_storage.rb, line 13 def put cert domain = cert.subject.to_a.select{|x|x[0]=="CN"}.first[1] #OpenSSL::X509::Name could have hash interface. Could. @certs[domain] = cert end