File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,8 @@ httplib.cc : ../httplib.h
6363 python3 ../split.py -o .
6464
6565cert.pem :
66- openssl genrsa 2048 > key.pem
67- openssl req -new -batch -config test.conf -key key.pem | openssl x509 -days 3650 -req -signkey key.pem > cert.pem
68- openssl req -x509 -config test.conf -key key.pem -sha256 -days 3650 -nodes -out cert2.pem -extensions SAN
69- openssl genrsa 2048 > rootCA.key.pem
70- openssl req -x509v1 -new -batch -config test.rootCA.conf -key rootCA.key.pem -days 1024 > rootCA.cert.pem
71- openssl genrsa 2048 > client.key.pem
72- openssl req -new -batch -config test.conf -key client.key.pem | openssl x509 -days 370 -req -CA rootCA.cert.pem -CAkey rootCA.key.pem -CAcreateserial > client.cert.pem
73- openssl genrsa -passout pass:test123! 2048 > key_encrypted.pem
74- openssl req -new -batch -config test.conf -key key_encrypted.pem | openssl x509 -days 3650 -req -signkey key_encrypted.pem > cert_encrypted.pem
75- openssl genrsa -aes256 -passout pass:test012! 2048 > client_encrypted.key.pem
76- openssl req -new -batch -config test.conf -key client_encrypted.key.pem -passin pass:test012! | openssl x509 -days 370 -req -CA rootCA.cert.pem -CAkey rootCA.key.pem -CAcreateserial > client_encrypted.cert.pem
77- # c_rehash .
66+ ./gen-certs.sh
7867
7968clean :
8069 rm -f test test_split test_proxy server_fuzzer * .pem * .0 * .o * .1 * .srl httplib.h httplib.cc
70+
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ if [[ $( openssl version) =~ 3\. [2-9]\. [0-9]+ ]]; then
3+ OPENSSL_X509_FLAG=' -x509v1'
4+ else
5+ OPENSSL_X509_FLAG=' -x509'
6+ fi
7+
8+ openssl genrsa 2048 > key.pem
9+ openssl req -new -batch -config test.conf -key key.pem | openssl x509 -days 3650 -req -signkey key.pem > cert.pem
10+ openssl req -x509 -config test.conf -key key.pem -sha256 -days 3650 -nodes -out cert2.pem -extensions SAN
11+ openssl genrsa 2048 > rootCA.key.pem
12+ openssl req $OPENSSL_X509_FLAG -new -batch -config test.rootCA.conf -key rootCA.key.pem -days 1024 > rootCA.cert.pem
13+ openssl genrsa 2048 > client.key.pem
14+ openssl req -new -batch -config test.conf -key client.key.pem | openssl x509 -days 370 -req -CA rootCA.cert.pem -CAkey rootCA.key.pem -CAcreateserial > client.cert.pem
15+ openssl genrsa -passout pass:test123! 2048 > key_encrypted.pem
16+ openssl req -new -batch -config test.conf -key key_encrypted.pem | openssl x509 -days 3650 -req -signkey key_encrypted.pem > cert_encrypted.pem
17+ openssl genrsa -aes256 -passout pass:test012! 2048 > client_encrypted.key.pem
18+ openssl req -new -batch -config test.conf -key client_encrypted.key.pem -passin pass:test012! | openssl x509 -days 370 -req -CA rootCA.cert.pem -CAkey rootCA.key.pem -CAcreateserial > client_encrypted.cert.pem
You can’t perform that action at this time.
0 commit comments