3.1.7 PKCS12 objects
Keywords: pyOpenSSL

###
3.1.7 PKCS12 objects

PKCS12 objects have the following methods:

`export`([passphrase=None][, iter=2048][, maciter=1])
  Returns a PKCS12 object as a string.

  The optional passphrase must be a string not a callback.

  See also the man page for the C function `PKCS12_create`.

`get_ca_certificates`()
  Return CA certificates within the PKCS12 object as a tuple. Returns `None` if no CA certificates are present.

`get_certificate`()
  Return certificate portion of the PKCS12 structure.

`get_friendlyname`()
  Return friendlyName portion of the PKCS12 structure.

`get_privatekey`()
  Return private key portion of the PKCS12 structure

`set_ca_certificates`(cacerts)
  Replace or set the CA certificates within the PKCS12 object with the sequence cacerts.

  Set cacerts to `None` to remove all CA certificates.

`set_certificate`(cert)
  Replace or set the certificate portion of the PKCS12 structure.

`set_friendlyname`(name)
  Replace or set the friendlyName portion of the PKCS12 structure.

`set_privatekey`(pkey)
  Replace or set private key portion of the PKCS12 structure