An open API service indexing awesome lists of open source software.

https://github.com/rcoenmans/pkcsutil

A simple PEM to PKCS12 conversion utility written in Python
https://github.com/rcoenmans/pkcsutil

cert certificate openssl pem pfx pkcs12

Last synced: 5 months ago
JSON representation

A simple PEM to PKCS12 conversion utility written in Python

Awesome Lists containing this project

README

          

# PEM to PKCS12 conversion utility
A simple PEM to PKCS12 (PFX) conversion utility written in Python.

## Usage
You can run `pkcsutil` from the command-line. Just provide the path/filename of the certificate file, private key (both PEM encoded) and the output file. You'll also need to provide the passphrase for the private key which will also be used to password-protect the output file (.pfx).
```
$ python pkcsutil.py --cert C:\path\to\cert.pem
--key C:\path\to\key.pem
--passphrase PassPhraseOfPrivateKey
--out C:\path\to\cert.pfx
```

## Testing
In order to run the tests you will need a valid private key and certificate file.
```
pkcsutil
|-- minica-key.pem
|-- minica.pem
|-- pkcsutil_test.py
|-- pkcsutil.py

$ python -m pytest pkcsutil_test.py
```