summaryrefslogtreecommitdiff
path: root/ext/curl/php_curl.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-15 15:54:49 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-02-16 10:11:00 +0100
commit75667427549b5154ab8c6f0aba21063d7882ad54 (patch)
tree4ecab7617bd54245037aea596b083f7b9cf465cb /ext/curl/php_curl.h
parent64b10854643531bcf62a884aaea0bafc57e4f914 (diff)
downloadphp-git-75667427549b5154ab8c6f0aba21063d7882ad54.tar.gz
Suppress OpenSSL error on missing optional config
openssl_pkey_new() fetches various options from the config file -- most of these are optional, and not specifying them is not an error condition from the perspective of the user. Unfortunately, the CONF_get_string() API pushes an error when accessing a key that doesn't exist (_CONF_get_string does not, but that is presumably a private API). This commit adds a helper php_openssl_conf_get_string() that automatically clears the error in this case. I've found that OpenSSL occasionally does the same thing internally: https://github.com/openssl/openssl/blob/22040fb790c854cefb04bed98ed38ea6357daf83/apps/req.c#L515-L517 Closes GH-6699.
Diffstat (limited to 'ext/curl/php_curl.h')
0 files changed, 0 insertions, 0 deletions