TROSocketOpenSSL

Overview

Location

 

constructor Create    (declared in TROOpenSSL)

Creates a new instance.

constructor Create

constructor Create (TROSocket)  reintroduce

Creates a new instance with a supplied value.

constructor Create(aOwner: TROSocket)

Parameters:

  • aOwner:

Accept

function Accept: Boolean

Assign  override

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CADir    (declared in TROOpenSSL)

Default locations for trusted CA certificates

property CADir: string read write

CAFile    (declared in TROOpenSSL)

Default CA certificate file

property CAFile: string read write

CAKeyFile    (declared in TROOpenSSL)

CA private file, is needed for generating self-signed certificate

property CAKeyFile: string read write

CertFile    (declared in TROOpenSSL)

Certificate file that contains cert.pem and key.pem:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----

optionally, it can contain also CAcert.pem and/or rootcert.pem like

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
property CertFile: string read write

Ciphers    (declared in TROOpenSSL)

Simple colon (':') separated list of TLSv1.3 ciphersuite names in order of preference.
When empty, default openssl value is used

property Ciphers: string read write

Connect

function Connect: Boolean

GetCAContent

function GetCAContent: string

LastError    (declared in TROOpenSSL)

property LastError: Integer read

LastErrorDesc    (declared in TROOpenSSL)

property LastErrorDesc: string read

LoadAutoGeneratedCA  protected

procedure LoadAutoGeneratedCA

LoadCA  protected

procedure LoadCA

LoadCertificate  protected

procedure LoadCertificate

OnCertificateGenerating    (declared in TROOpenSSL)

Allow to specify fields for self-signed certificate (server-side only)

property OnCertificateGenerating: TROOpenSSLCertificateGenerating read write
delegate: procedure OnCertificateGenerating(var Subject: string; var Issuer: string; var HashAlgorithm: string; var BitNumber: Word)

OnPassword    (declared in TROOpenSSL)

Allows to specify default password for encrypted PEM file

property OnPassword: TROOpenSSLPassword read write
delegate: procedure OnPassword(Sender: TROOpenSSL; var aPassword: string; const IsWrite: Boolean)

OnVerifyCeft    (declared in TROOpenSSL)

Allows to use custom validation

property OnVerifyCeft: TROOpenSSLVerifyCeft read write
delegate: procedure OnVerifyCeft(anIssuer: string; aSubject: string; aSerial: Cardinal; ErrorCode: Cardinal; Depth: Cardinal; var Ok: Boolean)

Options    (declared in TROOpenSSL)

Options

property Options: TROOpenSSLOptions read write

PendingData

function PendingData: Boolean

Read

function Read(Buf: Pointer; Size: Integer): Integer

Parameters:

  • Buf:
  • Size:

SecurityLevel    (declared in TROOpenSSL)

Security level. valid values: 0..5

property SecurityLevel: Integer read write

Shutdown

procedure Shutdown

SNIHost    (declared in TROOpenSSL)

Server Name Identification (server-side only)

property SNIHost: string read write

SSLEnabled    (declared in TROOpenSSL)

Allows/disallows to use SSL

property SSLEnabled: Boolean read write

SubjectAltName    (declared in TROOpenSSL)

Subject Alt Name (server-side only), comma separated. Can contain DNS:host and/or IP:address

examples: - DNS:localhost - IP:127.0.0.1 - IP:::1 - DNS:localhost,IP:127.0.0.1,IP:::1

property SubjectAltName: string read write

VerifyDepth    (declared in TROOpenSSL)

The maximum depth for the certificate chain verification

property VerifyDepth: Integer read write

VerifyModes    (declared in TROOpenSSL)

Verify mode

property VerifyModes: TOpenSSLVerifyModes read write

WaitingData2

function WaitingData2: ssl_size_t

Write

function Write(Buf: Pointer; Size: Integer): Boolean

Parameters:

  • Buf:
  • Size:

 

