Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

On MacOS, the cli container can't access a specific https address. Getting SSL handshake error. Any

Options
U01LKKBK97T
U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet

On MacOS, the cli container can't access a specific https address. Getting SSL handshake error. Any idea?

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    Maybe outdated SSL cipher suite on the server?

    Do you access the https endpoint via curl or via php (through file handlers for example)?
    Can the https endpoint be accessed in your browser? And via docker/sdk cli curl <endpoint>
    You could also use docker/sdk cli openssl s_client -connect <endpoint>:443 -prexit -showcerts to see a more detailed view on why the SSL handshake is failing

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    Options

    Turns out it's due to an invalid certificate.
    I imported the certificate on my host and made it trust it. But still, the docker container doesn't want to connect. Did I miss to restart something?

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    Importing it on your host will not help in these case.
    If you are using curl in PHP (e.g.: through guzzle) you can set those two parameters to ignore the SSL validation, please make sure to keep that for your local development only:

    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    
  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    (Background, docker is a linux system running on your host, on mac and windows it will not use the same certificate storage as your host system, on linux you could at least mount your certificates into docker. You could import the self signed certificate during the docker build process to make it available in your docker container. But to my knowledge there is no easy possibility to do so with the docker/sdk from Spryker)

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    Options

    Thx for clarification.