Skip to content

Commit 50420aa

Browse files
committed
Address feedback
1 parent 648af63 commit 50420aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libraries/System.Security.Cryptography/docs/X509CertificateLoader.SecurityDesign.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ Callers implementing a protocol or file format where the trailing data is unacce
4242

4343
Each file format uses the binary encoding most appropriate to that format.
4444
For example, ITU-T X.509 and IETF RFC 3280 both indicate that the `Certificate` data type must always use the ASN.1 Distinguished Encoding Rules (DER) restrictions; therefore `LoadCertificate` requires a DER encoding.
45-
Alternatively, IETF RFC 7292 describes PKCS#12 PFX as being in the relaxed Basic Encoding Rules (BER) form, so `LoadPkcs12` only requires BER.
45+
Alternatively, IETF RFC 7292 describes PKCS#12 PFX as being in the relaxed Basic Encoding Rules (BER) form, so `LoadPkcs12` only requires BER (whenever a nested structure within the PKCS#12 PFX requires a DER encoding, the DER encoding will be used).
4646

4747
Callers implementing a protocol or file format where either Canonical Encoding Rules (CER) or DER are required where the format is specified only as BER will need to perform their own restricted-encoding validation.
4848

4949
### Textual Encoding
5050

5151
For each file format that has a textual encoding, once `X509CertificateLoader` has moved into loading the textual form it does so by treating the input as ASCII and finding the first validly encoded PEM envelope with a label appropriate to the data type.
52+
A PEM envelope's validity is determined by the IETF RFC 7468 "lax" profile, which does not permit attributes.
5253

5354
So, `LoadCertificate` will skip over the PKCS7 content and only try loading the CERTIFICATE content in a payload like
5455

0 commit comments

Comments
 (0)