https://github.com/cirocosta/certgen
Utility for generating certificates with SAN set
https://github.com/cirocosta/certgen
certificates shell tls
Last synced: 9 months ago
JSON representation
Utility for generating certificates with SAN set
- Host: GitHub
- URL: https://github.com/cirocosta/certgen
- Owner: cirocosta
- Created: 2017-11-08T12:23:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T12:57:50.000Z (over 8 years ago)
- Last Synced: 2025-04-05T03:42:39.821Z (about 1 year ago)
- Topics: certificates, shell, tls
- Language: Shell
- Homepage:
- Size: 291 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
certgen
`certgen` is a small utility for generating certificates.
Usage:
certgen [domain [...]]
Requirements:
- openssl
Example:
Suppose we want to generate a certificate for `test.com`
so that we can test an HTTP2 setup using HAProxy.
./certgen test.com
INFO:
Starting certificate generation.
DOMAIN=test.com
KEY_NAME=key_test.com.pem
CERT_NAME=cert_test.com.pem
HAPROXY_CERT=haproxy_test.com.pem
OPENSSL_CONF=/var/folders/hb/wvttlxt51xl_m1wmtrj_k4sh0000gn/T/tmp.IdudKFSt
Generating a 4096 bit RSA private key
..................++
.......++
writing new private key to 'key_test.com.pem'
-----
SUCCESS:
Certificates successfully generated.
You can inspect the certificate by issuing the following command:
openssl x509 -in cert_test.com.pem -text -noout
Done.
Now that we have our certificate generated, run the inspection command:
Certificate:
...
Issuer: C=BR, ST=SaoPaulo, L=SaoPaulo, O=TestOrg, OU=TestUnit, CN=test.com
Validity
Not Before: Nov 8 12:31:51 2017 GMT
Not After : Nov 8 12:31:51 2019 GMT
Subject: C=BR, ST=SaoPaulo, L=SaoPaulo, O=TestOrg, OU=TestUnit, CN=test.com
...
RSA Public Key: (4096 bit)
...
X509v3 Subject Alternative Name:
DNS:test.com
...
Check that Chrome takes the certificate:
- https://dl.filla.be/f0HzxmUr3