Browse Source
Merge pull request #4170 from SecT0uch/patch-1
Fix ecc certificates
pull/4186/head
neil
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
12 deletions
-
deploy/mailcow.sh
|
@ -44,24 +44,14 @@ mailcow_deploy() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# ECC or RSA |
|
|
|
|
|
length=$(_readdomainconf Le_Keylength) |
|
|
|
|
|
if _isEccKey "$length"; then |
|
|
|
|
|
_info "ECC key type detected" |
|
|
|
|
|
_cert_name_prefix="ecdsa-" |
|
|
|
|
|
else |
|
|
|
|
|
_info "RSA key type detected" |
|
|
|
|
|
_cert_name_prefix="" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
_info "Copying key and cert" |
|
|
_info "Copying key and cert" |
|
|
_real_key="$_ssl_path/${_cert_name_prefix}key.pem" |
|
|
|
|
|
|
|
|
_real_key="$_ssl_path/key.pem" |
|
|
if ! cat "$_ckey" >"$_real_key"; then |
|
|
if ! cat "$_ckey" >"$_real_key"; then |
|
|
_err "Error: write key file to: $_real_key" |
|
|
_err "Error: write key file to: $_real_key" |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_real_fullchain="$_ssl_path/${_cert_name_prefix}cert.pem" |
|
|
|
|
|
|
|
|
_real_fullchain="$_ssl_path/cert.pem" |
|
|
if ! cat "$_cfullchain" >"$_real_fullchain"; then |
|
|
if ! cat "$_cfullchain" >"$_real_fullchain"; then |
|
|
_err "Error: write cert file to: $_real_fullchain" |
|
|
_err "Error: write cert file to: $_real_fullchain" |
|
|
return 1 |
|
|
return 1 |
|
|