bc-csharp
bc-csharp copied to clipboard
PemReader does not seem to support explanatory text before the BEGIN and after the END lines for PKIX certificates
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?