Top Level Namespace
Defined Under Namespace
Classes: App
Constant Summary collapse
- LIBDIR =
Initilization Setup
File.(File.join(File.dirname(__FILE__), '..', 'lib'))
- ROOTDIR =
File.(File.join(File.dirname(__FILE__), '..'))
- Token =
- Push =
Instance Method Summary collapse
Instance Method Details
#check_cert ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/spns.rb', line 51 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) openSSLContext.key = OpenSSL::PKey::RSA.new(certfile) $certkey["#{app}"] = openSSLContext end } return true end |