Ubuntu puppet agent SSL problem

Problem:
Hello! I am trying to add an Ubuntu 16.04 host to my Foreman hosts using the puppet agent. After I install the puppet-agent from: https://apt.puppetlabs.com/ and modify /etc/puppetlabs/puppet/puppet.conf the certificate request shows up in Foreman dashboard awaiting to be signed. After I sign the certificate for the host, I get the following error from puppet-agent service (on the Ubuntu host):
Could not request certificate: request https://foreman.reposerver.local:8140//puppet-ca/v1/certificate_revocation_list/ca failed: SSL_connect returned=1 errno=0 state=error: certificate verify failed: [self signed certificate in certificate chain for /CN=Puppet Root CA: 95c239b338d5f5]

Expected outcome:
The Ubuntu host should be visible under: Hosts > All Hosts after signing the certificate.

Foreman and Proxy versions:
Foreman 1.22.1 + Katello 3.12

Foreman and Proxy plugin versions:
Foreman 1.22.1 + Katello 3.12

Other relevant data:
I’ve already tried multiple times cleaning the certificate on the server and reinstalling puppet-agent (and regenerating certs) on the Ubuntu host but nothing worked.

Which version of puppetserver and puppet agent are you using? I guess puppetserver 6 and puppet agent in an older version which typically causes the problem.

Thank you! I have updated to puppet-agent 6 on the Ubuntu host and now it’s working.