Add integrations tests for CSR.

This commit is contained in:
Jakub Warmuz
2015-06-25 16:05:25 +00:00
parent dc561ea3df
commit 4057734c33
2 changed files with 27 additions and 17 deletions
+3 -3
View File
@@ -17,12 +17,12 @@ do
domains="$domains,DNS:$x" domains="$domains,DNS:$x"
done done
SAN="$domains" openssl req -config openssl.cnf \ SAN="$domains" openssl req -config "${OPENSSL_CNF:-openssl.cnf}" \
-new -nodes -subj '/' -reqexts san \ -new -nodes -subj '/' -reqexts san \
-out csr.der \ -out "${CSR_PATH:-csr.der}" \
-keyout key.pem \ -keyout key.pem \
-newkey rsa:2048 \ -newkey rsa:2048 \
-outform DER -outform DER
# 512 or 1024 too low for Boulder, 2048 is smallest for tests # 512 or 1024 too low for Boulder, 2048 is smallest for tests
echo "You can now run: letsencrypt auth --csr csr.der" echo "You can now run: letsencrypt auth --csr ${CSR_PATH:-csr.der}"
+24 -14
View File
@@ -6,17 +6,27 @@
root="$(mktemp -d)" root="$(mktemp -d)"
echo "\nRoot integration tests directory: $root" echo "\nRoot integration tests directory: $root"
# first three flags required, rest is handy defaults common() {
letsencrypt \ # first three flags required, rest is handy defaults
--server http://localhost:4000/acme/new-reg \ letsencrypt \
--no-verify-ssl \ --server http://localhost:4000/acme/new-reg \
--dvsni-port 5001 \ --no-verify-ssl \
--config-dir "$root/conf" \ --dvsni-port 5001 \
--work-dir "$root/work" \ --config-dir "$root/conf" \
--text \ --work-dir "$root/work" \
--agree-eula \ --text \
--email "" \ --agree-eula \
--domains le.wtf \ --email "" \
--authenticator standalone \ --authenticator standalone \
-vvvvvvv \ -vvvvvvv "$@"
auth }
common --domains le.wtf auth
export CSR_PATH="${root}/csr.der" OPENSSL_CNF=examples/openssl.cnf
./examples/generate-csr.sh le.wtf
common auth --csr "$CSR_PATH" \
--cert-path "${root}/csr/cert.pem" \
--chain-path "${root}/csr/chain.pem"
openssl x509 -in "${root}/csr/0000_cert.pem" -text
openssl x509 -in "${root}/csr/0000_chain.pem" -text