Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79704 --- shadow/79704 2006-10-20 05:46:15.000000000 -0400 +++ shadow/79704.tmp.301 2006-10-20 05:46:15.000000000 -0400 @@ -0,0 +1,68 @@ +Bug#: 79704 +Product: Mono: Class Libraries +Version: 1.1 +OS: GNU/Linux [Other] +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: Mono.Security +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Cannot load PEM certificate + +Description of Problem: +X509Certificate2 (internally, Mono.Security.X509.X509Certificate) is unable +to open a PEM-encoded certificate + +Steps to reproduce the problem: +1. Invoke the following code: + +class X{static void Main(){ +System.Console.WriteLine(new +System.Security.Cryptography.X509Certificates.X509Certificate2("dt.cert").Subject); +}} + +Where dt.cert contains: +-----BEGIN CERTIFICATE----- +MIICmjCCAgOgAwIBAgIBJDANBgkqhkiG9w0BAQQFADBxMQswCQYDVQQGEwJERTEc +MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2Vj +IFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENB +IDEwHhcNOTkwNzA5MTEzNDAwWhcNMTkwNzA5MjM1OTAwWjBxMQswCQYDVQQGEwJE +RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxl +U2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290 +IENBIDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANDdmwygF0RED68hQHNn +VvA+aWgRutk38oGuwySsaaHN/KYYVVb/i58ywdvneCw522CBQaXv082AjRg84lIM +C5/3ZJ7loPC4YWL0v+Cj2lgr/RUEa706nnyd8j3Y5JXD7E7C8WWrDEvsR4Jb4uFQ +ddj2YbQYXO0zoEseg/tPhLx5AgMBAAGjQjBAMB0GA1UdDgQWBBQUMeJ/nMoSlfvx +cCDbTSgTcUJhxjAPBgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkq +hkiG9w0BAQQFAAOBgQCdHRD6k8gdZCBFXpxvBW2jUn+nqIdls2eaNoZ4chYV/9dF +cygBhoidkere1ikLDD6jmXRADMzsEOBk/HC2ujkSJ/JeAFC1C9ZK36lv9LMJKID8 +0h7E7HBGhUzeRbABlTisFp9GSu4ty73LZbE65aZLBEsOM/8ce8iEhEfhWmRGSg== +-----END CERTIFICATE----- + +Actual Results: +Unhandled Exception: System.Security.Cryptography.CryptographicException: +Input data cannot be coded as a valid certificate. [...] + +Expected Results: +CN=Deutsche Telekom Root CA 1, OU=T-TeleSec Trust Center, O=Deutsche +Telekom AG, C=DE + +How often does this happen? +100% + +Additional Information: +The Microsoft implementation does provides the Expected Results. According +to the MSDN docs this functionality should be provided by X509Certificate2: + +"This constructor creates a new X509Certificate2 object using certificate +information from a byte array. The byte array can be binary (DER) encoded +or Base64-encoded X.509 data. The byte array can also be a PKCS7 +(Authenticode) signed file; the signer certificate is used to create the +object." _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
