Jump to content

Specify


Oguruma

Recommended Posts

I need to get some data from a third-party server with a Curl call. The problem is I get the 'legacy renegotiation failed" error, since the the third-party server doesn't jive with OpenSSL 3.X. 

I managed to get data by specifying an alternative OPENSSL_CONF and running the script manually, but I don't know how to specify that file within the script, itself.

I made a ssl.conf file in the plugin directory with 

[openssl_init]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
Options = UnsafeLegacyRenegotiation


And then the call OPENSSL_CONF=ssl.conf php rmls-test.php.

The code runs and returns data as expected. The question is, how do I specify the OPENSSL_CONF inside my script?

Link to comment
Share on other sites

You can try using putenv to set OPENSSL_CONF.

If that doesn't work and you're need this for a site, you could set the variable in your web server's config (ie, SetEnv for apache).

For a CLI script you could create an alias/script and use that to set it.  You could check with your script if it's been set and if not abort with an error.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.