[Mono-dev] Mono.Security - ssl certificate datetime parsing causes crash on some cultures. (patch)

yoni shalom silver83 at gmail.com
Wed Mar 24 05:26:04 EDT 2010


A crash occurs on windows machines when the process culture info doesn't
support the string format representing the x509 certificate timestamp.
Certificate timestamps should be parsed to DateTime using InvariantCulture,
which is what the patch does.

Stack Trace :

System.Security.Cryptography.CryptographicException: Input data cannot be
coded as a valid certificate. ---> System.FormatException: The DateTime
represented by the string is not supported in calendar
System.Globalization.UmAlQuraCalendar. at
System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo
dtfi, DateTimeStyles style) at System.DateTime.ParseExact(String s, String
format, IFormatProvider provider, DateTimeStyles style) at
Mono.Security.ASN1Convert.ToDateTime(ASN1 time) at
Mono.Security.X509.X509Certificate.Parse(Byte[] data) --- End of inner
exception stack trace --- at Mono.Security.X509.X509Certificate.Parse(Byte[]
data) at Mono.Security.X509.X509Certificate..ctor(Byte[] data)


Regards,
Yoni Shalom.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100324/e03e3e69/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mono.Security-ASN1Convert.patch
Type: application/octet-stream
Size: 592 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100324/e03e3e69/attachment.obj 


More information about the Mono-devel-list mailing list