File tree 9 files changed +1800
-1565
lines changed
9 files changed +1800
-1565
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ WORKDIR /root
10
10
RUN mkdir /etc/nginx/pki
11
11
RUN mkdir /etc/nginx/pki/private
12
12
13
- # Prevent "Can't load /root/.rnd into RNG" error from openssl
14
- # RUN touch /root/.rnd
15
-
16
13
# BATS (Bash Automated Testings)
17
14
RUN git clone https://github.com/bats-core/bats-core.git /bats-core
18
15
RUN git clone https://github.com/jasonkarns/bats-support /bats-support
Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ docker exec -it getssl-ubuntu18 /getssl/test/debug-test.sh getssl-http01.cfg
35
35
36
36
## TODO
37
37
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 number Diff line number Diff line change
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 number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
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"
You can’t perform that action at this time.
0 commit comments