]> granicus.if.org Git - php/commitdiff
Add CURLE_SSL_PINNEDPUBKEYNOTMATCH
authorChristoph M. Becker <cmbecker69@gmx.de>
Thu, 15 Sep 2016 10:13:46 +0000 (12:13 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 15 Sep 2016 10:20:19 +0000 (12:20 +0200)
This error constant is returned on key mismatch when CURLOPT_PINNEDPUBLICKEY
is used. As the option had been introduced in PHP 7.0.7, it makes sense to
also add the related error constant to PHP 7.0+.

Cf. <https://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html>.

ext/curl/interface.c

index e43ca31a903919a2d8f94334a4b7c49561739c7e..65539d1acc7b15fab4ec5d54863ec4d8d83a2f11 100644 (file)
@@ -801,6 +801,9 @@ PHP_MINIT_FUNCTION(curl)
        REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
        REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
        REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
+#if LIBCURL_VERSION_NUM >= 0x072700 /* Available since 7.39.0 */
+       REGISTER_CURL_CONSTANT(CURLE_SSL_PINNEDPUBKEYNOTMATCH);
+#endif
        REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
        REGISTER_CURL_CONSTANT(CURLE_TOO_MANY_REDIRECTS);
        REGISTER_CURL_CONSTANT(CURLE_UNKNOWN_TELNET_OPTION);