Where does openssl.cnf live in Windows?

MainWP Dashboard on Local WP can’t connect to a remote child site.

When connecting a site to my localhost MainWP (powered through WP Local), I get a 500 error for /wp-admin/admin-ajax.php.

Debug gives an error:

PHP Fatal error: Uncaught TypeError: openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given in C:\Users\Steve\Local Sites\mainwp-volunteer\app\public\wp-content\plugins\mainwp\class\class-mainwp-manage-sites-view.php:1550

If I visit MainWP Advanced Settings, OpenSSL.cnf location is set to C:\Program Files\Common Files\SSL\openssl.cnf

However, the SSL folder does not exist in C:\Program Files\Common Files\

Where can I find the Local WP openssl.cnf file in Windows?

Troubleshooting Questions

Just my MainWP Dashboard site.

System Details

  • Which version of Local is being used? 6.0

  • What Operating System (OS) and OS version is being used?
    Windows 11

  • Attach the Local Log.

local-logs.zip (4.6 KB)

Hi @s.doig

I don’t have a Windows set up to be able to look, but I might have a workaround. Can you try the following?

Go to the WP > Settings > MainWP Child > Settings page.

From there, Deselect the Require Unique Security ID option and Click the Save Changes button.

Hi Nick,

The security ID is unrelated to open.ssl (it is a text string), and turning it off would leave MainWP child sites vulnerable.

Thanks,
Steve

Hi @s.doig Sorry for my misunderstanding. These threads below might be helpful to you:

Hi Nick-B,

RE: the first link, Local reports the link to openssl.cnf is:
C:\Program Files\Common Files\SSL/openssl.cnf

but the SSL folder does not exist in the Common Files folder, so Local is mistaken.

RE: the second link, this doesn’t contain any solutions.

Regards,
Steve

Hi @s.doig

The link that first one shows that it should be found here: /usr/lib/ssl/openssl.cnf

But I see some additional notes from @DigiRik that might help here:

That is not a Windows path… It is Unix/Mac.

That does not mention a Windows path either. It is Unix/Mac.

@s.doig Sorry for my mistake there.

The openssl.cnf file for Localwp should be found in the following location on Windows:

C:\Users\<username>\AppData\Roaming\Local\run\router\openssl.cnf

Note that <username> should be replaced with your Windows user account name.

If you still can’t find that directory, can you try searching for it using Windows Search? You should be able to search openssl.cnf after pressing the Windows key.

No worries.

That directory does not contain the openssl.cnf file, only a nginx folder.

Were you able to locate it using the Windows search function?

There is only 1 openssl.cnf file related to Local in the following folder:

C:\Users\Username\Local Sites\site-local\app\public\wp-content\plugins\updraftplus\vendor\phpseclib\phpseclib\phpseclib

which is irrelevant.

There are also some other openssl.cnf files in:

  • Downloads folder
  • OneDrive folder
    (both unrelated to Local)

Hi Nick,

Is Local supposed to install OpenSSL on Windows?

Or do Windows users need to install their own copy of OpenSSL when using Local?

Thanks,
Steve

Hi @ Nick-B

Any solution to Local and OpenSSL on Windows?

Hi @s.doig

Thank you for your patience with this. I did some checking with the team and discovered this is dependent upon what version of PHP you’re using.

If you’re using PHP 8.1.9 (which comes bundled with Local), this file lives at:

C:\Program Files (x86)\Local\resrouces\extraResources\lightning-services\php-8.1.9+8\bin\win32\extras\ssl

If you’re using any of the other PHP versions, it is in the directory that starts out like this:

%APPDATA%\Roaming\Local\lightning-services

Let us know if that lines up for you or if you have any other trouble!

Hi Nick,

  • I’m using PHP 8.1.9, but the directory C:\Program Files (x86)\Local\ does not exist.
  • Local Version 6.7.0+6354 on Windows 11 Home 64-bit.
  • (you should make the version copyable in the About window, instead of having to write it down manuall)

Hi Nick,

Any further discoveries on this topic?

I doubt I am the only Windows user using Local for their WordPress maintenance services using MainWP.

Hi @s.doig - I agree with you re: using MainWP, but this isn’t an error I’ve ever heard mentioned by other users.

The path Nick mentioned above is just the path to wherever Local is installed on your machine. I can’t tell you where that is, unfortunately. I am also using a 64-bit version of Windows on my machine - below is a picture of my C:\ drive. Local and the files it ship with live in Program Files (x86)\Local, which is where other apps on my machine (Chrome) are installed too. Have you checked your Program Files folder? What does your C:\ look like if you’re not seeing Local there?

Hi @austinwendt

Thank you, you’re right, Local’s openssl.conf lives in:

C:\Users\Steve\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-8.1.9+8\bin\win32\extras\ssl\openssl.cnf

and updating MainWP > Advanced > OpenSSL.cnf location with that location means I can now connect remote sites to my local MainWP dashboard running on LocalWP.

Problem solved, appreciated.
Steve

1 Like

Awesome, I’m glad you got it working! And apologies for the confusion on hunting that down, troubleshooting those file paths (especially on Windows, for some reason) can be a pain.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.