Home | History | Annotate | Line # | Download | only in man1
      1  1.1  christos =pod
      2  1.1  christos {- OpenSSL::safe::output_do_not_edit_headers(); -}
      3  1.1  christos 
      4  1.1  christos =head1 NAME
      5  1.1  christos 
      6  1.1  christos openssl-pkcs12 - PKCS#12 file command
      7  1.1  christos 
      8  1.1  christos =head1 SYNOPSIS
      9  1.1  christos 
     10  1.1  christos =for openssl duplicate options
     11  1.1  christos 
     12  1.1  christos B<openssl> B<pkcs12>
     13  1.1  christos [B<-help>]
     14  1.1  christos [B<-passin> I<arg>]
     15  1.1  christos [B<-passout> I<arg>]
     16  1.1  christos [B<-password> I<arg>]
     17  1.1  christos [B<-twopass>]
     18  1.1  christos [B<-in> I<filename>|I<uri>]
     19  1.1  christos [B<-out> I<filename>]
     20  1.1  christos [B<-nokeys>]
     21  1.1  christos [B<-nocerts>]
     22  1.1  christos [B<-noout>]
     23  1.1  christos [B<-legacy>]
     24  1.1  christos {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -}
     25  1.1  christos {- $OpenSSL::safe::opt_r_synopsis -}
     26  1.1  christos 
     27  1.1  christos PKCS#12 input (parsing) options:
     28  1.1  christos [B<-info>]
     29  1.1  christos [B<-nomacver>]
     30  1.1  christos [B<-clcerts>]
     31  1.1  christos [B<-cacerts>]
     32  1.1  christos 
     33  1.1  christos [B<-aes128>]
     34  1.1  christos [B<-aes192>]
     35  1.1  christos [B<-aes256>]
     36  1.1  christos [B<-aria128>]
     37  1.1  christos [B<-aria192>]
     38  1.1  christos [B<-aria256>]
     39  1.1  christos [B<-camellia128>]
     40  1.1  christos [B<-camellia192>]
     41  1.1  christos [B<-camellia256>]
     42  1.1  christos [B<-des>]
     43  1.1  christos [B<-des3>]
     44  1.1  christos [B<-idea>]
     45  1.1  christos [B<-noenc>]
     46  1.1  christos [B<-nodes>]
     47  1.1  christos 
     48  1.1  christos PKCS#12 output (export) options:
     49  1.1  christos 
     50  1.1  christos [B<-export>]
     51  1.1  christos [B<-inkey> I<filename>|I<uri>]
     52  1.1  christos [B<-certfile> I<filename>]
     53  1.1  christos [B<-passcerts> I<arg>]
     54  1.1  christos [B<-chain>]
     55  1.1  christos [B<-untrusted> I<filename>]
     56  1.1  christos {- $OpenSSL::safe::opt_trust_synopsis -}
     57  1.1  christos [B<-name> I<name>]
     58  1.1  christos [B<-caname> I<name>]
     59  1.1  christos [B<-CSP> I<name>]
     60  1.1  christos [B<-LMK>]
     61  1.1  christos [B<-keyex>]
     62  1.1  christos [B<-keysig>]
     63  1.1  christos [B<-keypbe> I<cipher>]
     64  1.1  christos [B<-certpbe> I<cipher>]
     65  1.1  christos [B<-descert>]
     66  1.1  christos [B<-macalg> I<digest>]
     67  1.1  christos [B<-pbmac1_pbkdf2>]
     68  1.1  christos [B<-pbmac1_pbkdf2_md> I<digest>]
     69  1.1  christos [B<-iter> I<count>]
     70  1.1  christos [B<-noiter>]
     71  1.1  christos [B<-nomaciter>]
     72  1.1  christos [B<-maciter>]
     73  1.1  christos [B<-macsaltlen>]
     74  1.1  christos [B<-nomac>]
     75  1.1  christos [B<-jdktrust> I<usage>]
     76  1.1  christos 
     77  1.1  christos =head1 DESCRIPTION
     78  1.1  christos 
     79  1.1  christos This command allows PKCS#12 files (sometimes referred to as
     80  1.1  christos PFX files) to be created and parsed. PKCS#12 files are used by several
     81  1.1  christos programs including Netscape, MSIE and MS Outlook.
     82  1.1  christos 
     83  1.1  christos =head1 OPTIONS
     84  1.1  christos 
     85  1.1  christos There are a lot of options the meaning of some depends of whether a PKCS#12 file
     86  1.1  christos is being created or parsed. By default a PKCS#12 file is parsed.
     87  1.1  christos A PKCS#12 file can be created by using the B<-export> option (see below).
     88  1.1  christos The PKCS#12 export encryption and MAC options such as B<-certpbe> and B<-iter>
     89  1.1  christos and many further options such as B<-chain> are relevant only with B<-export>.
     90  1.1  christos Conversely, the options regarding encryption of private keys when outputting
     91  1.1  christos PKCS#12 input are relevant only when the B<-export> option is not given.
     92  1.1  christos 
     93  1.1  christos The default encryption algorithm is AES-256-CBC with PBKDF2 for key derivation.
     94  1.1  christos 
     95  1.1  christos When encountering problems loading legacy PKCS#12 files that involve,
     96  1.1  christos for example, RC2-40-CBC,
     97  1.1  christos try using the B<-legacy> option and, if needed, the B<-provider-path> option.
     98  1.1  christos 
     99  1.1  christos =over 4
    100  1.1  christos 
    101  1.1  christos =item B<-help>
    102  1.1  christos 
    103  1.1  christos Print out a usage message.
    104  1.1  christos 
    105  1.1  christos =item B<-passin> I<arg>
    106  1.1  christos 
    107  1.1  christos The password source for the input, and for encrypting any private keys that
    108  1.1  christos are output.
    109  1.1  christos For more information about the format of B<arg>
    110  1.1  christos see L<openssl-passphrase-options(1)>.
    111  1.1  christos 
    112  1.1  christos =item B<-passout> I<arg>
    113  1.1  christos 
    114  1.1  christos The password source for output files.
    115  1.1  christos 
    116  1.1  christos =item B<-password> I<arg>
    117  1.1  christos 
    118  1.1  christos With B<-export>, B<-password> is equivalent to B<-passout>,
    119  1.1  christos otherwise it is equivalent to B<-passin>.
    120  1.1  christos 
    121  1.1  christos =item B<-twopass>
    122  1.1  christos 
    123  1.1  christos Prompt for separate integrity and encryption passwords: most software
    124  1.1  christos always assumes these are the same so this option will render such
    125  1.1  christos PKCS#12 files unreadable. Cannot be used in combination with the options
    126  1.1  christos B<-password>, B<-passin> if importing from PKCS#12, or B<-passout> if exporting.
    127  1.1  christos 
    128  1.1  christos =item B<-nokeys>
    129  1.1  christos 
    130  1.1  christos No private keys will be output.
    131  1.1  christos 
    132  1.1  christos =item B<-nocerts>
    133  1.1  christos 
    134  1.1  christos No certificates will be output.
    135  1.1  christos 
    136  1.1  christos =item B<-noout>
    137  1.1  christos 
    138  1.1  christos This option inhibits all credentials output,
    139  1.1  christos and so the input is just verified.
    140  1.1  christos 
    141  1.1  christos =item B<-legacy>
    142  1.1  christos 
    143  1.1  christos Use legacy mode of operation and automatically load the legacy provider.
    144  1.1  christos If OpenSSL is not installed system-wide,
    145  1.1  christos it is necessary to also use, for example, C<-provider-path ./providers>
    146  1.1  christos or to set the environment variable B<OPENSSL_MODULES>
    147  1.1  christos to point to the directory where the providers can be found.
    148  1.1  christos 
    149  1.1  christos In the legacy mode, the default algorithm for certificate encryption
    150  1.1  christos is RC2_CBC or 3DES_CBC depending on whether the RC2 cipher is enabled
    151  1.1  christos in the build. The default algorithm for private key encryption is 3DES_CBC.
    152  1.1  christos If the legacy option is not specified, then the legacy provider is not loaded
    153  1.1  christos and the default encryption algorithm for both certificates and private keys is
    154  1.1  christos AES_256_CBC with PBKDF2 for key derivation.
    155  1.1  christos 
    156  1.1  christos {- $OpenSSL::safe::opt_engine_item -}
    157  1.1  christos 
    158  1.1  christos {- $OpenSSL::safe::opt_provider_item -}
    159  1.1  christos 
    160  1.1  christos {- $OpenSSL::safe::opt_r_item -}
    161  1.1  christos 
    162  1.1  christos =back
    163  1.1  christos 
    164  1.1  christos =head2 PKCS#12 input (parsing) options
    165  1.1  christos 
    166  1.1  christos =over 4
    167  1.1  christos 
    168  1.1  christos =item B<-in> I<filename>|I<uri>
    169  1.1  christos 
    170  1.1  christos This specifies the input filename or URI.
    171  1.1  christos Standard input is used by default.
    172  1.1  christos Without the B<-export> option this must be PKCS#12 file to be parsed.
    173  1.1  christos For use with the B<-export> option
    174  1.1  christos see the L</PKCS#12 output (export) options> section.
    175  1.1  christos 
    176  1.1  christos =item B<-out> I<filename>
    177  1.1  christos 
    178  1.1  christos The filename to write certificates and private keys to, standard output by
    179  1.1  christos default. They are all written in PEM format.
    180  1.1  christos 
    181  1.1  christos =item B<-info>
    182  1.1  christos 
    183  1.1  christos Output additional information about the PKCS#12 file structure, algorithms
    184  1.1  christos used and iteration counts.
    185  1.1  christos 
    186  1.1  christos =item B<-nomacver>
    187  1.1  christos 
    188  1.1  christos Don't attempt to verify the integrity MAC.
    189  1.1  christos 
    190  1.1  christos =item B<-clcerts>
    191  1.1  christos 
    192  1.1  christos Only output client certificates (not CA certificates).
    193  1.1  christos 
    194  1.1  christos =item B<-cacerts>
    195  1.1  christos 
    196  1.1  christos Only output CA certificates (not client certificates).
    197  1.1  christos 
    198  1.1  christos =item B<-aes128>, B<-aes192>, B<-aes256>
    199  1.1  christos 
    200  1.1  christos Use AES to encrypt private keys before outputting.
    201  1.1  christos 
    202  1.1  christos =item B<-aria128>, B<-aria192>, B<-aria256>
    203  1.1  christos 
    204  1.1  christos Use ARIA to encrypt private keys before outputting.
    205  1.1  christos 
    206  1.1  christos =item B<-camellia128>, B<-camellia192>, B<-camellia256>
    207  1.1  christos 
    208  1.1  christos Use Camellia to encrypt private keys before outputting.
    209  1.1  christos 
    210  1.1  christos =item B<-des>
    211  1.1  christos 
    212  1.1  christos Use DES to encrypt private keys before outputting.
    213  1.1  christos 
    214  1.1  christos =item B<-des3>
    215  1.1  christos 
    216  1.1  christos Use triple DES to encrypt private keys before outputting.
    217  1.1  christos 
    218  1.1  christos =item B<-idea>
    219  1.1  christos 
    220  1.1  christos Use IDEA to encrypt private keys before outputting.
    221  1.1  christos 
    222  1.1  christos =item B<-noenc>
    223  1.1  christos 
    224  1.1  christos Don't encrypt private keys at all.
    225  1.1  christos 
    226  1.1  christos =item B<-nodes>
    227  1.1  christos 
    228  1.1  christos This option is deprecated since OpenSSL 3.0; use B<-noenc> instead.
    229  1.1  christos 
    230  1.1  christos =back
    231  1.1  christos 
    232  1.1  christos =head2 PKCS#12 output (export) options
    233  1.1  christos 
    234  1.1  christos =over 4
    235  1.1  christos 
    236  1.1  christos =item B<-export>
    237  1.1  christos 
    238  1.1  christos This option specifies that a PKCS#12 file will be created rather than
    239  1.1  christos parsed.
    240  1.1  christos 
    241  1.1  christos =item B<-out> I<filename>
    242  1.1  christos 
    243  1.1  christos This specifies filename to write the PKCS#12 file to. Standard output is used
    244  1.1  christos by default.
    245  1.1  christos 
    246  1.1  christos =item B<-in> I<filename>|I<uri>
    247  1.1  christos 
    248  1.1  christos This specifies the input filename or URI.
    249  1.1  christos Standard input is used by default.
    250  1.1  christos With the B<-export> option this is a file with certificates and a key,
    251  1.1  christos or a URI that refers to a key accessed via an engine.
    252  1.1  christos The order of credentials in a file doesn't matter but one private key and
    253  1.1  christos its corresponding certificate should be present. If additional
    254  1.1  christos certificates are present they will also be included in the PKCS#12 output file.
    255  1.1  christos 
    256  1.1  christos =item B<-inkey> I<filename>|I<uri>
    257  1.1  christos 
    258  1.1  christos The private key input for PKCS12 output.
    259  1.1  christos If this option is not specified then the input file (B<-in> argument) must
    260  1.1  christos contain a private key.
    261  1.1  christos If no engine is used, the argument is taken as a file.
    262  1.1  christos If the B<-engine> option is used or the URI has prefix C<org.openssl.engine:>
    263  1.1  christos then the rest of the URI is taken as key identifier for the given engine.
    264  1.1  christos 
    265  1.1  christos =item B<-certfile> I<filename>
    266  1.1  christos 
    267  1.1  christos An input file with extra certificates to be added to the PKCS#12 output
    268  1.1  christos if the B<-export> option is given.
    269  1.1  christos 
    270  1.1  christos =item B<-passcerts> I<arg>
    271  1.1  christos 
    272  1.1  christos The password source for certificate input such as B<-certfile>
    273  1.1  christos and B<-untrusted>.
    274  1.1  christos For more information about the format of B<arg> see
    275  1.1  christos L<openssl-passphrase-options(1)>.
    276  1.1  christos 
    277  1.1  christos =item B<-chain>
    278  1.1  christos 
    279  1.1  christos If this option is present then the certificate chain of the end entity
    280  1.1  christos certificate is built and included in the PKCS#12 output file.
    281  1.1  christos The end entity certificate is the first one read from the B<-in> file
    282  1.1  christos if no key is given, else the first certificate matching the given key.
    283  1.1  christos The standard CA trust store is used for chain building,
    284  1.1  christos as well as any untrusted CA certificates given with the B<-untrusted> option.
    285  1.1  christos 
    286  1.1  christos =item B<-untrusted> I<filename>
    287  1.1  christos 
    288  1.1  christos An input file of untrusted certificates that may be used
    289  1.1  christos for chain building, which is relevant only when a PKCS#12 file is created
    290  1.1  christos with the B<-export> option and the B<-chain> option is given as well.
    291  1.1  christos Any certificates that are actually part of the chain are added to the output.
    292  1.1  christos 
    293  1.1  christos {- $OpenSSL::safe::opt_trust_item -}
    294  1.1  christos 
    295  1.1  christos =item B<-name> I<friendlyname>
    296  1.1  christos 
    297  1.1  christos This specifies the "friendly name" for the certificates and private key. This
    298  1.1  christos name is typically displayed in list boxes by software importing the file.
    299  1.1  christos 
    300  1.1  christos =item B<-caname> I<friendlyname>
    301  1.1  christos 
    302  1.1  christos This specifies the "friendly name" for other certificates. This option may be
    303  1.1  christos used multiple times to specify names for all certificates in the order they
    304  1.1  christos appear. Netscape ignores friendly names on other certificates whereas MSIE
    305  1.1  christos displays them.
    306  1.1  christos 
    307  1.1  christos =item B<-CSP> I<name>
    308  1.1  christos 
    309  1.1  christos Write I<name> as a Microsoft CSP name.
    310  1.1  christos The password source for the input, and for encrypting any private keys that
    311  1.1  christos are output.
    312  1.1  christos For more information about the format of B<arg>
    313  1.1  christos see L<openssl-passphrase-options(1)>.
    314  1.1  christos 
    315  1.1  christos =item B<-LMK>
    316  1.1  christos 
    317  1.1  christos Add the "Local Key Set" identifier to the attributes.
    318  1.1  christos 
    319  1.1  christos =item B<-keyex>|B<-keysig>
    320  1.1  christos 
    321  1.1  christos Specifies that the private key is to be used for key exchange or just signing.
    322  1.1  christos This option is only interpreted by MSIE and similar MS software. Normally
    323  1.1  christos "export grade" software will only allow 512 bit RSA keys to be used for
    324  1.1  christos encryption purposes but arbitrary length keys for signing. The B<-keysig>
    325  1.1  christos option marks the key for signing only. Signing only keys can be used for
    326  1.1  christos S/MIME signing, authenticode (ActiveX control signing)  and SSL client
    327  1.1  christos authentication, however, due to a bug only MSIE 5.0 and later support
    328  1.1  christos the use of signing only keys for SSL client authentication.
    329  1.1  christos 
    330  1.1  christos =item B<-keypbe> I<alg>, B<-certpbe> I<alg>
    331  1.1  christos 
    332  1.1  christos These options allow the algorithm used to encrypt the private key and
    333  1.1  christos certificates to be selected. Any PKCS#5 v1.5 or PKCS#12 PBE algorithm name
    334  1.1  christos can be used (see L</NOTES> section for more information). If a cipher name
    335  1.1  christos (as output by C<openssl list -cipher-algorithms>) is specified then it
    336  1.1  christos is used with PKCS#5 v2.0. For interoperability reasons it is advisable to only
    337  1.1  christos use PKCS#12 algorithms.
    338  1.1  christos 
    339  1.1  christos Special value C<NONE> disables encryption of the private key and certificates.
    340  1.1  christos 
    341  1.1  christos =item B<-descert>
    342  1.1  christos 
    343  1.1  christos Encrypt the certificates using triple DES. By default the private
    344  1.1  christos key and the certificates are encrypted using AES-256-CBC unless
    345  1.1  christos the '-legacy' option is used. If '-descert' is used with the '-legacy'
    346  1.1  christos then both, the private key and the certificates are encrypted using triple DES.
    347  1.1  christos 
    348  1.1  christos =item B<-macalg> I<digest>
    349  1.1  christos 
    350  1.1  christos Specify the MAC digest algorithm. If not included SHA256 will be used.
    351  1.1  christos 
    352  1.1  christos =item B<-pbmac1_pbkdf2>
    353  1.1  christos 
    354  1.1  christos Use PBMAC1 with PBKDF2 for MAC protection of the PKCS#12 file.
    355  1.1  christos 
    356  1.1  christos =item B<-pbmac1_pbkdf2_md> I<digest>
    357  1.1  christos 
    358  1.1  christos Specify the PBKDF2 KDF digest algorithm. If not specified, SHA256 will be used.
    359  1.1  christos Unless C<-pbmac1_pbkdf2> is specified, this parameter is ignored.
    360  1.1  christos 
    361  1.1  christos =item B<-iter> I<count>
    362  1.1  christos 
    363  1.1  christos This option specifies the iteration count for the encryption key and MAC. The
    364  1.1  christos default value is 2048.
    365  1.1  christos 
    366  1.1  christos To discourage attacks by using large dictionaries of common passwords the
    367  1.1  christos algorithm that derives keys from passwords can have an iteration count applied
    368  1.1  christos to it: this causes a certain part of the algorithm to be repeated and slows it
    369  1.1  christos down. The MAC is used to check the file integrity but since it will normally
    370  1.1  christos have the same password as the keys and certificates it could also be attacked.
    371  1.1  christos 
    372  1.1  christos =item B<-noiter>, B<-nomaciter>
    373  1.1  christos 
    374  1.1  christos By default both encryption and MAC iteration counts are set to 2048, using
    375  1.1  christos these options the MAC and encryption iteration counts can be set to 1, since
    376  1.1  christos this reduces the file security you should not use these options unless you
    377  1.1  christos really have to. Most software supports both MAC and encryption iteration counts.
    378  1.1  christos MSIE 4.0 doesn't support MAC iteration counts so it needs the B<-nomaciter>
    379  1.1  christos option.
    380  1.1  christos 
    381  1.1  christos =item B<-maciter>
    382  1.1  christos 
    383  1.1  christos This option is included for compatibility with previous versions, it used
    384  1.1  christos to be needed to use MAC iterations counts but they are now used by default.
    385  1.1  christos 
    386  1.1  christos =item B<-macsaltlen>
    387  1.1  christos 
    388  1.1  christos This option specifies the salt length in bytes for the MAC. The salt length 
    389  1.1  christos should be at least 16 bytes as per NIST SP 800-132. The default value 
    390  1.1  christos is 8 bytes for backwards compatibility.
    391  1.1  christos 
    392  1.1  christos =item B<-nomac>
    393  1.1  christos 
    394  1.1  christos Do not attempt to provide the MAC integrity. This can be useful with the FIPS
    395  1.1  christos provider as the PKCS12 MAC requires PKCS12KDF which is not an approved FIPS
    396  1.1  christos algorithm and cannot be supported by the FIPS provider.
    397  1.1  christos 
    398  1.1  christos =item B<-jdktrust>
    399  1.1  christos 
    400  1.1  christos Export pkcs12 file in a format compatible with Java keystore usage. This option
    401  1.1  christos accepts a string parameter indicating the trust oid name to be granted to the
    402  1.1  christos certificate it is associated with.  Currently only "anyExtendedKeyUsage" is
    403  1.1  christos defined. Note that, as Java keystores do not accept PKCS12 files with both
    404  1.1  christos trusted certificates and keypairs, use of this option implies the setting of the
    405  1.1  christos B<-nokeys> option
    406  1.1  christos 
    407  1.1  christos =back
    408  1.1  christos 
    409  1.1  christos =head1 NOTES
    410  1.1  christos 
    411  1.1  christos Although there are a large number of options most of them are very rarely
    412  1.1  christos used. For PKCS#12 file parsing only B<-in> and B<-out> need to be used
    413  1.1  christos for PKCS#12 file creation B<-export> and B<-name> are also used.
    414  1.1  christos 
    415  1.1  christos If none of the B<-clcerts>, B<-cacerts> or B<-nocerts> options are present
    416  1.1  christos then all certificates will be output in the order they appear in the input
    417  1.1  christos PKCS#12 files. There is no guarantee that the first certificate present is
    418  1.1  christos the one corresponding to the private key.
    419  1.1  christos Certain software which tries to get a private key and the corresponding
    420  1.1  christos certificate might assume that the first certificate in the file is the one
    421  1.1  christos corresponding to the private key, but that may not always be the case.
    422  1.1  christos Using the B<-clcerts> option will solve this problem by only
    423  1.1  christos outputting the certificate corresponding to the private key. If the CA
    424  1.1  christos certificates are required then they can be output to a separate file using
    425  1.1  christos the B<-nokeys> B<-cacerts> options to just output CA certificates.
    426  1.1  christos 
    427  1.1  christos The B<-keypbe> and B<-certpbe> algorithms allow the precise encryption
    428  1.1  christos algorithms for private keys and certificates to be specified. Normally
    429  1.1  christos the defaults are fine but occasionally software can't handle triple DES
    430  1.1  christos encrypted private keys, then the option B<-keypbe> I<PBE-SHA1-RC2-40> can
    431  1.1  christos be used to reduce the private key encryption to 40 bit RC2. A complete
    432  1.1  christos description of all algorithms is contained in L<openssl-pkcs8(1)>.
    433  1.1  christos 
    434  1.1  christos Prior 1.1 release passwords containing non-ASCII characters were encoded
    435  1.1  christos in non-compliant manner, which limited interoperability, in first hand
    436  1.1  christos with Windows. But switching to standard-compliant password encoding
    437  1.1  christos poses problem accessing old data protected with broken encoding. For
    438  1.1  christos this reason even legacy encodings is attempted when reading the
    439  1.1  christos data. If you use PKCS#12 files in production application you are advised
    440  1.1  christos to convert the data, because implemented heuristic approach is not
    441  1.1  christos MT-safe, its sole goal is to facilitate the data upgrade with this
    442  1.1  christos command.
    443  1.1  christos 
    444  1.1  christos =head1 EXAMPLES
    445  1.1  christos 
    446  1.1  christos Parse a PKCS#12 file and output it to a PEM file:
    447  1.1  christos 
    448  1.1  christos  openssl pkcs12 -in file.p12 -out file.pem
    449  1.1  christos 
    450  1.1  christos Output only client certificates to a file:
    451  1.1  christos 
    452  1.1  christos  openssl pkcs12 -in file.p12 -clcerts -out file.pem
    453  1.1  christos 
    454  1.1  christos Don't encrypt the private key:
    455  1.1  christos 
    456  1.1  christos  openssl pkcs12 -in file.p12 -out file.pem -noenc
    457  1.1  christos 
    458  1.1  christos Print some info about a PKCS#12 file:
    459  1.1  christos 
    460  1.1  christos  openssl pkcs12 -in file.p12 -info -noout
    461  1.1  christos 
    462  1.1  christos Print some info about a PKCS#12 file in legacy mode:
    463  1.1  christos 
    464  1.1  christos  openssl pkcs12 -in file.p12 -info -noout -legacy
    465  1.1  christos 
    466  1.1  christos Create a PKCS#12 file from a PEM file that may contain a key and certificates:
    467  1.1  christos 
    468  1.1  christos  openssl pkcs12 -export -in file.pem -out file.p12 -name "My PSE"
    469  1.1  christos 
    470  1.1  christos Include some extra certificates:
    471  1.1  christos 
    472  1.1  christos  openssl pkcs12 -export -in file.pem -out file.p12 -name "My PSE" \
    473  1.1  christos   -certfile othercerts.pem
    474  1.1  christos 
    475  1.1  christos Export a PKCS#12 file with data from a certificate PEM file and from a further
    476  1.1  christos PEM file containing a key, with default algorithms as in the legacy provider:
    477  1.1  christos 
    478  1.1  christos  openssl pkcs12 -export -in cert.pem -inkey key.pem -out file.p12 -legacy
    479  1.1  christos 
    480  1.1  christos =head1 SEE ALSO
    481  1.1  christos 
    482  1.1  christos L<openssl(1)>,
    483  1.1  christos L<openssl-pkcs8(1)>,
    484  1.1  christos L<ossl_store-file(7)>
    485  1.1  christos 
    486  1.1  christos =head1 HISTORY
    487  1.1  christos 
    488  1.1  christos The B<-engine> option was deprecated in OpenSSL 3.0.
    489  1.1  christos The B<-nodes> option was deprecated in OpenSSL 3.0, too; use B<-noenc> instead.
    490  1.1  christos 
    491  1.1  christos =head1 COPYRIGHT
    492  1.1  christos 
    493  1.1  christos Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved.
    494  1.1  christos 
    495  1.1  christos Licensed under the Apache License 2.0 (the "License").  You may not use
    496  1.1  christos this file except in compliance with the License.  You can obtain a copy
    497  1.1  christos in the file LICENSE in the source distribution or at
    498  1.1  christos L<https://www.openssl.org/source/license.html>.
    499  1.1  christos 
    500  1.1  christos =cut
    501