From 4c44f7aa7d00658855ddf2264f661ecee78d438e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Thu, 14 May 2015 23:51:58 +0200 Subject: [PATCH] adding unpack offline, fixing pkcs12 (which requires libfaketime) --- all.sh | 8 ++++---- generateInfra.sh | 2 +- unpackOffline.sh | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 unpackOffline.sh diff --git a/all.sh b/all.sh index d59999e..9e91e2d 100755 --- a/all.sh +++ b/all.sh @@ -18,7 +18,7 @@ echo "========== Verifying Year 2015 =======" echo "========== Collection things =======" -collectCRLs.sh -collectGigiConfig.sh -collectOffline.sh -collectSignerConfig.sh +./collectCRLs.sh 2015 +./collectGigiConfig.sh 2015 +./collectOffline.sh 2015 +./collectSignerConfig.sh 2015 diff --git a/generateInfra.sh b/generateInfra.sh index 012e6b7..c95ed6e 100755 --- a/generateInfra.sh +++ b/generateInfra.sh @@ -49,7 +49,7 @@ genserver(){ #key, subject, config openssl req -new -key $1.key -out $1.csr -subj "$2" caSign $1 $year/ca/env_${year}_1 "$3" "${year}${points[1]}" "$((${year} + 2))${points[1]}" - openssl pkcs12 -inkey $1.key -in $1.crt -CAfile env.chain.crt -chain -name $1 -export -passout pass:changeit -out $1.pkcs12 + TZ=UTC LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME="${year}-01-01 00:00:00" openssl pkcs12 -inkey $1.key -in $1.crt -CAfile env.chain.crt -chain -name $1 -export -passout pass:changeit -out $1.pkcs12 } diff --git a/unpackOffline.sh b/unpackOffline.sh new file mode 100755 index 0000000..743b9cb --- /dev/null +++ b/unpackOffline.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mkdir -p generated +cd generated + +openssl enc -d -kfile <(echo 1234) -md sha256 -aes-256-cbc | tar xz -- 2.39.2