@@ -2838,12 +2838,18 @@ public function make_ispconfig_ssl_cert() {
28382838 }
28392839
28402840 swriteln ('Using certificate path ' . $ acme_cert_dir );
2841+ $ ip_address_match = false ;
28412842 if (!(($ svr_ip4 && in_array ($ svr_ip4 , $ dns_ips )) || ($ svr_ip6 && in_array ($ svr_ip6 , $ dns_ips )))) {
28422843 swriteln ('Server \'s public ip(s) ( ' . $ svr_ip4 . ($ svr_ip6 ? ', ' . $ svr_ip6 : '' ) . ') not found in A/AAAA records for ' . $ hostname . ': ' . implode (', ' , $ dns_ips ));
2844+ if (strtolower ($ inst ->simple_query ('Ignore DNS check and continue to request certificate? ' , array ('y ' , 'n ' ) , 'n ' ,'ignore_hostname_dns ' )) == 'y ' ) {
2845+ $ ip_address_match = true ;
2846+ }
2847+ } else {
2848+ $ ip_address_match = true ;
28432849 }
28442850
28452851
2846- if ((!@is_dir ($ acme_cert_dir ) || !@file_exists ($ check_acme_file ) || !@file_exists ($ ssl_crt_file ) || md5_file ($ check_acme_file ) != md5_file ($ ssl_crt_file )) && (( $ svr_ip4 && in_array ( $ svr_ip4 , $ dns_ips )) || ( $ svr_ip6 && in_array ( $ svr_ip6 , $ dns_ips ))) ) {
2852+ if ((!@is_dir ($ acme_cert_dir ) || !@file_exists ($ check_acme_file ) || !@file_exists ($ ssl_crt_file ) || md5_file ($ check_acme_file ) != md5_file ($ ssl_crt_file )) && $ ip_address_match == true ) {
28472853
28482854 // This script is needed earlier to check and open http port 80 or standalone might fail
28492855 // Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
@@ -3002,7 +3008,7 @@ public function make_ispconfig_ssl_cert() {
30023008 if ($ conf ['apache ' ]['installed ' ] == true ) {
30033009 $ this ->make_acme_vhost ($ hostname , 'apache ' , false ); // we need this config file but we don't want apache to be restarted at this point
30043010 }
3005- if (( $ svr_ip4 && in_array ( $ svr_ip4 , $ dns_ips )) || ( $ svr_ip6 && in_array ( $ svr_ip6 , $ dns_ips )) ) {
3011+ if ($ ip_address_match ) {
30063012 // the directory already exists so we have to assume that it was created previously
30073013 $ issued_successfully = true ;
30083014 }
0 commit comments