PHPackages                             jdmaymeow/php-encrypt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jdmaymeow/php-encrypt

Abandoned → [maymeow/php-encrypt](/?search=maymeow%2Fphp-encrypt)Php-script[Utility &amp; Helpers](/categories/utility)

jdmaymeow/php-encrypt
=====================

PHP Certification authority management script

v0.6.4(9y ago)017MIT

Since Dec 11Compare

[ Source](https://github.com/jdmaymeow/php-encrypt)[ Packagist](https://packagist.org/packages/jdmaymeow/php-encrypt)[ RSS](/packages/jdmaymeow-php-encrypt/feed)WikiDiscussions Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

PHP Encrypt
===========

[](#php-encrypt)

[![Build Status](https://camo.githubusercontent.com/e948c7620ad4729d2a95e322318b0d489ab3485ccafbc7d5ecc2f1dcc8375d05/68747470733a2f2f7472617669732d63692e6f72672f6a646d61796d656f772f7068702d656e63727970742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jdmaymeow/php-encrypt)

Certification authority management script

Installation
------------

[](#installation)

```
composer create-project --prefer-dist jdmaymeow/php-encrypt php-encrypt
```

### Prerequisities

[](#prerequisities)

- PHP with openssl extension (PHP 5.5 and higher)
- PHP mb-string extension
- Composer to install

### From GitHub mirror

[](#from-github-mirror)

Installation from public GitHub repository

```
git clone https://github.com/jdmaymeow/php-encrypt
cd php-encrypt
composer install
```

### With composer (RECOMENDED)

[](#with-composer-recomended)

If you are familiar with composer, you can install latest stable version with composer too.

```
composer create-project --prefer-dist jdmaymeow/php-encrypt [app-name]
```

There are both versions and you have to be a developer.

Configuration
-------------

[](#configuration)

Default configuration file is located in

```
config/encrypt.yml
```

Default configuration per each certificate type looks like

```
certificates:
  ca:
    daysvalid: 7000
    x509_extensions: v3_ca
  intermediate:
    daysvalid: 3650
    x509_extensions: v3_intermediate_ca
```

You can add new configuration if you want anther certificate type

Usage
-----

[](#usage)

With this script you can sign certificates for CA, Intermediate CA, users and servers. Before you can do this you will need create your CA and Intermediate CA certificates

### Creating CA

[](#creating-ca)

Example to create CA

```
php index.php bf:ca DesiredNameCa --CN="My CA" --C=SK --O="My Organization ltd."
```

### Creating Intermediate CA

[](#creating-intermediate-ca)

To sign certificates you will need Intermediate CA certificate. Here is example:

```
php index.php bf:intermediatesign DesiredNameCa --CN="My Intermediate CA" --C=SK --O="My Organization ltd." --CA=DesiredNameCa
```

- DesiredNameCa must be same as name of your certification authority.
- in `--ca=...` you will specify which CA you want use to sign certificate is the same as DesiredNameCa

### Signing Certificates

[](#signing-certificates)

#### User certificates

[](#user-certificates)

```
php index.php bf:usersign jane-doe --CN="Jane Doe" --C=SK --E=jane@doe.local --CA=MyCA
```

Script will use intermediate.cert and key from MyCa folder.Certificates

If you need override certificate validity you can do it with option `--validity` and add your lenght (in days). Example:

```
php index.php bf:usersign jane-doe --CN="Jane Doe" --C=SK --E=jane@doe.local --validity=30 --CA=MyCA
```

#### Server Certificates

[](#server-certificates)

Before you can sign server certificate go to `config/intermediate.cnf` and add to end of this file

```
[ alt_names ]
# To add domaind add DNS.1, DNS.2 ...
# for multi domain add DNS.1=domain.tld and DNS.2=*.domain.tld
DNS.1 = www.somewhere.com

# If you want add IP addresses add IP.1, Ip.2 ...
# IP.1=127.0.0.1

```

now you can sign certificate with

```
php index.php bf:serversign my-server --CN="www.domain.tld" --C=SK --CA=MyCA
```

Override certificate validity in days (same as in users certificates)

```
php index.php bf:serversign my-server --CN="www.domain.tld" --C=SK --validity=30 --CA=MyCA
```

Running as CLI globally from system
-----------------------------------

[](#running-as-cli-globally-from-system)

If you want to run your script globally over the system is importatn to change configuration to read current working directory instead of parrent directory where is script installed. Go to `config/app.php` and change following line as on example:

```
define('WWW_ROOT', ROOT . DS . 'webroot' . DS);

//change to
define('WWW_ROOT', CLI_ROOT . DS . 'webroot' . DS);
```

Script will now create webroot folder and all certificates i your working directory.

### Windows

[](#windows)

To run script anywhere from windows create Path to forlder which is containing `php-encrypt.bat` with this content:

```
@php "%~dp0path-to-php-encrypt-folder\index.php" %*
```

### Linux

[](#linux)

TODO comming soon

Backup
------

[](#backup)

All you need is backup `webroot` folder where are stored all certificates and your config files ` *.cnf encrypt.yml` if you have changed them.

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

History
-------

[](#history)

TODO: Write history

Credits
-------

[](#credits)

- May Meow
- BlackFriday community on GitlabCafe

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7c2bca298b9947b96e7d8ecc3e58d2a63caf97adb52d28c07dc8b9468cdabb6?d=identicon)[maymeow](/maintainers/maymeow)

---

Tags

phpopensslcertificates

### Embed Badge

![Health badge](/badges/jdmaymeow-php-encrypt/health.svg)

```
[![Health](https://phpackages.com/badges/jdmaymeow-php-encrypt/health.svg)](https://phpackages.com/packages/jdmaymeow-php-encrypt)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k68](/packages/friendsoftypo3-content-blocks)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.9k1](/packages/phpactor-phpactor)[altis/local-server

Local Server module for Altis

18225.6k4](/packages/altis-local-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
