security/acme-client: minor improvements for import feature

This commit is contained in:
Frank Wall
2021-09-28 18:01:14 +02:00
parent e7f9320ff2
commit 9220a41499
2 changed files with 4 additions and 2 deletions
@@ -405,7 +405,7 @@ POSSIBILITY OF SUCH DAMAGE.
if (gridParams['import'] != undefined) {
var uuid=$(this).data("row-id");
stdDialogConfirm('{{ lang._('Confirmation Required') }}',
'{{ lang._('(Re-) import the selected certificate into the trust storage?') }}',
'{{ lang._('(Re-) import the selected certificate and associated CA certificates into the trust storage?') }}',
'{{ lang._('Yes') }}', '{{ lang._('Cancel') }}', function() {
ajaxCall(url=gridParams['import'] + uuid,
sendData={},callback=function(data,status){
@@ -171,7 +171,9 @@ function main()
}
} elseif ($options['mode'] === 'import' && isset($options['cert'])) {
$cert = new LeCertificate($options['cert']);
$cert->import();
// Set $skip_validation to allow import even when validation
// is currently failing.
$cert->import(true);
} elseif ($options['mode'] === 'revoke' && isset($options['cert'])) {
$cert = new LeCertificate($options['cert']);
$cert->revoke();