Classe TCustomSSL
Unit
blcksock
Declaração
type TCustomSSL = class(TObject)
Descrição
Parent class for all SSL plugins.
This is abstract class defining interface for other SSL plugins.
Instance of this class will be created for each TTCPBlockSocket.
Warning: not all methods and propertis can work in all existing SSL plugins! Please, read documentation of used SSL plugin.
Hierarquia
Visão Geral
Campos
Métodos
Propriedades
Descrição
Campos
 |
FSSLEnabled: Boolean; |
|
 |
FLastError: integer; |
|
 |
FLastErrorDesc: string; |
|
 |
FKeyPassword: string; |
|
 |
FCiphers: string; |
|
 |
FCertificateFile: string; |
|
 |
FPrivateKeyFile: string; |
|
 |
FCertificate: Ansistring; |
|
 |
FPrivateKey: Ansistring; |
|
 |
FPFX: Ansistring; |
|
 |
FPFXfile: string; |
|
 |
FCertCA: Ansistring; |
|
 |
FCertCAFile: string; |
|
 |
FTrustCertificate: Ansistring; |
|
 |
FTrustCertificateFile: string; |
|
 |
FVerifyCert: Boolean; |
|
 |
FUsername: string; |
|
 |
FPassword: string; |
|
 |
FSSHChannelType: string; |
|
 |
FSSHChannelArg1: string; |
|
 |
FSSHChannelArg2: string; |
|
 |
FCertComplianceLevel: integer; |
|
 |
FSNIHost: string; |
|
Métodos
 |
procedure ReturnError; |
|
 |
procedure SetCertCAFile(const Value: string); virtual; |
|
 |
function DoVerifyCert:boolean; |
|
 |
function CreateSelfSignedCert(Host: string): Boolean; virtual; |
|
 |
procedure Assign(const Value: TCustomSSL); virtual; |
Assign settings (certificates and configuration) from another SSL plugin class.
|
 |
function LibVersion: String; virtual; |
return description of used plugin. It usually return name and version of used SSL library.
|
 |
function LibName: String; virtual; |
return name of used plugin.
|
 |
function Connect: boolean; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for start SSL connection.
|
 |
function Accept: boolean; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for acept new SSL connection.
|
 |
function Shutdown: boolean; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for hard shutdown of SSL connection. (for example, before socket is closed)
|
 |
function BiShutdown: boolean; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for soft shutdown of SSL connection. (for example, when you need to continue with unprotected connection.)
|
 |
function SendBuffer(Buffer: TMemory; Len: Integer): Integer; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for sending some datas by SSL connection.
|
 |
function RecvBuffer(Buffer: TMemory; Len: Integer): Integer; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for receiving some datas by SSL connection.
|
 |
function WaitingData: Integer; virtual; |
Do not call this directly. It is used internally by TTCPBlockSocket!
Here is needed code for getting count of datas what waiting for read. If SSL plugin not allows this, then it should return 0.
|
 |
function GetSSLVersion: string; virtual; |
Return string with identificator of SSL/TLS version of existing connection.
|
 |
function GetPeerSubject: string; virtual; |
Return subject of remote SSL peer.
|
 |
function GetPeerSerialNo: integer; virtual; |
Return Serial number if remote X509 certificate.
|
 |
function GetPeerIssuer: string; virtual; |
Return issuer certificate of remote SSL peer.
|
 |
function GetPeerName: string; virtual; |
Return peer name from remote side certificate. This is good for verify, if certificate is generated for remote side IP name.
|
 |
function GetPeerNameHash: cardinal; virtual; |
Returns has of peer name from remote side certificate. This is good for fast remote side authentication.
|
 |
function GetPeerFingerprint: AnsiString; virtual; |
Return fingerprint of remote SSL peer. (As binary nonprintable string!)
|
 |
function GetCertInfo: string; virtual; |
Return all detailed information about certificate from remote side of SSL/TLS connection. Result string can be multilined! Each plugin can return this informations in different format!
|
 |
function GetCipherName: string; virtual; |
Return currently used Cipher.
|
 |
function GetCipherBits: integer; virtual; |
Return currently used number of bits in current Cipher algorythm.
|
 |
function GetCipherAlgBits: integer; virtual; |
Return number of bits in current Cipher algorythm.
|
 |
function GetVerifyCert: integer; virtual; |
Return result value of verify remote side certificate. Look to OpenSSL documentation for possible values. For example 0 is successfuly verified certificate, or 18 is self-signed certificate.
|
Propriedades
 |
property SSLEnabled: Boolean read FSSLEnabled; |
Resurn True if SSL mode is enabled on existing cvonnection.
|
 |
property LastError: integer read FLastError; |
Return error code of last SSL operation. 0 is OK.
|
 |
property LastErrorDesc: string read FLastErrorDesc; |
Return error description of last SSL operation.
|
 |
property SSLType: TSSLType read FSSLType write FSSLType; |
Here you can specify requested SSL/TLS mode. Default is autodetection, but on some servers autodetection not working properly. In this case you must specify requested SSL/TLS mode by your hand!
|
 |
property Username: string read FUsername write FUsername; |
Username for possible credentials.
|
 |
property Password: string read FPassword write FPassword; |
password for possible credentials.
|
 |
property Ciphers: string read FCiphers write FCiphers; |
By this property you can modify default set of SSL/TLS ciphers .
|
 |
property PrivateKeyFile: string read FPrivateKeyFile write FPrivateKeyFile; |
Used for loading private key from disk file. See to plugin documentation if this method is supported and how!
|
 |
property Certificate: Ansistring read FCertificate write FCertificate; |
Used for loading certificate from binary string. See to plugin documentation if this method is supported and how!
|
 |
property PrivateKey: Ansistring read FPrivateKey write FPrivateKey; |
Used for loading private key from binary string. See to plugin documentation if this method is supported and how!
|
 |
property PFX: Ansistring read FPFX write FPFX; |
Used for loading PFX from binary string. See to plugin documentation if this method is supported and how!
|
 |
property PFXfile: string read FPFXfile write FPFXfile; |
Used for loading PFX from disk file. See to plugin documentation if this method is supported and how!
|
 |
property TrustCertificateFile: string read FTrustCertificateFile write FTrustCertificateFile; |
Used for loading trusted certificates from disk file. See to plugin documentation if this method is supported and how!
|
 |
property TrustCertificate: Ansistring read FTrustCertificate write FTrustCertificate; |
Used for loading trusted certificates from binary string. See to plugin documentation if this method is supported and how!
|
 |
property CertCA: Ansistring read FCertCA write FCertCA; |
Used for loading CA certificates from binary string. See to plugin documentation if this method is supported and how!
|
 |
property CertCAFile: string read FCertCAFile write SetCertCAFile; |
Used for loading CA certificates from disk file. See to plugin documentation if this method is supported and how!
|
 |
property VerifyCert: Boolean read FVerifyCert write FVerifyCert; |
If True , then is verified client certificate. (it is good for writing SSL/TLS servers.) When you are not server, but you are client, then if this property is True , verify servers certificate.
|
 |
property SNIHost: string read FSNIHost write FSNIHost; |
Server Name Identification. Host name to send to server. If empty the host name found in URL will be used, which should be the normal use (http Header Host = SNI Host). The value is cleared after the connection is established. (SNI support requires OpenSSL 0.9.8k or later. Cryptlib not supported, yet )
|
Gerado por PasDoc 0.16.0.