summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-03-20 11:11:16 +0100
committerJose <jose@zeroc.com>2017-03-20 11:11:16 +0100
commit11c1140a8041b3dcdd79b9244422e56ebe8da10c (patch)
tree04cba9afe9ec7fb3e723ca45cb76afcfb5cc4885 /php/src
parentFixed (ICE-7678) - Python build failure with VS 2015 (diff)
downloadice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.tar.bz2
ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.tar.xz
ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.zip
Update IceSSL::ConnectionInfo to use native certs and remove NativeConnectionInfo
Diffstat (limited to 'php/src')
-rw-r--r--php/src/php5/Connection.cpp10
-rw-r--r--php/src/php7/Connection.cpp9
2 files changed, 17 insertions, 2 deletions
diff --git a/php/src/php5/Connection.cpp b/php/src/php5/Connection.cpp
index 8a894b2457a..d845f548768 100644
--- a/php/src/php5/Connection.cpp
+++ b/php/src/php5/Connection.cpp
@@ -747,10 +747,18 @@ IcePHP::createConnectionInfo(zval* zv, const Ice::ConnectionInfoPtr& p TSRMLS_DC
add_property_string(zv, STRCAST("cipher"), const_cast<char*>(info->cipher.c_str()), 1);
add_property_bool(zv, STRCAST("verified"), info->verified ? 1 : 0);
+
zval* zarr;
MAKE_STD_ZVAL(zarr);
AutoDestroy listDestroyer(zarr);
- if(createStringArray(zarr, info->certs TSRMLS_CC))
+
+ Ice::StringSeq encoded;
+ for(vector<IceSSL::CertificatePtr>::const_iterator i = info->certs.begin(); i != info->certs.end(); ++i)
+ {
+ encoded.push_back((*i)->encode());
+ }
+
+ if(createStringArray(zarr, encoded TSRMLS_CC))
{
add_property_zval(zv, STRCAST("certs"), zarr);
}
diff --git a/php/src/php7/Connection.cpp b/php/src/php7/Connection.cpp
index 0afade3d709..7c2bf854ac3 100644
--- a/php/src/php7/Connection.cpp
+++ b/php/src/php7/Connection.cpp
@@ -763,7 +763,14 @@ IcePHP::createConnectionInfo(zval* zv, const Ice::ConnectionInfoPtr& p)
zval zarr;
AutoDestroy listDestroyer(&zarr);
- if(createStringArray(&zarr, info->certs))
+
+ Ice::StringSeq encoded;
+ for(vector<IceSSL::CertificatePtr>::const_iterator i = info->certs.begin(); i != info->certs.end(); ++i)
+ {
+ encoded.push_back((*i)->encode());
+ }
+
+ if(createStringArray(&zarr, encoded))
{
add_property_zval(zv, STRCAST("certs"), &zarr);
}