Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgine/selfsigned-certificate
A docker image that generate a TLS self signed certificates based on minica library.
https://github.com/devgine/selfsigned-certificate
docker minica openssl security ssl ssl-certificates tls tls-certificates
Last synced: 4 days ago
JSON representation
A docker image that generate a TLS self signed certificates based on minica library.
- Host: GitHub
- URL: https://github.com/devgine/selfsigned-certificate
- Owner: devgine
- License: mit
- Created: 2024-04-08T09:48:59.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-12-24T19:06:58.000Z (14 days ago)
- Last Synced: 2024-12-24T20:17:40.584Z (14 days ago)
- Topics: docker, minica, openssl, security, ssl, ssl-certificates, tls, tls-certificates
- Language: Shell
- Homepage: https://github.com/devgine/selfsigned-certificate
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Self-signed certificate
## About
This a docker image useful to generate self-signed certificates
This library is based on [minica](https://github.com/jsha/minica)[View available packages](https://github.com/devgine/selfsigned-certificate/pkgs/container/selfsigned-certificate)
Below is the list of docker images available by PHP versions:| **Docker image tags** |
|-----------------------------------------------|
| ghcr.io/devgine/selfsigned-certificate:latest |
| ghcr.io/devgine/selfsigned-certificate:1.0.0 |## How to use
This image will create the certificates in the directory `/certs`, so to have these certificate in you host machine you need to bind a volume between your target directory and the container directory `/certs`.### Generate a certificate
#### For a specific domain or wildcard
> To generate a certificate for a host domain or a wildcard, use the `-d` option
```shell
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 -d WWW.YOUR-DOMAIN.COM
``````shell
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 -d *.YOUR-DOMAIN.COM
```#### For an ip address
/!\ EXPERIMENTAL : This feature is not available yet /!\
> To generate a certificate for an ip address, use the `-i` option
```shell
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 -i IP_ADDRESS
```#### Generate multiple certificates
It's also possible to generate multiple certificates in one shot
```shell
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 \
-d WWW.YOUR-DOMAIN.COM \
-d *.WILDCARD.COM \
-i IP_ADDRESS
```### Available options
/!\ EXPERIMENTAL : This feature is not available yet /!\| Option | Type | Default | Description |
|----------|--------|----------------|-----------------------------------------|
| -ca-cert | string | minica.pem | Root certificate filename, PEM encoded. |
| -ca-key | string | minica-key.pem | Root private key filename, PEM encoded. |### Checking for certificates
```shell
openssl x509 -in PATH_TO_YOUR_CERTIFICATE -text -noout
```## References
* [minica](https://github.com/jsha/minica)
* [check certificate openssl](https://linuxhandbook.com/check-certificate-openssl/)