Skip to content

Correct usage of X509CertificateLoader with PEM #108783

Answered by bartonjs
Falco20019 asked this question in Q&A
Discussion options

You must be logged in to vote

At this time we do not expect to migrate the PEM cert+key loading functionality over to X509CertificateLoader.

The new type only handles the two most common cases of the X509Certificate2(bytes) constructor (plain cert, PKCS#12/PFX), to help out those projects that really only ever expected it to be one or the other... then get surprised at runtime when they see the other, and "things happen".

Since the CreateFromPem and CreateFromEncryptedPem functions are already "single-format" (and, even better, single-encoding), they did not get marked as [Obsolete], and while "moving" them to X509CertificateLoader would allow for one kind of tidiness (all the load methods in one place) it would cause…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Falco20019
Comment options

You must be logged in to vote
2 replies
@bartonjs
Comment options

@Falco20019
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants