From 92356e6c0b96ee2194a3697a4da60ee3702345a8 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Thu, 3 Mar 2022 12:32:20 -0800 Subject: [PATCH] Add make target to create Java trust store Fixes #27 --- .gitignore | 1 + basic/Makefile | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index b306dc1..7b26340 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ result/* *.pem *.old *.p12 +*.jks index.* serial basic/testca/openssl.cnf diff --git a/basic/Makefile b/basic/Makefile index 23f8a8f..eb988ad 100644 --- a/basic/Makefile +++ b/basic/Makefile @@ -1 +1,15 @@ include ../common.mk + +PASSWORD ?= test1234 + +keystore: + keytool -noprompt -import -trustcacerts -keystore truststore.jks \ + -file testca/cacert.pem -alias ca_certificate -storepass $(PASSWORD) || true + keytool -noprompt -import -trustcacerts -keystore truststore.jks \ + -file server_$(CN)/cert.pem -alias server_$(CN)_certificate -storepass $(PASSWORD) || true + keytool -noprompt -import -trustcacerts -keystore truststore.jks \ + -file server_$(CN)/key.pem -alias server_$(CN)_key -storepass $(PASSWORD) || true + keytool -noprompt -import -trustcacerts -keystore truststore.jks \ + -file client_$(CN)/cert.pem -alias server_$(CN)_certificate -storepass $(PASSWORD) || true + keytool -noprompt -import -trustcacerts -keystore truststore.jks \ + -file client_$(CN)/key.pem -alias server_$(CN)_key -storepass $(PASSWORD) || true