C# Class Internal.Cryptography.Pal.OpenSslX509Encoder

Inheritance: IX509Pal
Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
DecodePublicKey ( Oid oid, byte encodedKeyValue, byte encodedParameters, ICertificatePal certificatePal ) : AsymmetricAlgorithm
DecodeX509BasicConstraints2Extension ( byte encoded, bool &certificateAuthority, bool &hasPathLengthConstraint, int &pathLengthConstraint ) : void
DecodeX509BasicConstraintsExtension ( byte encoded, bool &certificateAuthority, bool &hasPathLengthConstraint, int &pathLengthConstraint ) : void
DecodeX509EnhancedKeyUsageExtension ( byte encoded, OidCollection &usages ) : void
DecodeX509KeyUsageExtension ( byte encoded, X509KeyUsageFlags &keyUsages ) : void
DecodeX509SubjectKeyIdentifierExtension ( byte encoded, byte &subjectKeyIdentifier ) : void
EncodeX509BasicConstraints2Extension ( bool certificateAuthority, bool hasPathLengthConstraint, int pathLengthConstraint ) : byte[]
EncodeX509EnhancedKeyUsageExtension ( OidCollection usages ) : byte[]
EncodeX509KeyUsageExtension ( X509KeyUsageFlags keyUsages ) : byte[]
EncodeX509SubjectKeyIdentifierExtension ( byte subjectKeyIdentifier ) : byte[]
GetCertContentType ( byte rawData ) : X509ContentType
GetCertContentType ( string fileName ) : X509ContentType
X500DistinguishedNameDecode ( byte encodedDistinguishedName, X500DistinguishedNameFlags flags ) : string
X500DistinguishedNameEncode ( string distinguishedName, X500DistinguishedNameFlags flag ) : byte[]
X500DistinguishedNameFormat ( byte encodedDistinguishedName, bool multiLine ) : string

Private Methods

Method Description
BuildRsaPublicKey ( byte encodedData ) : RSA
ComputeCapiSha1OfPublicKey ( PublicKey key ) : byte[]
ConcatenateArrays ( byte segments ) : byte[]
DecodeX509SubjectKeyIdentifierExtension ( byte encoded ) : byte[]

Method Details

DecodePublicKey() public method

public DecodePublicKey ( Oid oid, byte encodedKeyValue, byte encodedParameters, ICertificatePal certificatePal ) : AsymmetricAlgorithm
oid System.Security.Cryptography.Oid
encodedKeyValue byte
encodedParameters byte
certificatePal ICertificatePal
return System.Security.Cryptography.AsymmetricAlgorithm

DecodeX509BasicConstraints2Extension() public method

public DecodeX509BasicConstraints2Extension ( byte encoded, bool &certificateAuthority, bool &hasPathLengthConstraint, int &pathLengthConstraint ) : void
encoded byte
certificateAuthority bool
hasPathLengthConstraint bool
pathLengthConstraint int
return void

DecodeX509BasicConstraintsExtension() public method

public DecodeX509BasicConstraintsExtension ( byte encoded, bool &certificateAuthority, bool &hasPathLengthConstraint, int &pathLengthConstraint ) : void
encoded byte
certificateAuthority bool
hasPathLengthConstraint bool
pathLengthConstraint int
return void

DecodeX509EnhancedKeyUsageExtension() public method

public DecodeX509EnhancedKeyUsageExtension ( byte encoded, OidCollection &usages ) : void
encoded byte
usages System.Security.Cryptography.OidCollection
return void

DecodeX509KeyUsageExtension() public method

public DecodeX509KeyUsageExtension ( byte encoded, X509KeyUsageFlags &keyUsages ) : void
encoded byte
keyUsages X509KeyUsageFlags
return void

DecodeX509SubjectKeyIdentifierExtension() public method

public DecodeX509SubjectKeyIdentifierExtension ( byte encoded, byte &subjectKeyIdentifier ) : void
encoded byte
subjectKeyIdentifier byte
return void

EncodeX509BasicConstraints2Extension() public method

public EncodeX509BasicConstraints2Extension ( bool certificateAuthority, bool hasPathLengthConstraint, int pathLengthConstraint ) : byte[]
certificateAuthority bool
hasPathLengthConstraint bool
pathLengthConstraint int
return byte[]

EncodeX509EnhancedKeyUsageExtension() public method

public EncodeX509EnhancedKeyUsageExtension ( OidCollection usages ) : byte[]
usages System.Security.Cryptography.OidCollection
return byte[]

EncodeX509KeyUsageExtension() public method

public EncodeX509KeyUsageExtension ( X509KeyUsageFlags keyUsages ) : byte[]
keyUsages X509KeyUsageFlags
return byte[]

EncodeX509SubjectKeyIdentifierExtension() public method

public EncodeX509SubjectKeyIdentifierExtension ( byte subjectKeyIdentifier ) : byte[]
subjectKeyIdentifier byte
return byte[]

GetCertContentType() public method

public GetCertContentType ( byte rawData ) : X509ContentType
rawData byte
return X509ContentType

GetCertContentType() public method

public GetCertContentType ( string fileName ) : X509ContentType
fileName string
return X509ContentType

X500DistinguishedNameDecode() public method

public X500DistinguishedNameDecode ( byte encodedDistinguishedName, X500DistinguishedNameFlags flags ) : string
encodedDistinguishedName byte
flags X500DistinguishedNameFlags
return string

X500DistinguishedNameEncode() public method

public X500DistinguishedNameEncode ( string distinguishedName, X500DistinguishedNameFlags flag ) : byte[]
distinguishedName string
flag X500DistinguishedNameFlags
return byte[]

X500DistinguishedNameFormat() public method

public X500DistinguishedNameFormat ( byte encodedDistinguishedName, bool multiLine ) : string
encodedDistinguishedName byte
multiLine bool
return string