Top Level Namespace
Defined Under Namespace
Constant Summary collapse
- LIBDIR =
Initilization Setup
File.(File.join(File.dirname(__FILE__), '../..', 'lib'))
- ROOTDIR =
File.(File.join(File.dirname(__FILE__), '../..'))
Instance Method Summary collapse
Instance Method Details
#check_cert ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ass/conf.rb', line 70 def check_cert $apps.each { |app| unless File.exist?("#{Dir.pwd}/#{app}_#{$mode}.pem") then puts "Please provide #{app}_#{$mode}.pem under '#{Dir.pwd}/' directory" return false; else puts "'#{app}'s #{$mode} PEM: (#{app}_#{$mode}.pem)" certfile = File.read("#{Dir.pwd}/#{app}_#{$mode}.pem") openSSLContext = OpenSSL::SSL::SSLContext.new openSSLContext.cert = OpenSSL::X509::Certificate.new(certfile) if $pempass == '' then openSSLContext.key = OpenSSL::PKey::RSA.new(certfile) else openSSLContext.key = OpenSSL::PKey::RSA.new(certfile,"#{$pempass}") end $certkey["#{app}"] = openSSLContext end } return true end |