Jump to content

Unable to generate private keys using openssl_pkey_new.


Recommended Posts

Hello, 

How does your PHP configuration look like? You can output it using the following command: 

php -i | grep -i ssl


Ideally, it should look something like this:

Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
SSL => Yes
MULTI_SSL => No
SSL Version => OpenSSL/1.1.1n
SSL Support => enabled
libmongoc SSL => enabled
libmongoc SSL library => OpenSSL
core SSL => supported
extended SSL => supported
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1n  15 Mar 2022
OpenSSL Header Version => OpenSSL 1.1.1n  15 Mar 2022
Openssl default config => /usr/lib/ssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native OpenSSL support => enabled

 

  • Like 1
Link to comment
Share on other sites

Hello my php config looks like this

Registered Stream Socket Transports => tcp, udp, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
SSL => Yes
MULTI_SSL => No
SSL Version => OpenSSL/3.0.8
core SSL => supported
extended SSL => supported
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 3.0.8 7 Feb 2023
OpenSSL Header Version => OpenSSL 3.0.8 7 Feb 2023
Openssl default config => C:\Program Files\Common Files\SSL/openssl.cnf
openssl.cafile => C:\xampp\apache\bin\curl-ca-bundle.crt => C:\xampp\apache\bin\curl-ca-bundle.crt
openssl.capath => C:\xampp\apache\conf\ssl.crt => C:\xampp\apache\conf\ssl.crt
OpenSSL support => enabled

Link to comment
Share on other sites

See https://github.com/PrestaShop/PrestaShop/discussions/33351

This is a Windows problem. For SSL to work there must be an environment variable that points to the openssl.cnf file. Xampp and Wamp have such files, but they don't create correct paths to those files in the environment. Previous versions of Prestashop didn't bother about SSL but now for some reason it requires you to have it correctly set.

Press Windows + R to open the Windows Run prompt. Type in sysdm.cpl and click OK. Open the Advanced tab and click on the Environment Variables button in the System Properties window.
Add variable name: "OPENSSL_CONF" variable value like: "C:\xampp\apache\conf\openssl.cnf" with the path where you installed xampp. Note that after setting an environment variable you need to restart Windows for it to work.

Edited by musicmaster (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
On 8/11/2023 at 10:35 AM, acharya_02 said:

i am trying to install prestashop and the following error is shown.

 

Capture.JPG

1. Use phpinfo() function to view Default Config OpenSSL.cnf

2023-11-30_124701.thumb.png.2933f9b5e0ab3c57412f562842f7fad4.png

2.Copy file openssl.cnf from XAMPP to this directory, example: D:\xampp8212\php\extras\ssl\openssl.cnf

3. Restart Apache.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

6 hours ago, tdsoft said:

We tried to do this but that issue is not solved???

The big question is who should solve it.

It is an Xampp problem. But Xampp is mainly used for experimentation and it has never bothered to fix this.

Prestashop has always got along with this. But now that the organization has been split between an opensource project that is mainly manned by volunteers and a commercial company the situation has changed. It looks like the volunteers are more fanatic in having the "correct" configuration. It is a pity that the company allows this to happen.

Link to comment
Share on other sites

On 8/11/2023 at 10:35 AM, acharya_02 said:

i am trying to install prestashop and the following error is shown.

 

Capture.JPG

I have tried adding environment variables and restarting the computer and this worked
Make sure the openssl.conf file is in the directory
C:/xampp/apache/bin/openssl.cnf and also
C:/xampp/apache/conf/openssl.cnf

image.png.b3bc456dc0295a85d0151d22022a081d.png

  • Thanks 1
Link to comment
Share on other sites

On 12/1/2023 at 7:39 AM, tdsoft said:

I solved it in my posts.

1. Use phpinfo() function to view Default Config OpenSSL.cnf

2.Copy file openssl.cnf from XAMPP to this directory, example: D:\xampp8212\php\extras\ssl\openssl.cnf

3. Restart Apache.

Thanks Works fine on Wampserver too

Link to comment
Share on other sites

  • 2 months later...

I use WAMP 3.3.1 -  Today 21/02/2024 I could solve this problem with this solution:

1. Use phpinfo() function to view Default Config OpenSSL.cnf  --> Openssl default config (example: C:\Program Files\Common Files\SSL/openssl.cnf)

2.Copy file openssl.cnf from WAMPP to this directory, example: C:\wamp\bin\apache\apache2.4.54.2\conf

3. Restart Apache.

Link to comment
Share on other sites

  • 3 months later...
On 2/21/2024 at 4:43 PM, yanker said:

I use WAMP 3.3.1 -  Today 21/02/2024 I could solve this problem with this solution:

1. Use phpinfo() function to view Default Config OpenSSL.cnf  --> Openssl default config (example: C:\Program Files\Common Files\SSL/openssl.cnf)

2.Copy file openssl.cnf from WAMPP to this directory, example: C:\wamp\bin\apache\apache2.4.54.2\conf

3. Restart Apache.

In which Directory plz give me screen shot 

Link to comment
Share on other sites

  • 3 months later...
On 6/4/2024 at 10:30 PM, heloooo said:

In which Directory plz give me screen shot 

My issue with XAMPP. From step 2, when you had Openssl default config path ( example C:\Apache24\conf/openssl.cnf )

- I do not have path Apache24/conf in C : -> Create path: C:/Apache24/conf  

- Then copy file openssl.cnf C:\xampp\php\extras\ssl\openssl.cnf to new directory conf

- Restart XAMPP

Edited by pangpangpangpang (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...