TROServerSocketOpenSSL

Overview

Location

 

constructor Create    (declared in TROOpenSSL)

Creates a new instance.

constructor Create

constructor Create (TROSocket)  override

constructor Create(aOwner: TROSocket)

Parameters:

  • aOwner:

Accept

Begins an asynchronous operation to accept an incoming connection attempt.

function Accept: Boolean

Assign  override    (declared in TROSocketOpenSSL)

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    (declared in TROSocketOpenSSL)

function Connect: Boolean

DeInit  protected    (declared in TROSocketOpenSSL)

procedure DeInit

DoGetPassword  protected    (declared in TROSocketOpenSSL)

procedure DoGetPassword(var aPassword: string; const IsWrite: Boolean)

Parameters:

  • aPassword:
  • IsWrite:

DoVerifyCert  protected    (declared in TROSocketOpenSSL)

procedure DoVerifyCert(anIssuer: string; aSubject: string; aSerial: Cardinal; ErrorCode: Cardinal; Depth: Cardinal; var Ok: Boolean)

Parameters:

  • anIssuer:
  • aSubject:
  • aSerial:
  • ErrorCode:
  • Depth:
  • Ok:

GetCAContent    (declared in TROSocketOpenSSL)

function GetCAContent: string

GetCAFileName  protected override

function GetCAFileName: string

LastError    (declared in TROOpenSSL)

property LastError: Integer read

LastErrorDesc    (declared in TROOpenSSL)

property LastErrorDesc: string read

LoadCA  protected    (declared in TROSocketOpenSSL)

procedure LoadCA

LoadCertificate  protected    (declared in TROSocketOpenSSL)

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 default [ssoGenerateSelfSignedCertificate, ssoGenerateROCACertificate, ssoReuseSelfCertificate, ssoReuseROCACertificate]

PendingData    (declared in TROSocketOpenSSL)

function PendingData: Boolean

Read    (declared in TROSocketOpenSSL)

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 default 1

Shutdown    (declared in TROSocketOpenSSL)

procedure Shutdown

SNIHost    (declared in TROOpenSSL)

Server Name Identification (server-side only)

property SNIHost: string read write

SSLCheck  protected    (declared in TROSocketOpenSSL)

function SSLCheck: Boolean

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 default 9

VerifyModes    (declared in TROOpenSSL)

Verify mode

property VerifyModes: TOpenSSLVerifyModes read write

WaitingData2    (declared in TROSocketOpenSSL)

function WaitingData2: ssl_size_t

Write    (declared in TROSocketOpenSSL)

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 default [ssoGenerateSelfSignedCertificate, ssoGenerateROCACertificate, ssoReuseSelfCertificate, ssoReuseROCACertificate]

SecurityLevel    (declared in TROOpenSSL)

Security level. valid values: 0..5

property SecurityLevel: Integer read write default 1

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 default 9

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)  override

constructor Create(aOwner: TROSocket)

Parameters:

  • aOwner:

Accept

Begins an asynchronous operation to accept an incoming connection attempt.

function Accept: Boolean

Assign  override    (declared in TROSocketOpenSSL)

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

Connect    (declared in TROSocketOpenSSL)

function Connect: Boolean

DeInit  protected    (declared in TROSocketOpenSSL)

procedure DeInit

DoGetPassword  protected    (declared in TROSocketOpenSSL)

procedure DoGetPassword(var aPassword: string; const IsWrite: Boolean)

Parameters:

  • aPassword:
  • IsWrite:

DoVerifyCert  protected    (declared in TROSocketOpenSSL)

procedure DoVerifyCert(anIssuer: string; aSubject: string; aSerial: Cardinal; ErrorCode: Cardinal; Depth: Cardinal; var Ok: Boolean)

Parameters:

  • anIssuer:
  • aSubject:
  • aSerial:
  • ErrorCode:
  • Depth:
  • Ok:

GetCAContent    (declared in TROSocketOpenSSL)

function GetCAContent: string

GetCAFileName  protected override

function GetCAFileName: string

LoadCA  protected    (declared in TROSocketOpenSSL)

procedure LoadCA

LoadCertificate  protected    (declared in TROSocketOpenSSL)

procedure LoadCertificate

PendingData    (declared in TROSocketOpenSSL)

function PendingData: Boolean

Read    (declared in TROSocketOpenSSL)

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

Parameters:

  • Buf:
  • Size:

Shutdown    (declared in TROSocketOpenSSL)

procedure Shutdown

SSLCheck  protected    (declared in TROSocketOpenSSL)

function SSLCheck: Boolean

WaitingData2    (declared in TROSocketOpenSSL)

function WaitingData2: ssl_size_t

Write    (declared in TROSocketOpenSSL)

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)