CADir    (declared in TROOpenSSL)

Default locations for trusted CA certificates

property CADir: string read write

CAFile    (declared in TROOpenSSL)

Default CA certificate file

property CAFile: string read write

CAKeyFile    (declared in TROOpenSSL)

CA private file, is needed for generating self-signed certificate

property CAKeyFile: string read write

CertFile    (declared in TROOpenSSL)

Certificate file that contains cert.pem and key.pem:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----

optionally, it can contain also CAcert.pem and/or rootcert.pem like

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
property CertFile: string read write

Ciphers    (declared in TROOpenSSL)

Simple colon (':') separated list of TLSv1.3 ciphersuite names in order of preference.
When empty, default openssl value is used

property Ciphers: string read write

LastError    (declared in TROOpenSSL)

property LastError: Integer read

LastErrorDesc    (declared in TROOpenSSL)

property LastErrorDesc: string read

Options    (declared in TROOpenSSL)

Options

property Options: TROOpenSSLOptions read write

SecurityLevel    (declared in TROOpenSSL)

Security level. valid values: 0..5

property SecurityLevel: Integer read write

SNIHost    (declared in TROOpenSSL)

Server Name Identification (server-side only)

property SNIHost: string read write

SSLEnabled    (declared in TROOpenSSL)

Allows/disallows to use SSL

property SSLEnabled: Boolean read write

SubjectAltName    (declared in TROOpenSSL)

Subject Alt Name (server-side only), comma separated. Can contain DNS:host and/or IP:address

examples: - DNS:localhost - IP:127.0.0.1 - IP:::1 - DNS:localhost,IP:127.0.0.1,IP:::1

property SubjectAltName: string read write

VerifyDepth    (declared in TROOpenSSL)

The maximum depth for the certificate chain verification

property VerifyDepth: Integer read write

VerifyModes    (declared in TROOpenSSL)

Verify mode

property VerifyModes: TOpenSSLVerifyModes read write

 

constructor Create    (declared in TROOpenSSL)

Creates a new instance.

constructor Create

constructor Create (TROSocket)  reintroduce

Creates a new instance with a supplied value.

constructor Create(aOwner: TROSocket)

Parameters:

  • aOwner:

Accept

function Accept: Boolean

Assign  override

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

Connect

function Connect: Boolean

GetCAContent

function GetCAContent: string

LoadAutoGeneratedCA  protected

procedure LoadAutoGeneratedCA

LoadCA  protected

procedure LoadCA

LoadCertificate  protected

procedure LoadCertificate

PendingData

function PendingData: Boolean

Read

function Read(Buf: Pointer; Size: Integer): Integer

Parameters:

  • Buf:
  • Size:

Shutdown

procedure Shutdown

WaitingData2

function WaitingData2: ssl_size_t

Write

function Write(Buf: Pointer; Size: Integer): Boolean

Parameters:

  • Buf:
  • Size:

 

OnCertificateGenerating    (declared in TROOpenSSL)

Allow to specify fields for self-signed certificate (server-side only)

property OnCertificateGenerating: TROOpenSSLCertificateGenerating read write
delegate: procedure OnCertificateGenerating(var Subject: string; var Issuer: string; var HashAlgorithm: string; var BitNumber: Word)

OnPassword    (declared in TROOpenSSL)

Allows to specify default password for encrypted PEM file

property OnPassword: TROOpenSSLPassword read write
delegate: procedure OnPassword(Sender: TROOpenSSL; var aPassword: string; const IsWrite: Boolean)

OnVerifyCeft    (declared in TROOpenSSL)

Allows to use custom validation

property OnVerifyCeft: TROOpenSSLVerifyCeft read write
delegate: procedure OnVerifyCeft(anIssuer: string; aSubject: string; aSerial: Cardinal; ErrorCode: Cardinal; Depth: Cardinal; var Ok: Boolean)