summaryrefslogtreecommitdiff
path: root/cpp/test/IceSSL/configuration/TestI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceSSL/configuration/TestI.cpp')
-rw-r--r--cpp/test/IceSSL/configuration/TestI.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/cpp/test/IceSSL/configuration/TestI.cpp b/cpp/test/IceSSL/configuration/TestI.cpp
index 39b78d02712..b467dc264ee 100644
--- a/cpp/test/IceSSL/configuration/TestI.cpp
+++ b/cpp/test/IceSSL/configuration/TestI.cpp
@@ -43,10 +43,22 @@ ServerI::checkCert(ICE_IN(string) subjectDN, ICE_IN(string) issuerDN, const Ice:
{
IceSSL::NativeConnectionInfoPtr info = ICE_DYNAMIC_CAST(IceSSL::NativeConnectionInfo, c.con->getInfo());
test(info->verified);
- test(info->nativeCerts.size() == 2 &&
- info->nativeCerts[0]->getSubjectDN() == IceSSL::DistinguishedName(subjectDN) &&
- info->nativeCerts[0]->getIssuerDN() == IceSSL::DistinguishedName(issuerDN)
- );
+ test(info->nativeCerts.size() == 2);
+ if(c.ctx.find("uwp") != c.ctx.end())
+ {
+ //
+ // UWP client just provide the subject and issuer CN, and not the full Subject and Issuer DN
+ //
+ string subject(info->nativeCerts[0]->getSubjectDN());
+ test(subject.find(subjectDN) != string::npos);
+ string issuer(info->nativeCerts[0]->getIssuerDN());
+ test(issuer.find(issuerDN) != string::npos);
+ }
+ else
+ {
+ test(info->nativeCerts[0]->getSubjectDN() == IceSSL::DistinguishedName(subjectDN));
+ test(info->nativeCerts[0]->getIssuerDN() == IceSSL::DistinguishedName(issuerDN));
+ }
}
catch(const Ice::LocalException&)
{