Skip to content

Commit

Permalink
Fixed problem with ECC SSL certificates and installation on Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
tomee03 committed Feb 21, 2023
1 parent 0f67daa commit db2b426
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions definitions/superadmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,15 +783,15 @@ SuperAdmin.ssl = function(url, generate, cb, renew, second) {
}

var fallback = function(callback, problem_second) {
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -w {2} --stateless'.format(CONF.directory_ssl, url, CONF.directory_acme, renew ? 'renew --force' : 'issue --force'), (err) => callback(err, problem_second));
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -w {2} --stateless --keylength 2048'.format(CONF.directory_ssl, url, CONF.directory_acme, renew ? 'renew --force' : 'issue --force'), (err) => callback(err, problem_second));
};

if (!second) {
fallback(callback, false);
return;
}

Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -d {4} -w {2} --stateless'.format(CONF.directory_ssl, url, CONF.directory_acme, renew ? 'renew --force' : 'issue --force', second), function(err) {
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -d {4} -w {2} --stateless --keylength 2048'.format(CONF.directory_ssl, url, CONF.directory_acme, renew ? 'renew --force' : 'issue --force', second), function(err) {
if (err) {
if (recreatesecond)
callback(null, true);
Expand Down
5 changes: 1 addition & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ if [[ "$userConsent" == "y" || "$userConsent" == "Y" ]]; then
fi

#Prerequisits
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
apt-get install curl
apt-get install python-software-properties
apt-get install software-properties-common
apt-get install -y curl python-software-properties software-properties-common
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
apt-get update
apt-get install -y nginx
Expand Down
4 changes: 2 additions & 2 deletions ssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

if [[ "$@" == *"-renew"* ]]
then
/root/.acme.sh/acme.sh --certhome /www/ssl --issue -d $1 --renew --force -w /www/acme
/root/.acme.sh/acme.sh --certhome /www/ssl --issue -d $1 --renew --force -w /www/acme --keylength 2048
else
if [[ "$@" == *"-update"* ]]
then
/root/.acme.sh/acme.sh upgrade
else
/root/.acme.sh/acme.sh --certhome /www/ssl --issue -d $1 -w /www/acme
/root/.acme.sh/acme.sh --certhome /www/ssl --issue -d $1 -w /www/acme --keylength 2048
fi
fi
4 changes: 2 additions & 2 deletions tasks/ssl.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ NEWTASK('ssl', function(push) {
});

push('renew', function($, value) {
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -w {2} --stateless'.format(CONF.directory_ssl, value, CONF.directory_acme, 'renew --force'), function(err) {
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -w {2} --stateless --keylength 2048'.format(CONF.directory_ssl, value, CONF.directory_acme, 'renew --force'), function(err) {

SuperAdmin.send_notify(err ? 'warning' : 'success', err ? TRANSLATOR('', '@(A problem with renewing of SSL certificate for domain <b>{0}</b>. Error: {1})').format(value, err.message) : TRANSLATOR('', '@(SSL certificate has been renewed successfully for <b>{0}</b>)').format(value));

Expand All @@ -48,7 +48,7 @@ NEWTASK('ssl', function(push) {
});

push('create', function($, value) {
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -w {2} --stateless'.format(CONF.directory_ssl, value, CONF.directory_acme, 'issue --force'), function(err) {
Exec(SuperAdmin.options.acmepath + ' --certhome {0} --{3} -d {1} -w {2} --stateless --keylength 2048'.format(CONF.directory_ssl, value, CONF.directory_acme, 'issue --force'), function(err) {
if (err)
$.invalid('error-ssl-create', value + ': ' + err);
else
Expand Down

0 comments on commit db2b426

Please sign in to comment.