Server IP : 195.201.23.43 / Your IP : 3.147.84.210 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/virtual-server/ |
Upload File : |
#!/usr/bin/perl # Remove an un-used SSL cert require './virtual-server-lib.pl'; &ReadParse(); $d = &get_domain($in{'dom'}); $d || &error($text{'edit_egone'}); &can_edit_domain($d) && &can_edit_ssl() || &error($text{'edit_ecannot'}); &error_setup($text{'rcert_err'}); # Validate inputs &domain_has_ssl_cert($d) || &error($text{'rcert_ecert'}); &domain_has_ssl($d) && &error($text{'rcert_essl'}); @same = &get_domain_by("ssl_same", $d->{'id'}); @same && &error($text{'rcert_esame'}); $d->{'ssl_same'} && &error($text{'rcert_esame2'}); @beforecerts = &get_all_domain_service_ssl_certs($d); @beforecerts && &error($text{'rcert_eservice'}); &set_domain_envs($d, "SSL_DOMAIN"); my $merr = &making_changes(); &reset_domain_envs($d); &error(&text('setup_emaking', "<tt>$merr</tt>")) if (defined($merr)); # Remove the cert and key from the domain object my $oldd = { %$d }; foreach my $k ('cert', 'key', 'chain', 'combined', 'everything') { if ($d->{'ssl_'.$k}) { &unlink_logged_as_domain_user($d, $d->{'ssl_'.$k}); delete($d->{'ssl_'.$k}); } } delete($d->{'ssl_pass'}); &set_all_null_print(); foreach $f (&domain_features($d), &list_feature_plugins()) { &call_feature_func($f, $d, $oldd); } &save_domain($d); &set_domain_envs($d, "SSL_DOMAIN", undef); my $merr = &made_changes(); &$second_print(&text('setup_emade', "<tt>$merr</tt>")) if (defined($merr)); &reset_domain_envs($d); &webmin_log("rcert", "domain", $d->{'dom'}); &redirect("cert_form.cgi?dom=$d->{'id'}");Private