Class: AppleShove::OpenSSLHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_shove/openssl_helper.rb

Class Method Summary collapse

Class Method Details

.pkcs12_from_pem(p12_pem) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/apple_shove/openssl_helper.rb', line 6

def self.pkcs12_from_pem(p12_pem)
  key  = ::OpenSSL::PKey::RSA.new         p12_pem
  cert = ::OpenSSL::X509::Certificate.new p12_pem
  p12  = ::OpenSSL::PKCS12.create nil, nil, key, cert

  p12
end