bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

PemReader does not seem to support explanatory text before the BEGIN and after the END lines for PKIX certificates

Open johnsimons opened this issue 5 years ago • 0 comments

I have a pem file that contains explanatory text before the BEGIN and this is causing PemReader.ReadObject() to fail.

Here is an example:

subject=...
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
subject=...
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----

According to https://tools.ietf.org/html/rfc7468#section-5.2, it seems the explanatory text is supported.

So my question is, is this a bug, or do I need to strip this "explanatory" text before calling PemReader?

johnsimons avatar Apr 30 '20 02:04 johnsimons