C# Класс Goedel.Cryptography.PKIX.TBSCertificate

TBSCertificate
Наследование: Goedel.ASN1.Root
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Extensions List
Issuer List
IssuerUniqueID byte[]
SerialNumber byte[]
Signature Goedel.Cryptography.PKIX.AlgorithmIdentifier
Subject List
SubjectPublicKeyInfo Goedel.Cryptography.PKIX.SubjectPublicKeyInfo
SubjectUniqueID byte[]
Validity Goedel.Cryptography.PKIX.Validity
Version int

Открытые методы

Метод Описание
AddExtension ( Extension Extension ) : void

Add an X.509v3 extension encty

Encode ( Goedel Buffer ) : void

Encode ASN.1 class members to specified buffer. NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.

SetAuthorityKeyIdentifier ( byte ID ) : void

Set the Authority Key Identifier extension

SetBasicConstraints ( bool CA, int PathLength ) : void

Set the basic constraints field

SetExtendedKeyUsage ( List Values ) : void

PKIX extended key uses

SetKeyUsage ( KeyUses KeyUses ) : void

Pack key usage data into the stupidest bit field format in the known universe

SetProfile ( Application Use ) : void

Set the profile for an end entity certificate

SetProfile ( Application Use, int PathLen ) : void

Set the profile for a certificate

SetSubjectAltName ( string Name ) : void

SetSubjectKeyIdentifier ( byte ID ) : void

Set the subject key identifier extension.

SetValidity ( ) : void

Set the default validity interval of 1 year from the present date.

SetValidity ( System.DateTime NotBefore, System.DateTime NotAfter ) : void

Set the validity interval to the specified NotBefore and NotAfter times.

SetValidity ( System.TimeSpan TimeSpan ) : void

Set the validity interval to the present data plus a specified time span. To reduce errors caused by clock skew between machines, the time interval is backdated to one minute after midnight UTC on the day of one hour before the current time.

SetValidity ( int Years ) : void

Set the validity interval in years from the present date. To reduce errors caused by clock skew between machines, the time interval is backdated to one minute after midnight UTC on the day of one hour before the current time.

TBSCertificate ( ) : System

Default constructor.

TBSCertificate ( CryptoProvider SubjectKey, List SubjectName ) : System

Construct from a subject key, subject name and issuer name.

TBSCertificate ( KeyPair SubjectKey, List SubjectName ) : System

Construct from a subject key, subject name and issuer name.

TBSCertificate ( X509Certificate2 X509Cert ) : System

Create a TBSCertificate item from a X509Certificate2 object.

Приватные методы

Метод Описание
Assanine_wankathon ( int data ) : byte[]
Parse ( X509Extension X509Extension ) : Extension
Parse ( X500DistinguishedName DN ) : List

Описание методов

AddExtension() публичный Метод

Add an X.509v3 extension encty
public AddExtension ( Extension Extension ) : void
Extension Extension The extension to add.
Результат void

Encode() публичный Метод

Encode ASN.1 class members to specified buffer. NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
public Encode ( Goedel Buffer ) : void
Buffer Goedel Output buffer
Результат void

SetAuthorityKeyIdentifier() публичный Метод

Set the Authority Key Identifier extension
public SetAuthorityKeyIdentifier ( byte ID ) : void
ID byte
Результат void

SetBasicConstraints() публичный Метод

Set the basic constraints field
public SetBasicConstraints ( bool CA, int PathLength ) : void
CA bool If true, can act as a CA
PathLength int Maximum path length of a chain.
Результат void

SetExtendedKeyUsage() публичный Метод

PKIX extended key uses
public SetExtendedKeyUsage ( List Values ) : void
Values List
Результат void

SetKeyUsage() публичный Метод

Pack key usage data into the stupidest bit field format in the known universe
public SetKeyUsage ( KeyUses KeyUses ) : void
KeyUses KeyUses PKIX Key uses.
Результат void

