Previous: PKCS #10 certificate requests, Up: The X.509 trust model


5.1.4 PKCS #12 structures

A PKCS #12 structure [PKCS12] (See PKCS12.) usually contains a user's private keys and certificates. It is commonly used in browsers to export and import the user's identities.

In GnuTLS the PKCS #12 structures are handled using the gnutls_pkcs12_t type. This is an abstract type that may hold several gnutls_pkcs12_bag_t types. The Bag types are the holders of the actual data, which may be certificates, private keys or encrypted data. An Bag of type encrypted should be decrypted in order for its data to be accessed.

An example of a PKCS #12 structure generation can be found at section ex:pkcs12.