Skip to content
Permalink
Browse files

Update X509Certificate.cs

  • Loading branch information...
fragmental authored and Tak committed Jun 13, 2014
1 parent dc7f705 commit e79bc9fb51bda62480d377b6724853f714d62749
Showing with 7 additions and 0 deletions.
  1. +7 −0 mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs
@@ -306,6 +306,9 @@ private byte[] GetUnsignedBigInteger (byte[] integer)
case "1.2.840.10040.4.3": // SHA1-1 with DSA
hash = SHA1.Create ();
break;
case "1.2.840.113549.1.1.11": //SHA 256 Fix for "Unsupported hash for SSL certificate" bug
hash = SHA256.Create ();
break;
default:
return null;
}
@@ -404,6 +407,7 @@ private byte[] GetUnsignedBigInteger (byte[] integer)
case "1.2.840.113549.1.1.4": // MD5 with RSA encryption
case "1.2.840.113549.1.1.5": // SHA-1 with RSA Encryption
case "1.3.14.3.2.29": // SHA1 with RSA signature
case "1.2.840.113549.1.1.11":
return (byte[]) signature.Clone ();

case "1.2.840.10040.4.3": // SHA-1 with DSA
@@ -511,6 +515,9 @@ internal bool VerifySignature (RSA rsa)
case "1.3.14.3.2.29":
v.SetHashAlgorithm ("SHA1");
break;
case "1.2.840.113549.1.1.11":
v.SetHashAlgorithm ("SHA256");
break;
default:
throw new CryptographicException ("Unsupported hash algorithm: " + m_signaturealgo);
}

0 comments on commit e79bc9f

Please sign in to comment.
You can’t perform that action at this time.