SetProfile() публичный Метод

Set the profile for an end entity certificate
public SetProfile ( Application Use ) : void
Use Application
Результат void

SetProfile() публичный Метод

Set the profile for a certificate
public SetProfile ( Application Use, int PathLen ) : void
Use Application
PathLen int
Результат void

SetSubjectAltName() публичный Метод

public SetSubjectAltName ( string Name ) : void
Name string
Результат void

SetSubjectKeyIdentifier() публичный Метод

Set the subject key identifier extension.
public SetSubjectKeyIdentifier ( byte ID ) : void
ID byte
Результат void

SetValidity() публичный Метод

Set the default validity interval of 1 year from the present date.
public SetValidity ( ) : void
Результат void

SetValidity() публичный Метод

Set the validity interval to the specified NotBefore and NotAfter times.
public SetValidity ( System.DateTime NotBefore, System.DateTime NotAfter ) : void
NotBefore System.DateTime First time instant that the certificate is valid.
NotAfter System.DateTime Last time instant that the certificate is valid.
Результат void

SetValidity() публичный Метод

Set the validity interval to the present data plus a specified time span. To reduce errors caused by clock skew between machines, the time interval is backdated to one minute after midnight UTC on the day of one hour before the current time.
public SetValidity ( System.TimeSpan TimeSpan ) : void
TimeSpan System.TimeSpan Time interval.
Результат void

SetValidity() публичный Метод

Set the validity interval in years from the present date. To reduce errors caused by clock skew between machines, the time interval is backdated to one minute after midnight UTC on the day of one hour before the current time.
public SetValidity ( int Years ) : void
Years int
Результат void

TBSCertificate() публичный Метод

Default constructor.
public TBSCertificate ( ) : System
Результат System

TBSCertificate() публичный Метод

Construct from a subject key, subject name and issuer name.
public TBSCertificate ( CryptoProvider SubjectKey, List SubjectName ) : System
SubjectKey CryptoProvider Key that the certificate will authenticate.
SubjectName List Subject name.
Результат System

TBSCertificate() публичный Метод

Construct from a subject key, subject name and issuer name.
public TBSCertificate ( KeyPair SubjectKey, List SubjectName ) : System
SubjectKey KeyPair Key that the certificate will authenticate.
SubjectName List Subject name.
Результат System

TBSCertificate() публичный Метод

Create a TBSCertificate item from a X509Certificate2 object.
public TBSCertificate ( X509Certificate2 X509Cert ) : System
X509Cert X509Certificate2
Результат System

Описание свойств

Extensions публичное свойство

ASN.1 member Extensions
public List Extensions
Результат List

Issuer публичное свойство

ASN.1 member Issuer
public List Issuer
Результат List

IssuerUniqueID публичное свойство

ASN.1 member IssuerUniqueID
public byte[] IssuerUniqueID
Результат byte[]

SerialNumber публичное свойство

ASN.1 member SerialNumber
public byte[] SerialNumber
Результат byte[]

Signature публичное свойство

ASN.1 member Signature
public Goedel.Cryptography.PKIX.AlgorithmIdentifier Signature
Результат Goedel.Cryptography.PKIX.AlgorithmIdentifier

Subject публичное свойство

ASN.1 member Subject
public List Subject
Результат List

SubjectPublicKeyInfo публичное свойство

ASN.1 member SubjectPublicKeyInfo
public Goedel.Cryptography.PKIX.SubjectPublicKeyInfo SubjectPublicKeyInfo
Результат Goedel.Cryptography.PKIX.SubjectPublicKeyInfo

SubjectUniqueID публичное свойство

ASN.1 member SubjectUniqueID
public byte[] SubjectUniqueID
Результат byte[]

Validity публичное свойство

ASN.1 member Validity
public Goedel.Cryptography.PKIX.Validity Validity
Результат Goedel.Cryptography.PKIX.Validity

Version публичное свойство

ASN.1 member Version
public int Version
Результат int