diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-04-16 09:37:33 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-04-16 09:37:33 +0200 |
commit | d931421851c73b676a0a5c566780ad940791ad1e (patch) | |
tree | c24d59b82eebc898216673212994ea0b893217d6 /csharp/src | |
parent | README updates (diff) | |
download | ice-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.cs | 26 |
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); + } } } } |