Skip to content

Commit 21d5a21

Browse files
authored
Merge pull request #503 from srvrco/DUAL_RSA_ECDSA_ACMEv2
Fixes for DUAL_RSA_ECDSA and ecliptic curve problems
2 parents 621d783 + e0626f3 commit 21d5a21

9 files changed

+1800
-1565
lines changed

getssl

+1,579-1,559
Large diffs are not rendered by default.

test/3-dual-rsa-ecdsa.bats

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#! /usr/bin/env bats
2+
3+
load '/bats-support/load.bash'
4+
load '/bats-assert/load.bash'
5+
load '/getssl/test/test_helper.bash'
6+
7+
8+
# This is run for every test
9+
setup() {
10+
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
11+
}
12+
13+
14+
@test "Create dual certificates using HTTP-01 verification" {
15+
CONFIG_FILE="getssl-http01-dual-rsa-ecdsa.cfg"
16+
setup_environment
17+
init_getssl
18+
create_certificate
19+
assert_success
20+
}
21+
22+
23+
@test "Force renewal of dual certificates using HTTP-01" {
24+
#!FIXME test certificate has been updated
25+
run ${CODE_DIR}/getssl -f $GETSSL_HOST
26+
assert_success
27+
}
28+
29+
@test "Create dual certificates using DNS-01 verification" {
30+
CONFIG_FILE="getssl-dns01-dual-rsa-ecdsa.cfg"
31+
setup_environment
32+
init_getssl
33+
create_certificate
34+
assert_success
35+
}
36+
37+
38+
@test "Force renewal of dual certificates using DNS-01" {
39+
#!FIXME test certificate has been updated
40+
run ${CODE_DIR}/getssl -f $GETSSL_HOST
41+
assert_success
42+
cleanup_environment
43+
}

test/5-secp384-http01.bats

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#! /usr/bin/env bats
2+
3+
load '/bats-support/load.bash'
4+
load '/bats-assert/load.bash'
5+
load '/getssl/test/test_helper.bash'
6+
7+
8+
# This is run for every test
9+
setup() {
10+
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
11+
}
12+
13+
14+
@test "Create new secp384r1 certificate using HTTP-01 verification" {
15+
CONFIG_FILE="getssl-http01-secp384.cfg"
16+
setup_environment
17+
init_getssl
18+
create_certificate
19+
assert_success
20+
}
21+
22+
23+
@test "Force renewal of secp384r1 certificate using HTTP-01" {
24+
run ${CODE_DIR}/getssl -f $GETSSL_HOST
25+
assert_success
26+
}
27+
28+
29+
@test "Create new secp521r1 certificate using HTTP-01 verification" {
30+
CONFIG_FILE="getssl-http01-secp521.cfg"
31+
setup_environment
32+
init_getssl
33+
create_certificate
34+
assert_success
35+
}
36+
37+
38+
@test "Force renewal of secp521r1 certificate using HTTP-01" {
39+
run ${CODE_DIR}/getssl -f $GETSSL_HOST
40+
assert_success
41+
}

test/Dockerfile-debian

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ WORKDIR /root
1010
RUN mkdir /etc/nginx/pki
1111
RUN mkdir /etc/nginx/pki/private
1212

13-
# Prevent "Can't load /root/.rnd into RNG" error from openssl
14-
# RUN touch /root/.rnd
15-
1613
# BATS (Bash Automated Testings)
1714
RUN git clone https://github.com/bats-core/bats-core.git /bats-core
1815
RUN git clone https://github.com/jasonkarns/bats-support /bats-support

test/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ docker exec -it getssl-ubuntu18 /getssl/test/debug-test.sh getssl-http01.cfg
3535

3636
## TODO
3737

