Specify OPENSSL_CONF for single script?

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 use the commandline to run the script with 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?