summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rwxr-xr-xcpp/test/Glacier2/ssl/Server.cpp2
-rw-r--r--cpp/test/IceSSL/configuration/AllTests.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/cpp/test/Glacier2/ssl/Server.cpp b/cpp/test/Glacier2/ssl/Server.cpp
index e455ede01fe..aae69863062 100755
--- a/cpp/test/Glacier2/ssl/Server.cpp
+++ b/cpp/test/Glacier2/ssl/Server.cpp
@@ -76,7 +76,7 @@ public:
test(current.ctx.find("SSL.Local.Port")->second == "12348");
try
{
- IceSSL::CertificatePtr cert = IceSSL::Certificate::decodePEM(current.ctx.find("SSL.PeerCert")->second);
+ IceSSL::CertificatePtr cert = IceSSL::Certificate::decode(current.ctx.find("SSL.PeerCert")->second);
test(cert->getIssuerDN() ==
"/C=US/ST=Florida/L=Palm Beach Gardens/O=ZeroC, Inc."
"/OU=Ice/CN=ZeroC Test CA/emailAddress=info@zeroc.com");
diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp
index 8757bbc3b05..ae47f324d43 100644
--- a/cpp/test/IceSSL/configuration/AllTests.cpp
+++ b/cpp/test/IceSSL/configuration/AllTests.cpp
@@ -320,7 +320,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir)
try
{
IceSSL::CertificatePtr clientCert =
- IceSSL::Certificate::readPEMFile(defaultDir + "/c_rsa_nopass_ca1_pub.pem");
+ IceSSL::Certificate::load(defaultDir + "/c_rsa_nopass_ca1_pub.pem");
server->checkCert(clientCert->getSubjectDN(), clientCert->getIssuerDN());
//
@@ -330,13 +330,13 @@ allTests(const CommunicatorPtr& communicator, const string& testDir)
// Validate some aspects of the Certificate class.
//
IceSSL::CertificatePtr serverCert =
- IceSSL::Certificate::readPEMFile(defaultDir + "/s_rsa_nopass_ca1_pub.pem");
- test(IceSSL::Certificate::decodePEM(serverCert->getPEMEncoding()) == serverCert);
+ IceSSL::Certificate::load(defaultDir + "/s_rsa_nopass_ca1_pub.pem");
+ test(IceSSL::Certificate::decode(serverCert->encode()) == serverCert);
test(serverCert == serverCert);
test(serverCert->checkValidity());
test(!serverCert->checkValidity(IceUtil::Time::seconds(0)));
- IceSSL::CertificatePtr caCert = IceSSL::Certificate::readPEMFile(defaultDir + "/cacert1.pem");
+ IceSSL::CertificatePtr caCert = IceSSL::Certificate::load(defaultDir + "/cacert1.pem");
test(caCert == caCert);
test(caCert->checkValidity());
test(!caCert->checkValidity(IceUtil::Time::seconds(0)));
@@ -382,7 +382,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir)
try
{
IceSSL::CertificatePtr clientCert =
- IceSSL::Certificate::readPEMFile(defaultDir + "/c_rsa_nopass_ca1_pub.pem");
+ IceSSL::Certificate::load(defaultDir + "/c_rsa_nopass_ca1_pub.pem");
server->checkCert(clientCert->getSubjectDN(), clientCert->getIssuerDN());
IceSSL::ConnectionInfo info = IceSSL::getConnectionInfo(server->ice_connection());
}
@@ -650,7 +650,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir)
//
{
IceSSL::CertificatePtr cert =
- IceSSL::Certificate::readPEMFile(defaultDir + "/s_rsa_nopass_ca1_exp_pub.pem");
+ IceSSL::Certificate::load(defaultDir + "/s_rsa_nopass_ca1_exp_pub.pem");
test(!cert->checkValidity());
}
@@ -697,7 +697,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir)
//
{
IceSSL::CertificatePtr cert =
- IceSSL::Certificate::readPEMFile(defaultDir + "/c_rsa_nopass_ca1_exp_pub.pem");
+ IceSSL::Certificate::load(defaultDir + "/c_rsa_nopass_ca1_exp_pub.pem");
test(!cert->checkValidity());
}
initData.properties->setProperty("IceSSL.CertFile", "c_rsa_nopass_ca1_exp_pub.pem");