Lines 119-124
ssl_make_cert()
Link Here
|
119 |
ssl_fatal 'Unable to create certificate' |
119 |
ssl_fatal 'Unable to create certificate' |
120 |
} |
120 |
} |
121 |
|
121 |
|
|
|
122 |
#PEM certificate |
123 |
|
124 |
ssl_check_pem() |
125 |
{ |
126 |
[ -n "$1" -a -f "$SSL_KEYDIR/$1.pem" -a "$SSL_KEYDIR/$1.pem" -nt "$SSL_KEYDIR/$1.key" -a "$SSL_KEYDIR/$1.pem" -nt "$SSL_CERTDIR/$1.cert" ] |
127 |
} |
128 |
|
129 |
ssl_make_pem() |
130 |
{ |
131 |
ssl_check_certfile "$@" && return |
132 |
[ -n "$1" ] || |
133 |
ssl_fatal 'Insufficient arguments.' |
134 |
|
135 |
cat "$SSL_CERTDIR/$1.cert" "$SSL_KEYDIR/$1.key" > "$SSL_KEYDIR/$1.pem" || |
136 |
ssl_fatal 'Unable to create PEM certificate' |
137 |
} |
138 |
|
122 |
#dh params |
139 |
#dh params |
123 |
|
140 |
|
124 |
ssl_check_dhparam() |
141 |
ssl_check_dhparam() |
Lines 163-166
ssl_generate()
Link Here
|
163 |
|
180 |
|
164 |
ssl_check_cert "$@" || |
181 |
ssl_check_cert "$@" || |
165 |
ssl_action ssl_make_cert "SSL self-signed certificate" "$@" |
182 |
ssl_action ssl_make_cert "SSL self-signed certificate" "$@" |
|
|
183 |
|
184 |
ssl_check_pem "$@" || |
185 |
ssl_action ssl_make_pem "SSL PEM certificate" "$@" |
166 |
} |
186 |
} |