TIdSSLContext
Implements a generic client or server SSL context.
TIdSSLContext = class(TObject)
Unit
Description
TIdSSLContext is a class that provides an implementation of a Secure Socket Layer Context. TIdSSLContext is used by
TIdSSLConnectionIntercept descendants and
TIdSSLSocket to allow a client or server SSL
socket to
connect using the desired SSL options and certificates.
File containing the X.509 certificate.
property CertFile: String;
Description
CertFile is a String property that represents the file name that contains the content for the X.509 certificate.
File containing the Key for the X.509 certificate.
property KeyFile: String;
Description
KeyFile is a String property that represents the file name containing the contents for the X.509 certificate Key.
SSL version and method for the X.509 certificate.
Description
Method is a
TIdSSLVersion property that identifies the SSL version number required, and the authentication method used for the X.509 certificate.
Authentication mode for the X.509 certificate.
Description
Mode is a
TIdSSLMode property that identifies the authentication mode for the X.509 certificate.
File for the Root certificate for the X.509 certificate.
property RootCertFile: String;
Description
RootCertFile is a String property that identifies the file containing the content for the Root Certification Authority for the X.509 certificate.
Indicates that the context can use status events.
property StatusInfoOn: Boolean;
Description
StatusInfoOn is a Boolean property that indicates when the SSL context can use the OnStatusInfo event handler for context status notifications.
Maximum number of links for the X.509 certificate.
property VerifyDepth: Integer;
Description
VerifyDepth is an Integer property that represents the maximum number of links permitted when verification is performed for the X.509 certificate.
Verification options for the SSL content.
Description
VerifyMode is a
TIdSSLVerifyModeSet property that represents the Verification options permitted for the SSL contents using the X.509 certificate
Indicates that the context can use authentication events.
property VerifyOn: Boolean;
Description
VerifyOn is a Boolean property that indicates when the SSL context can use the OnVerifyPeer event handler for context authentication actions.
Constructor for the object instance.
Description
Create is the constructor for the object instance. On the Windows platform, Create will attempt to load the OpenSSL support .DLLs. If an error occurs while loading the support .DLLs, an
EIdOSSLCouldNotLoadSSLLibrary exception will be raised.
Create sets Mode to sslmUnassigned.
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees the SSL context, and calls the inherited Destroy method.
Loads the certificate file for the SSL context.
function LoadCert: Boolean;
Return Value
Boolean - True on success.
Description
LoadCert is a Boolean function that loads the certificate file in
CertFile for the SSL context. LoadCert returns True if the certificate file is loaded, or False when the file does not exist or does not contain a valid PEM X.509 certificate.
Loads the key file for the SSL context.
function LoadKey: Boolean;
Return Value
Boolean - True on success.
Description
LoadKey is a Boolean function that loads the X.509 certificate key file for the SSL context. LoadKey returns True if the Key file is loaded for the SSL context, and False if an error occurs while loading the key file or the file does not contain a valid X.509 PEM certificate key.
Loads the root certificate file for the SSL context.
function LoadRootCert: Boolean;
Return Value
Boolean - True on success.
Description
LoadRootCert is a Boolean function that loads the root certificate file in
RootCertFile for the SSL context. LoadRootCert returns True if the root certificate file is loaded, or False when the file does not exist or does not contain a valid PEM X.509 certificate.