Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

OpenSSL::PKCS12.create

(::String pass, ::String name, ::OpenSSL::PKey::PKey key, ::OpenSSL::X509::Certificate cert, ?::Array[::OpenSSL::X509::Certificate]? ca, ?::String? key_pbe, ?::String? cert_pbe, ?::Integer? key_iter, ?::Integer? mac_iter, ?::Integer? keytype) -> instance
PKCS12.create(pass, name, key, cert [, ca, [, key_pbe [, cert_pbe [, key_iter [, mac_iter [, keytype]]]]]])

Parameters

  • pass - string

  • name - A string describing the key.

  • key - Any PKey.

  • cert - A X509::Certificate.

    • The public_key portion of the certificate must contain a valid public key.

    • The not_before and not_after fields must be filled in.

  • ca - An optional array of X509::Certificate‘s.

  • key_pbe - string

  • cert_pbe - string

  • key_iter - integer

  • mac_iter - integer

  • keytype - An integer representing an MSIE specific extension.

Any optional arguments may be supplied as nil to preserve the OpenSSL defaults.

See the OpenSSL documentation for PKCS12_create().

See also .new #initialize_copy also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0