Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EncodeX509BasicConstraints2Extension()

unsafe byte[] Internal.Cryptography.Pal.X509Pal.EncodeX509BasicConstraints2Extension ( bool certificateAuthority,
bool hasPathLengthConstraint,
int pathLengthConstraint )
inline

Implements Internal.Cryptography.Pal.IX509Pal.

Definition at line 53 of file X509Pal.cs.

54 {
55 CERT_BASIC_CONSTRAINTS2_INFO cERT_BASIC_CONSTRAINTS2_INFO = default(CERT_BASIC_CONSTRAINTS2_INFO);
56 cERT_BASIC_CONSTRAINTS2_INFO.fCA = (certificateAuthority ? 1 : 0);
57 cERT_BASIC_CONSTRAINTS2_INFO.fPathLenConstraint = (hasPathLengthConstraint ? 1 : 0);
58 cERT_BASIC_CONSTRAINTS2_INFO.dwPathLenConstraint = pathLengthConstraint;
59 CERT_BASIC_CONSTRAINTS2_INFO cERT_BASIC_CONSTRAINTS2_INFO2 = cERT_BASIC_CONSTRAINTS2_INFO;
60 return global::Interop.crypt32.EncodeObject("2.5.29.19", &cERT_BASIC_CONSTRAINTS2_INFO2);
61 }