Download the PHP package caiquemcz/ssl-converter without Composer
On this page you can find all versions of the php package caiquemcz/ssl-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download caiquemcz/ssl-converter
More information about caiquemcz/ssl-converter
Files in caiquemcz/ssl-converter
Package ssl-converter
Short Description SSL certificate converter (PEM/DER/PKCS12), CA bundle and private keys in PHP.
License MIT
Informations about the package ssl-converter
SSL Converter
A PHP library for converting SSL certificates between different formats (PEM, PFX/PKCS12, JKS), including CA bundles and private keys.
Features
- Convert certificates to PEM format with full chain
- Convert certificates to PFX/PKCS12 format
- Convert certificates to JKS (Java KeyStore) format
- Support for encrypted private keys
- CA bundle handling
- Legacy algorithm support for older systems
- Clean, SOLID architecture
- Fully tested with PHPUnit
Requirements
- PHP >= 7.4
- OpenSSL extension
- Symfony Process component
- Java keytool (for JKS conversion)
Installation
Usage
Quick Start with Fluent API (Recommended)
The simplest way to convert certificates is using the fluent SslConverter API:
Real-World Examples
Example 1: Convert PEM to PFX for Windows servers
Example 2: Convert to JKS for Java applications
Example 3: Handle encrypted private keys
Example 4: Use legacy algorithm for older systems
Advanced Usage with Converters
For more control, use the converter classes directly:
Converting to PEM Format
Converting to PFX Format
Converting to JKS Format
Working with Encrypted Private Keys
Getting All Files
Format Support
PEM Format
- Generates
fullchain.pem(certificate + CA bundle) - Optional
ca-bundle.pem(CA certificates) - Optional
private.pem(private key) - Requires CA bundle
PFX/PKCS12 Format
- Generates
certificate.pfx - Requires private key
- Requires password
- Supports legacy algorithm for compatibility
- Optional CA bundle
JKS Format
- Generates
certificate.jks - Requires private key
- Requires password
- Requires Java keytool installed
- Supports legacy algorithm
- Optional CA bundle
- Custom alias support
Architecture
The library follows SOLID principles with a clean architecture:
- Value Objects: Immutable data containers (
CertificateData,PrivateKeyData,VirtualFile) - Formats: Strategy pattern for different certificate formats
- Generators: Factory pattern for complex file generation
- Converters: Facade for simple API
- Collections: Type-safe collections for virtual files
Testing
Error Handling
All conversion errors throw ConversionException:
License
MIT License. See LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits
Developed by Caique
Support
If you encounter any issues or have questions, please open an issue on GitHub.