summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-04-16 09:37:33 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-04-16 09:37:33 +0200
commitd931421851c73b676a0a5c566780ad940791ad1e (patch)
treec24d59b82eebc898216673212994ea0b893217d6 /csharp/src
parentREADME updates (diff)
downloadice-d931421851c73b676a0a5c566780ad940791ad1e.tar.bz2
ice-d931421851c73b676a0a5c566780ad940791ad1e.tar.xz
ice-d931421851c73b676a0a5c566780ad940791ad1e.zip
New set of certificates for IceSSL/configuration test and various
IceSSL fixes. - Windows C++ and C# implementation of IceSSL is now a bit less picky for SUBJECTDN and ISSUERDN - Windows SChannel implementation now accept PKCS#1 certificates
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/IceSSL/SSLEngine.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/csharp/src/IceSSL/SSLEngine.cs b/csharp/src/IceSSL/SSLEngine.cs
index 19c1295faea..97a1b0c229d 100644
--- a/csharp/src/IceSSL/SSLEngine.cs
+++ b/csharp/src/IceSSL/SSLEngine.cs
@@ -113,7 +113,7 @@ namespace IceSSL
// TLS1.1 and TLS1.2 to avoid security issues with SSLv3
//
_protocols = parseProtocols(
- properties.getPropertyAsListWithDefault(prefix + "Protocols",
+ properties.getPropertyAsListWithDefault(prefix + "Protocols",
#if UNITY
new string[]{"TLS1_0"}));
#else
@@ -1179,7 +1179,29 @@ namespace IceSSL
// TODO: allow user to specify a value for validOnly?
//
bool validOnly = false;
- result = result.Find(findType, arg, validOnly);
+ if(findType == X509FindType.FindBySubjectDistinguishedName ||
+ findType == X509FindType.FindByIssuerDistinguishedName)
+ {
+ X500DistinguishedNameFlags[] flags = {
+ X500DistinguishedNameFlags.None,
+ X500DistinguishedNameFlags.Reversed,
+ };
+ X500DistinguishedName dn = new X500DistinguishedName(arg);
+ X509Certificate2Collection r = result;
+ for(int i = 0; i < flags.Length; ++i)
+ {
+ r = result.Find(findType, dn.Decode(flags[i]), validOnly);
+ if(r.Count > 0)
+ {
+ break;
+ }
+ }
+ result = r;
+ }
+ else
+ {
+ result = result.Find(findType, arg, validOnly);
+ }
}
}
}