Jens Wiklander | 3e364fd | 2018-04-26 17:28:53 +0200 | [diff] [blame] | 1 | This is a Test Ceritificate Authority, only to be used for testing. |
| 2 | |
| 3 | #Root private key |
| 4 | openssl genrsa -out ca.key 2048 |
| 5 | |
| 6 | #Root certificate |
| 7 | openssl req -new -x509 -key ca.key -out ca.crt -days 10000 -batch |
| 8 | |
| 9 | #Mid CSR and key |
| 10 | openssl req -new -out mid.csr -config mid.conf |
| 11 | |
| 12 | #Sign mid.crt |
| 13 | openssl x509 -req -in mid.csr -extfile mid.ext -CA ca.crt -CAkey ca.key -CAcreateserial -out mid.crt -days 10000 |
| 14 | |
| 15 | #My CSR and key |
| 16 | openssl req -new -out my.csr -config my.conf |
| 17 | # View it with: openssl req -in my.csr -noout -text |
| 18 | |
| 19 | #Sign my.crt |
| 20 | openssl x509 -req -in my.csr -CA mid.crt -CAkey mid.key -CAcreateserial -out my.crt -days 10000 |