| 1 |
#!/bin/sh |
| 2 |
# Copyright (C) 2016 The Qt Company Ltd. |
| 3 |
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
| 4 |
|
| 5 |
# generate ca.crt |
| 6 |
openssl genrsa -out ca.key 8192 |
| 7 |
openssl req -x509 -new -sha512 -nodes -key ca.key -days 10000 -out ca.crt -config ca.conf |
| 8 |
|
| 9 |
# generate inter.crt |
| 10 |
openssl genrsa -out inter.key 8192 |
| 11 |
openssl req -new -sha512 -nodes -key inter.key -out inter.csr -config inter.conf |
| 12 |
openssl x509 -req -sha512 -days 45 -in inter.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out inter.crt |
| 13 |
rm inter.csr |
| 14 |
rm ca.srl |
| 15 |
|
| 16 |
# generate leaf.crt |
| 17 |
openssl genrsa -out leaf.key 8192 |
| 18 |
openssl req -new -sha512 -nodes -key leaf.key -out leaf.csr -config leaf.conf |
| 19 |
openssl x509 -req -sha512 -days 45 -in leaf.csr -CA inter.crt -CAkey inter.key -CAcreateserial -out leaf.crt |
| 20 |
rm leaf.csr |
| 21 |
rm inter.srl |