Foreman installation failling due SSL_connect returned=1

Problem:

Foreman-installer -i fails like this:
Choose an option from the menu… 73
2023-11-08 11:00:32 [ERROR ] [configure] /Stage[main]/Foreman::Register/Foreman_host[foreman-server1.domain1]: Could not evaluate: Exception SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain) in get request to: https://server1.domain1/api/v2/hosts?search=name%3D"server1.domain1"
2023-11-08 11:00:32 [ERROR ] [configure] Wrapped exception:
2023-11-08 11:00:32 [ERROR ] [configure] SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)
2023-11-08 11:00:32 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[server1.domain1]: Could not evaluate: Exception SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain) in get request to: https://server1.domain1/api/v2/smart_proxies?search=name%3D"server1.domain1"
2023-11-08 11:00:32 [ERROR ] [configure] Wrapped exception:
2023-11-08 11:00:32 [ERROR ] [configure] SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)
2023-11-08 11:00:32 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_host[foreman-proxy-server1.domain1]: Could not evaluate: Exception SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain) in get request to: https://server1.domain1/api/v2/hosts?search=name%3D"server1.domain1"
2023-11-08 11:00:32 [ERROR ] [configure] Wrapped exception:
2023-11-08 11:00:32 [ERROR ] [configure] SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)

There were errors detected during install.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/foreman.log
[root@server1 ~]#

Expected outcome:

Better understand SSL data flow and possibly fix installer issue

Foreman and Proxy versions:
Red Hat Enterprise Linux release 8.8 (Ootpa)
FOREMAN Version 3.7
JAVA
OpenJDK version “1.8.0_382”
OpenJDK Runtime Environment (build 1.8.0_382-b05)
OpenJDK 64-Bit Server VM (build 25.382-b05, mixed mode)
RUBY Version 2.7.8p225 (2023-03-30 revision 1f4d455848) x86_64-linux
PUPPETSERVER Version 6.20.0
PUPPET Version 7.26.0

Other relevant data:

Proxy et forman server are hosted in the same host server1
No Katello installed

I had to add a “puppet” alias locally (/etc/hosts) as I have another DNS alias for “puppet” pointing toward another production server.

[root@server1 ~]# cat /etc/hosts
#127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
xx.xxx.xx.xx server1.domain1 puppet.domain1 server1 puppet localhost
[root@server1 ~]#

[root@server1 ~]# getent hosts puppet
xx.xxx.xx.xx server1.domain1 puppet.domain1 server1 puppet localhost

[root@server1 ~]# getent hosts puppet.domain1
xx.xxx.xx.xx server1.domain1 puppet.domain1 server1 puppet localhost

[root@server1 ~]# getent hosts server1
::1 server1 localhost

[root@server1 ~]# getent hosts server1.domain1
xx.xxx.xx.xx server1.domain1 puppet.domain1 server1 puppet localhost
[root@server1 ~]#