TX509Certificate

From Ultibo.org
Revision as of 04:38, 6 June 2018 by Ultibo (Talk | contribs) (Created page with "Return to Unit X.509 __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collap...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit X.509


Description


To be documented

Class definitions



TX509Certificate = class(TObject)

protected
FList:TX509CertificateList;  
FChain:TX509CertificateChain;  
 
FParent:TX509Certificate;  
FChild:TX509Certificate;  
 
FData:PByte; Copy of certificate data from import
FSize:LongWord; Total size of certificate data
 
FTBSData:PByte; Pointer to start of TBS (To Be Signed) data
FTBSSize:LongWord; Length of TBS (To Be Signed) data
 
function ImportTime(ABuffer:PByte; ASize:Integer; ATag:LongWord ADateTime:TDateTime):Boolean;  
 
function ImportName(ABuffer:PByte; ASize:Integer; AName:TX509Name; var ANext:PByte):Boolean;  
function ImportExtensionAltName(ABuffer:PByte; ASize:Integer; AName:TX509Name):Boolean;  
 
function ImportAlgorithmIdentifier(ABuffer:PByte; ASize:Integer; var AIdentifier:TX509AlgorithmIdentifier; var ANext:PByte):Boolean;  
 
function ImportValidity(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;  
 
function ImportPublicKey(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;  
 
function ImportExtension(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;  
function ImportExtensionData(ABuffer:PByte; ASize:Integer; const AOID:TASN1OID):Boolean;  
function ImportExtensionKeyUsage(ABuffer:PByte; ASize:Integer):Boolean;  
function ImportExtensionSubjectAltName(ABuffer:PByte; ASize:Integer):Boolean;  
function ImportExtensionIssuerAltName(ABuffer:PByte; ASize:Integer):Boolean;  
function ImportExtensionBasicContraints(ABuffer:PByte; ASize:Integer):Boolean;  
function ImportExtensionExtKeyUsage(ABuffer:PByte; ASize:Integer):Boolean;  
 
function ImportExtensions(ABuffer:PByte; ASize:Integer):Boolean;  
 
function ImportTBSCertificate(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;  
 
function VerifyRSASignature(AIssuer:TX509Certificate):Boolean;  
 
function VerifyMD5Digest(ABuffer:PByte; ASize:Integer):Boolean;  
function VerifySHA1Digest(ABuffer:PByte; ASize:Integer):Boolean;  
function VerifySHA256Digest(ABuffer:PByte; ASize:Integer):Boolean;  
function VerifySHA384Digest(ABuffer:PByte; ASize:Integer):Boolean;  
function VerifySHA512Digest(ABuffer:PByte; ASize:Integer):Boolean;  
public
Properties
Version:LongWord;  
SerialNumber:TX509SerialNumber;  
SignatureAlgorithm:TX509AlgorithmIdentifier;  
 
Issuer:TX509Name;  
Subject:TX509Name;  
SubjectDN:String;  
 
NotBefore:TDateTime;  
NotAfter:TDateTime;  
 
PublicKey:TX509PublicKey;  
 
Signature:TX509Signature;  
Extensions
ExtensionsPresent:LongWord;  
 
CA:Boolean;  
PathLenConstraint:LongWord;  
 
KeyUsage:LongWord;  
ExtendedKeyUsage:LongWord;  
 
property List:TX509CertificateList read FList;  
property Chain:TX509CertificateChain read FChain;  
property Parent:TX509Certificate read FParent;  
property Child:TX509Certificate read FChild;  
 
constructor Create(AChain:TX509CertificateChain; AParent:TX509Certificate); virtual;  
destructor Destroy; override;  
 
function ImportDER(ABuffer:Pointer; ASize:Integer):Boolean; virtual;  
function ImportPEM(ABuffer:Pointer; var ASize:Integer):Boolean; virtual;  
 
function ExportDER(ABuffer:Pointer; var ASize:Integer):Boolean; virtual;  
function ExportPEM(ABuffer:Pointer; var ASize:Integer):Boolean; virtual;  
 
function IsValidIssuer:Boolean; virtual;  
function IsSelfSigned:Boolean; virtual;  
 
function VerifySignature(AIssuer:TX509Certificate):Boolean; virtual;  
function ValidateCertificate(AIssuer:TX509Certificate):Integer; virtual;  


Function declarations



function TX509Certificate.ImportTime(ABuffer:PByte; ASize:Integer; ATag:LongWord; var ADateTime:TDateTime):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportName(ABuffer:PByte; ASize:Integer; AName:TX509Name; var ANext:PByte):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionAltName(ABuffer:PByte; ASize:Integer; AName:TX509Name):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportAlgorithmIdentifier(ABuffer:PByte; ASize:Integer; var AIdentifier:TX509AlgorithmIdentifier; var ANext:PByte):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportValidity(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportPublicKey(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtension(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionData(ABuffer:PByte; ASize:Integer; const AOID:TASN1OID):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionKeyUsage(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionSubjectAltName(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionIssuerAltName(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionBasicContraints(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensionExtKeyUsage(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportExtensions(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportTBSCertificate(ABuffer:PByte; ASize:Integer; var ANext:PByte):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifyRSASignature(AIssuer:TX509Certificate):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifyMD5Digest(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifySHA1Digest(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifySHA256Digest(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifySHA384Digest(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifySHA512Digest(ABuffer:PByte; ASize:Integer):Boolean;
Description: To be documented
Note None documented


constructor TX509Certificate.Create(AChain:TX509CertificateChain; AParent:TX509Certificate);
Description: To be documented
Note None documented


destructor TX509Certificate.Destroy;
Description: To be documented
Note None documented


function TX509Certificate.ImportDER(ABuffer:Pointer; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ImportPEM(ABuffer:Pointer; var ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ExportDER(ABuffer:Pointer; var ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.ExportPEM(ABuffer:Pointer; var ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TX509Certificate.IsValidIssuer:Boolean;
Description: To be documented
Note None documented


function TX509Certificate.IsSelfSigned:Boolean;
Description: To be documented
Note None documented


function TX509Certificate.VerifySignature(AIssuer:TX509Certificate):Boolean;
Description: Validate the certificate signature
Issuer The issuing certificate (will be same as parent except for the root)


function TX509Certificate.ValidateCertificate(AIssuer:TX509Certificate):Integer;
Description: Validate a certificate for expiry, extensions, issuer and signature
Issuer The issuing certificate (will be same as parent except for the root)


Return to Unit Reference