38-
1. Test RHEL6, Debian as well
39-
2. Test SSH, SFTP
40-
3. Test wildcards
38+
1. Test wildcards
39+
2. Test SSH, SFTP, SCP
40+
3. Test change of key algorithm
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Uncomment and modify any variables you need
2+
# see https://github.com/srvrco/getssl/wiki/Config-variables for details
3+
# see https://github.com/srvrco/getssl/wiki/Example-config-files for example configs
4+
#
5+
CA="https://pebble:14000/dir"
6+
7+
VALIDATE_VIA_DNS=true
8+
DNS_ADD_COMMAND="/getssl/dns_scripts/dns_add_challtestsrv"
9+
DNS_DEL_COMMAND="/getssl/dns_scripts/dns_del_challtestsrv"
10+
11+
DUAL_RSA_ECDSA="true"
12+
ACCOUNT_KEY_TYPE="prime256v1"
13+
PRIVATE_KEY_ALG="prime256v1"
14+
15+
# Additional domains - this could be multiple domains / subdomains in a comma separated list
16+
SANS=""
17+
18+
# Acme Challenge Location. The first line for the domain, the following ones for each additional domain.
19+
ACL=('/var/www/html/.well-known/acme-challenge')
20+
21+
#Set USE_SINGLE_ACL="true" to use a single ACL for all checks
22+
USE_SINGLE_ACL="false"
23+
24+
# Location for all your certs, these can either be on the server (full path name)
25+
# or using ssh /sftp as for the ACL
26+
DOMAIN_CERT_LOCATION="/etc/nginx/pki/server.crt"
27+
DOMAIN_KEY_LOCATION="/etc/nginx/pki/private/server.key"
28+
CA_CERT_LOCATION="/etc/nginx/pki/chain.crt"
29+
DOMAIN_CHAIN_LOCATION="" # this is the domain cert and CA cert
30+
DOMAIN_PEM_LOCATION="" # this is the domain_key, domain cert and CA cert
31+
32+
# The command needed to reload apache / nginx or whatever you use
33+
RELOAD_CMD="cp /getssl/test/test-config/nginx-ubuntu-ssl ${NGINX_CONFIG} && /getssl/test/restart-nginx"
34+
35+
# Define the server type and confirm correct certificate is installed
36+
SERVER_TYPE="https"
37+
CHECK_REMOTE="true"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Uncomment and modify any variables you need
2+
# see https://github.com/srvrco/getssl/wiki/Config-variables for details
3+
# see https://github.com/srvrco/getssl/wiki/Example-config-files for example configs
4+
#
5+
CA="https://pebble:14000/dir"
6+
7+
DUAL_RSA_ECDSA="true"
8+
ACCOUNT_KEY_TYPE="prime256v1"
9+
PRIVATE_KEY_ALG="prime256v1"
10+
11+
# Additional domains - this could be multiple domains / subdomains in a comma separated list
12+
SANS=""
13+
14+
# Acme Challenge Location.
15+
ACL=('/var/www/html/.well-known/acme-challenge')
16+
17+
#Set USE_SINGLE_ACL="true" to use a single ACL for all checks
18+
USE_SINGLE_ACL="false"
19+
20+
# Location for all your certs, these can either be on the server (full path name)
21+
# or using ssh /sftp as for the ACL
22+
DOMAIN_CERT_LOCATION="/etc/nginx/pki/server.crt"
23+
DOMAIN_KEY_LOCATION="/etc/nginx/pki/private/server.key"
24+
CA_CERT_LOCATION="/etc/nginx/pki/chain.crt"
25+
DOMAIN_CHAIN_LOCATION="" # this is the domain cert and CA cert
26+
DOMAIN_PEM_LOCATION="" # this is the domain_key, domain cert and CA cert
27+
28+
# The command needed to reload apache / nginx or whatever you use
29+
RELOAD_CMD="cp /getssl/test/test-config/nginx-ubuntu-ssl ${NGINX_CONFIG} && /getssl/test/restart-nginx"
30+
31+
# Define the server type and confirm correct certificate is installed
32+
SERVER_TYPE="https"
33+
CHECK_REMOTE="true"
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Uncomment and modify any variables you need
2+
# see https://github.com/srvrco/getssl/wiki/Config-variables for details
3+
# see https://github.com/srvrco/getssl/wiki/Example-config-files for example configs
4+
#
5+
CA="https://pebble:14000/dir"
6+
7+
ACCOUNT_KEY_TYPE="secp384r1"
8+
PRIVATE_KEY_ALG="secp384r1"
9+
10+
# Additional domains - this could be multiple domains / subdomains in a comma separated list
11+
SANS=""
12+
13+
# Acme Challenge Location.
14+
ACL=('/var/www/html/.well-known/acme-challenge')
15+
16+
#Set USE_SINGLE_ACL="true" to use a single ACL for all checks
17+
USE_SINGLE_ACL="false"
18+
19+
# Location for all your certs, these can either be on the server (full path name)
20+
# or using ssh /sftp as for the ACL
21+
DOMAIN_CERT_LOCATION="/etc/nginx/pki/server.crt"
22+
DOMAIN_KEY_LOCATION="/etc/nginx/pki/private/server.key"
23+
CA_CERT_LOCATION="/etc/nginx/pki/chain.crt"
24+
DOMAIN_CHAIN_LOCATION="" # this is the domain cert and CA cert
25+
DOMAIN_PEM_LOCATION="" # this is the domain_key, domain cert and CA cert
26+
27+
# The command needed to reload apache / nginx or whatever you use
28+
RELOAD_CMD="cp /getssl/test/test-config/nginx-ubuntu-ssl ${NGINX_CONFIG} && /getssl/test/restart-nginx"
29+
30+
# Define the server type and confirm correct certificate is installed
31+
SERVER_TYPE="https"
32+
CHECK_REMOTE="true"
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Uncomment and modify any variables you need
2+
# see https://github.com/srvrco/getssl/wiki/Config-variables for details
3+
# see https://github.com/srvrco/getssl/wiki/Example-config-files for example configs
4+
#
5+
CA="https://pebble:14000/dir"
6+
7+
ACCOUNT_KEY_TYPE="secp521r1"
8+
PRIVATE_KEY_ALG="secp521r1"
9+
10+
# Additional domains - this could be multiple domains / subdomains in a comma separated list
11+
SANS=""
12+
13+
# Acme Challenge Location.
14+
ACL=('/var/www/html/.well-known/acme-challenge')
15+
16+
#Set USE_SINGLE_ACL="true" to use a single ACL for all checks
17+
USE_SINGLE_ACL="false"
18+
19+
# Location for all your certs, these can either be on the server (full path name)
20+
# or using ssh /sftp as for the ACL
21+
DOMAIN_CERT_LOCATION="/etc/nginx/pki/server.crt"
22+
DOMAIN_KEY_LOCATION="/etc/nginx/pki/private/server.key"
23+
CA_CERT_LOCATION="/etc/nginx/pki/chain.crt"
24+
DOMAIN_CHAIN_LOCATION="" # this is the domain cert and CA cert
25+
DOMAIN_PEM_LOCATION="" # this is the domain_key, domain cert and CA cert
26+
27+
# The command needed to reload apache / nginx or whatever you use
28+
RELOAD_CMD="cp /getssl/test/test-config/nginx-ubuntu-ssl ${NGINX_CONFIG} && /getssl/test/restart-nginx"
29+
30+
# Define the server type and confirm correct certificate is installed
31+
SERVER_TYPE="https"
32+
CHECK_REMOTE="true"

0 commit comments

Comments
 (0)