Module: Google::APIClient::PKCS12

Defined in:
lib/google/api_client/auth/pkcs12.rb

Overview

Helper for loading keys from the PKCS12 files downloaded when setting up service accounts at the APIs Console.

Class Method Summary collapse

Class Method Details

.load_key(keyfile, passphrase) ⇒ OpenSSL::PKey

Deprecated.

Use KeyUtils instead

Loads a key from PKCS12 file, assuming a single private key is present.

Parameters:

  • keyfile (String)

    Path of the PKCS12 file to load. If not a path to an actual file, assumes the string is the content of the file itself.

  • passphrase (String)

    Passphrase for unlocking the private key

Returns:

  • (OpenSSL::PKey)

    The private key for signing assertions.



36
37
38
# File 'lib/google/api_client/auth/pkcs12.rb', line 36

def self.load_key(keyfile, passphrase)
  KeyUtils.load_from_pkcs12(keyfile, passphrase)
end