skriptfabrik / openssl
A PHP package to manage key files with OpenSSL
Installs: 8 980
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.2|^8.0
- ext-openssl: *
- symfony/console: ^4.1|^5.0|^6.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-28 08:38:26 UTC
README
Usage
Run $ vendor/bin/openssl help [<command_name>]
to display the usage details for a specific command.
Generate a private key
The default private key file with the name private.pem
will be generated to the current working directory. You can
specify the --type
, --bits
and --passphrase
as an option. If you want to keep an existing private key, append the
--no-override
option to the command.
$ vendor/bin/openssl openssl:generate-private-key [options] [--] [<output>]
Export the public key
The default public key file with the name public.pem
will be exported to the current working directory. The private
key is expected to be named private.pem
. It should also be stored in the working directory per default. Use the
--passphrase
option when the private key was encrypted by a passphrase. If you want to keep an existing public key,
append the --no-override
option to the command.
$ vendor/bin/openssl openssl:export-public-key [options] [--] [<input> [<output>]]
Development
Requirements
The development of this project is powered by Docker, Docker Compose and GNU Make. Please have a look at the Makefile for exact commands.
Install dependencies and development tools
This will install all Composer dependencies and development tools.
$ make install
Analyse code
The code analysis is being performed with PHPStan.
$ make analysis
Check code style
The code style is being checked with PHP_CodeSniffer.
$ make style-check
Fix code style
Some minor code style issues can also be fixed with PHP_CodeSniffer.
$ make style-fix
Run Tests
PHPUnit is being used to run the test suite.
$ make tests
Run Tests With Coverage
To display and export the coverage report add -with-coverage
.
$ make tests-with-coverage
License
The MIT License (MIT). Please see License File for more information.