summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_structs.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2015-10-27 12:59:09 +0100
committerAndrey Hristov <andrey@php.net>2015-10-27 12:59:09 +0100
commit6d51b7b2e3468601acdaaf9041c9131b5aa47f98 (patch)
tree2f2c193dc999941727f61c118ef06f532ff3e7e9 /ext/mysqlnd/mysqlnd_structs.h
parent2f7a8515ca7f3ab4b0640677e4f476f87642ff61 (diff)
downloadphp-git-6d51b7b2e3468601acdaaf9041c9131b5aa47f98.tar.gz
Another Fix for Bug #68344 MySQLi does not provide way to disable peer certificate validation
Added the possibility to explicitly state that the peer certificate should not be checked. Back to the default - checking the certificate. Exported MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT Usage : mysqli_real_connect( , , , , , MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT) If mysqli_ssl_set() is not called, but only MYSQLI_CLIENT_SSL is passed, without the (don't) very flag, then no verification takes place.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_structs.h')
-rw-r--r--ext/mysqlnd/mysqlnd_structs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h
index 170c977c2b..f5d0b47a6f 100644
--- a/ext/mysqlnd/mysqlnd_structs.h
+++ b/ext/mysqlnd/mysqlnd_structs.h
@@ -207,7 +207,13 @@ typedef struct st_mysqlnd_net_options
char *ssl_capath;
char *ssl_cipher;
char *ssl_passphrase;
- zend_bool ssl_verify_peer;
+ enum mysqlnd_ssl_peer {
+ MYSQLND_SSL_PEER_DEFAULT = 0,
+ MYSQLND_SSL_PEER_VERIFY = 1,
+ MYSQLND_SSL_PEER_DONT_VERIFY = 2,
+
+#define MYSQLND_SSL_PEER_DEFAULT_ACTION MYSQLND_SSL_PEER_VERIFY
+ } ssl_verify_peer;
uint64_t flags;
char * sha256_server_public_key;
@@ -219,6 +225,7 @@ typedef struct st_mysqlnd_net_options
} MYSQLND_NET_OPTIONS;
+
typedef struct st_mysqlnd_connection MYSQLND;
typedef struct st_mysqlnd_connection_data MYSQLND_CONN_DATA;
typedef struct st_mysqlnd_net MYSQLND_NET;