|
@@ -49,79 +49,8 @@ function clean_challenge {
|
49
|
49
|
# The parameters are the same as for deploy_challenge.
|
50
|
50
|
}
|
51
|
51
|
|
52
|
|
-function invalid_challenge() {
|
53
|
|
- local DOMAIN="${1}" RESPONSE="${2}"
|
|
52
|
+HANDLER="$1"; shift
|
|
53
|
+if [[ "${HANDLER}" =~ ^(deploy_challenge|clean_challenge)$ ]]; then
|
|
54
|
+ "$HANDLER" "$@"
|
|
55
|
+fi
|
54
|
56
|
|
55
|
|
- echo "invalid_challenge called: ${DOMAIN}, ${RESPONSE}"
|
56
|
|
-
|
57
|
|
- # This hook is called if the challenge response has failed, so domain
|
58
|
|
- # owners can be aware and act accordingly.
|
59
|
|
- #
|
60
|
|
- # Parameters:
|
61
|
|
- # - DOMAIN
|
62
|
|
- # The primary domain name, i.e. the certificate common
|
63
|
|
- # name (CN).
|
64
|
|
- # - RESPONSE
|
65
|
|
- # The response that the verification server returned
|
66
|
|
-}
|
67
|
|
-
|
68
|
|
-function deploy_cert {
|
69
|
|
- local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
|
70
|
|
-
|
71
|
|
- echo "deploy_cert called: ${DOMAIN}, ${KEYFILE}, ${CERTFILE}, ${FULLCHAINFILE}, ${CHAINFILE}"
|
72
|
|
-
|
73
|
|
- # This hook is called once for each certificate that has been
|
74
|
|
- # produced. Here you might, for instance, copy your new certificates
|
75
|
|
- # to service-specific locations and reload the service.
|
76
|
|
- #
|
77
|
|
- # Parameters:
|
78
|
|
- # - DOMAIN
|
79
|
|
- # The primary domain name, i.e. the certificate common
|
80
|
|
- # name (CN).
|
81
|
|
- # - KEYFILE
|
82
|
|
- # The path of the file containing the private key.
|
83
|
|
- # - CERTFILE
|
84
|
|
- # The path of the file containing the signed certificate.
|
85
|
|
- # - FULLCHAINFILE
|
86
|
|
- # The path of the file containing the full certificate chain.
|
87
|
|
- # - CHAINFILE
|
88
|
|
- # The path of the file containing the intermediate certificate(s).
|
89
|
|
-}
|
90
|
|
-
|
91
|
|
-function unchanged_cert {
|
92
|
|
- local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
|
93
|
|
-
|
94
|
|
- echo "unchanged_cert called: ${DOMAIN}, ${KEYFILE}, ${CERTFILE}, ${FULLCHAINFILE}, ${CHAINFILE}"
|
95
|
|
-
|
96
|
|
- # This hook is called once for each certificate that is still
|
97
|
|
- # valid and therefore wasn't reissued.
|
98
|
|
- #
|
99
|
|
- # Parameters:
|
100
|
|
- # - DOMAIN
|
101
|
|
- # The primary domain name, i.e. the certificate common
|
102
|
|
- # name (CN).
|
103
|
|
- # - KEYFILE
|
104
|
|
- # The path of the file containing the private key.
|
105
|
|
- # - CERTFILE
|
106
|
|
- # The path of the file containing the signed certificate.
|
107
|
|
- # - FULLCHAINFILE
|
108
|
|
- # The path of the file containing the full certificate chain.
|
109
|
|
- # - CHAINFILE
|
110
|
|
- # The path of the file containing the intermediate certificate(s).
|
111
|
|
-}
|
112
|
|
-
|
113
|
|
-exit_hook() {
|
114
|
|
- # This hook is called at the end of a dehydrated command and can be used
|
115
|
|
- # to do some final (cleanup or other) tasks.
|
116
|
|
-
|
117
|
|
- :
|
118
|
|
-}
|
119
|
|
-
|
120
|
|
-startup_hook() {
|
121
|
|
- # This hook is called before the dehydrated command to do some initial tasks
|
122
|
|
- # (e.g. starting a webserver).
|
123
|
|
-
|
124
|
|
- :
|
125
|
|
-}
|
126
|
|
-
|
127
|
|
-HANDLER=$1; shift; $HANDLER "$@"
|