Currence-Online / iDIN-libraries-php

MIT License
6 stars 7 forks source link

OpenSSL 1.1.1 VS 3.0 support #16

Open martijnderidder opened 1 year ago

martijnderidder commented 1 year ago

We use this package to establish the link between iDIN and our code. However, we have noticed that the package no longer works from PHP >=8.1. We will then no longer receive banks, but an empty array.

Is it still being worked on? Can there be an update to support the latest version of PHP?

martijnderidder commented 1 year ago

This error had nothing to do with PHP, the problem is that the certificates are made with OpenSSL 1 and use the Linux Alpine 3.17 OpenSSL 3.0. After that openssl_pkcs12_read will not work anymore.

DanielGSoftware commented 1 year ago

Hey, currently we are also having issues with this.

How far did you come with solving this problem?

martijnderidder commented 1 year ago

We solved the problem by using the --openssl-legacy-provider to the NODE_OPTIONS (for npm)

We also eanbled the legacy providers in the openssl.conf

DanielGSoftware commented 1 year ago

Thanks for the quick reply! I'm not too knowledgable with openSSL, I tried to enable the legacy providers in the config file, but I can't get it too work. Either i'm getting openSSL errors saying the config is incorrect, or when I do manage to get it to work, it seems to have no effect. Sorry for bothering you with this, but could you maybe elaborate what you exactly changed to the config file?

Also, just wanted to share that when I regenerate the merchant, SAML, and acquirer file using openSSL 3.x, openssl_pkcs12_read works again. However, for us we still have some other errors, so it does not seem to fully fix it.

DanielGSoftware commented 1 year ago

Never mind! I managed to successfully set the config file

martijnderidder commented 1 year ago

Nice ;) good to hear. Yeah this package is a disaster...