diff options
author | Yuuta Liang <yuutaw@students.cs.ubc.ca> | 2023-10-14 05:12:06 +0800 |
---|---|---|
committer | Yuuta Liang <yuutaw@students.cs.ubc.ca> | 2023-10-14 05:12:06 +0800 |
commit | 0bcc057e741af3fbc108f42b75f9d42f48f6a51e (patch) | |
tree | d638c81c0778554a8902efc59000e61db74060be /tests/Makefile | |
parent | f369da34cf9aca151df0150d90e651e6a88ee700 (diff) | |
download | jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.tar jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.tar.gz jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.tar.bz2 jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.zip |
Implement the CA
Signed-off-by: Yuuta Liang <yuutaw@students.cs.ubc.ca>
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..6a294b6 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,40 @@ +.POSIX: + +leaf.csr: leaf.key leaf.csr.cnf + openssl req -new -key leaf.key -out leaf.csr -config leaf.csr.cnf + +leaf.key: + openssl genrsa -out leaf.key 4096 + +sub.crt: sub.csr + mkdir -p newcerts + touch index.txt + openssl ca \ + -verbose \ + -config ca.cnf \ + -extensions extensions_sub \ + -notext \ + -rand_serial \ + -in sub.csr \ + -out sub.crt + +ca.crt: + openssl req \ + -verbose \ + -config ca.cnf \ + -new \ + -x509 \ + -key ca.key \ + -days 9132 \ + -out ca.crt + +ca.key: + openssl ecparam -name P-256 -genkey -out ca.key + +crlnumber: + echo 0000 > crlnumber + +reset: + echo "!!! THIS WILL RESET EVERYTHING, INCLUDING PRIVATE KEYS !!!" + # sleep 5 + rm -rf newcerts serial index.txt* private certs sub.csr crlnumber* ca.crl ca.crt sub.crt ca.key |