You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2014/02/22 20:11:59 UTC
git commit: THRIFT-2325 SSL-test-certificates_cpp_tests Patch: Roger
Meier
Repository: thrift
Updated Branches:
refs/heads/master 48555c5d1 -> c94b293dc
THRIFT-2325 SSL-test-certificates_cpp_tests
Patch: Roger Meier
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/c94b293d
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/c94b293d
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/c94b293d
Branch: refs/heads/master
Commit: c94b293dc7e30d64201e552f73ec0cf9f1a8f3df
Parents: 48555c5
Author: Roger Meier <ro...@apache.org>
Authored: Sat Feb 22 20:07:33 2014 +0100
Committer: Roger Meier <ro...@apache.org>
Committed: Sat Feb 22 20:07:33 2014 +0100
----------------------------------------------------------------------
test/cpp/src/TestClient.cpp | 2 +-
test/cpp/src/TestServer.cpp | 17 ++++++++---------
2 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/c94b293d/test/cpp/src/TestClient.cpp
----------------------------------------------------------------------
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index acb0518..591d19d 100755
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -162,7 +162,7 @@ int main(int argc, char** argv) {
if (ssl) {
factory = boost::shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
factory->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
- factory->loadTrustedCertificates("./trusted-ca-certificate.pem");
+ factory->loadTrustedCertificates("keys/CA.pem");
factory->authenticate(true);
socket = factory->createSocket(host, port);
} else {
http://git-wip-us.apache.org/repos/asf/thrift/blob/c94b293d/test/cpp/src/TestServer.cpp
----------------------------------------------------------------------
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 8cf8db1..ad7df07 100755
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -598,19 +598,18 @@ int main(int argc, char **argv) {
if (ssl) {
sslSocketFactory = boost::shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
- sslSocketFactory->loadCertificate("./server-certificate.pem");
- sslSocketFactory->loadPrivateKey("./server-private-key.pem");
+ sslSocketFactory->loadCertificate("keys/server.crt");
+ sslSocketFactory->loadPrivateKey("keys/server.key");
sslSocketFactory->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
serverSocket = boost::shared_ptr<TServerSocket>(new TSSLServerSocket(port, sslSocketFactory));
} else {
- if (domain_socket != "") {
- unlink(domain_socket.c_str());
- serverSocket = boost::shared_ptr<TServerSocket>(new TServerSocket(domain_socket));
- port = 0;
- }
- else {
+ if (domain_socket != "") {
+ unlink(domain_socket.c_str());
+ serverSocket = boost::shared_ptr<TServerSocket>(new TServerSocket(domain_socket));
+ port = 0;
+ } else {
serverSocket = boost::shared_ptr<TServerSocket>(new TServerSocket(port));
- }
+ }
}
// Factory