@@ -2835,12 +2835,18 @@ public function make_ispconfig_ssl_cert() {
28352835 }
28362836
28372837 swriteln ('Using certificate path ' . $ acme_cert_dir );
2838+ $ ip_address_match = false ;
28382839 if (!(($ svr_ip4 && in_array ($ svr_ip4 , $ dns_ips )) || ($ svr_ip6 && in_array ($ svr_ip6 , $ dns_ips )))) {
28392840 swriteln ('Server \'s public ip(s) ( ' . $ svr_ip4 . ($ svr_ip6 ? ', ' . $ svr_ip6 : '' ) . ') not found in A/AAAA records for ' . $ hostname . ': ' . implode (', ' , $ dns_ips ));
2841+ if (strtolower ($ inst ->simple_query ('Ignore DNS check and continue to request certificate? ' , array ('y ' , 'n ' ) , 'n ' ,'ignore_hostname_dns ' )) == 'y ' ) {
2842+ $ ip_address_match = true ;
2843+ }
2844+ } else {
2845+ $ ip_address_match = true ;
28402846 }
28412847
28422848
2843- 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 ))) ) {
2849+ 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 ) {
28442850
28452851 // This script is needed earlier to check and open http port 80 or standalone might fail
28462852 // Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
@@ -3003,7 +3009,7 @@ public function make_ispconfig_ssl_cert() {
30033009 }
30043010 }
30053011 } else {
3006- if (( $ svr_ip4 && in_array ( $ svr_ip4 , $ dns_ips )) || ( $ svr_ip6 && in_array ( $ svr_ip6 , $ dns_ips )) ) {
3012+ if ($ ip_address_match ) {
30073013 // the directory already exists so we have to assume that it was created previously
30083014 $ issued_successfully = true ;
30093015 }
0 commit comments