Skip to content

Can't access certificates from host. #43

@liquidcms

Description

@liquidcms

We have been struggling with an issue which appears to be host/container related to certificate access. Wondering if anyone has come across this:

  • we are using the module Entity Print to create PDFs of node pages
  • on our Kube envs the PDFs create correctly but images are not included (and i suspect CSS files as well)
  • running this on local set ups does work as well as VM based servers.
  • Entity Print uses the PHP lib : Dompdf for creating PDF files.
  • Dompdf uses curl to grab the images (and CSS files) and then convert them into the PDF file.

Using Lens to access the pod to run curl directly to pull an image file and i get this error:

drupal-wxt-test-68dfd8f9bd-bxdbx:/var/www/html$ curl https://our-site.gc.ca/sites/default/files/inline-images/IMG-20211119-WA0002.jpg
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

I have seen posts suggesting the host does not know the public domain name and either setting $settings['file_public_path_url'] or adding entry to hosts file might help; but no luck. Also, this command does work as expected:
wget --no-check-certificate https://our-site.ssc-spc.gc.ca/sites/default/files/inline-images/IMG-20211119-WA0002.jpg -O /tmp/test45.jpg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions