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
- Host: GitHub
- URL: https://github.com/rcoenmans/pkcsutil
- Owner: rcoenmans
- License: mit
- Created: 2018-06-28T15:19:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-17T11:57:10.000Z (about 5 years ago)
- Last Synced: 2024-01-29T23:14:26.053Z (over 2 years ago)
- Topics: cert, certificate, openssl, pem, pfx, pkcs12
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```