Unit mseopenssl

Description

 

Overview

Classes, Interfaces, Objects and Records

Name Description
Record CRYPTO_EX_DATA  

Functions and Procedures

function int2bin(n: cint): cint;
function OPENSSL_malloc(length: clong): pointer;
function OPENSSL_realloc(address: PCharacter; length: clong): pointer;
function OPENSSL_remalloc(var address: pointer; length: clong): pointer;
procedure OPENSSL_free(address: pointer);
function SSL_set_options(ssl: PSSL; options: cint): cint;
procedure initsslinterface;
procedure initializeopenssl(const sonames: array of filenamety; const sonamesutil: array of filenamety);
procedure releaseopenssl;
procedure regopensslinit(const initproc: dynlibprocty);
procedure regopenssldeinit(const deinitproc: dynlibprocty);

Types

sslsize_t = culong;
SslPtr = Pointer;
pSslPtr = ˆSslPtr;
pSSL_CTX = SslPtr;
pSSL = SslPtr;
pSSL_METHOD = SslPtr;
pBIO_METHOD = SslPtr;
pBIO = SslPtr;
pX509 = SslPtr;
ppX509 = ˆpX509;
pX509_NAME = SslPtr;
pEVP_MD = SslPtr;
pEVP_CIPHER = SslPtr;
pEVP_PKEY = SslPtr;
ppEVP_PKEY = ˆpEVP_PKEY;
pX509_REQ = SslPtr;
ppX509_REQ = ˆpX509_REQ;
pX509_CRL = SslPtr;
ppX509_CRL = pX509_CRL;
pPKCS7 = SslPtr;
pASN1_cint = SslPtr;
pSTACK_OFX509 = SslPtr;
pX509_SIG = SslPtr;
pBIGNUM = SslPtr;
pBN_MONT_CTX = SslPtr;
pBN_BLINDING = SslPtr;
pRSA = SslPtr;
ppRSA = ˆpRSA;
pDSA = SslPtr;
ppDSA = ˆpDSA;
pASN1_UTCTIME = SslPtr;
pASN1_INTEGER = SslPtr;
pASN1_ENUMERATED = SslPtr;
pASN1_OCTET_STRING = SslPtr;
pPasswdCb = SslPtr;
pDH = SslPtr;
pBUF_MEM = SslPtr;
pEC_KEY = SslPtr;
pSTACK = SslPtr;
pPKCS7_SIGNER_INFO = SslPtr;
pAES_KEY = SslPtr;
pENGINE = SslPtr;
pRAND_METHOD = SslPtr;
pFunction = procedure; cdecl;
pCharacter = PChar;
TProgressCallbackFunction = procedure(status: cint; progress: cint; data: pointer);
TPWCallbackFunction = function(buffer: pcuchar; length: cint; verify: cint; data: pointer): cint; cdecl;

Constants

openssllib: array[0..4] of filenamety = ( 'libssl.so.1.0.0','libssl.so.0.9.8','libssl.so.0.9.7','libssl.so.0.9.6', 'libssl.so');
opensslutillib: array[0..4] of filenamety = ( 'libcrypto.so.1.0.0','libcrypto.so.0.9.8','libcrypto.so.0.9.7', 'libcrypto.so.0.9.6','libcrypto.so');
SHA_DIGEST_LENGTH = 20;
BN_CTX_NUM = 16;
BN_CTX_NUM_POS = 12;
SSL_CTRL_OPTIONS = 32;
CRYPTO_LOCK = 1;
CRYPTO_UNLOCK = 2;
CRYPTO_READ = 4;
CRYPTO_WRITE = 8;
EVP_MAX_MD_SIZE = 16 + 20;
SSL_ERROR_NONE = 0;
SSL_ERROR_SSL = 1;
SSL_ERROR_WANT_READ = 2;
SSL_ERROR_WANT_WRITE = 3;
SSL_ERROR_WANT_X509_LOOKUP = 4;
SSL_ERROR_SYSCALL = 5;
SSL_ERROR_ZERO_RETURN = 6;
SSL_ERROR_WANT_CONNECT = 7;
SSL_ERROR_WANT_ACCEPT = 8;
SSL_OP_NO_SSLv2 = $01000000;
SSL_OP_NO_SSLv3 = $02000000;
SSL_OP_NO_TLSv1 = $04000000;
SSL_OP_ALL = $000FFFFF;
SSL_VERIFY_NONE = $00;
SSL_VERIFY_PEER = $01;
OPENSSL_DES_DECRYPT = 0;
OPENSSL_DES_ENCRYPT = 1;
SSL_FILETYPE_ASN1 = 2;
SSL_FILETYPE_PEM = 1;
EVP_PKEY_RSA = 6;

Variables

SSL_new: function(ctx: PSSL_CTX):PSSL; cdecl;
SSL_free: procedure(ssl: PSSL); cdecl;
SSL_ctrl: function(ssl: PSSL; cmd: cint; larg: cint; parg: pointer): cint; cdecl;
SSL_get_error: function(s: PSSL; ret_code: cint):cint; cdecl;
SSL_library_init: function():cint; cdecl;
SSL_load_error_strings: procedure; cdecl;
SSL_set_cipher_list: function(arg0: PSSL_CTX; str: PChar):cint; cdecl;
SSL_CTX_set_cipher_list: function(arg0: PSSL_CTX; str: PChar):cint; cdecl;
SSL_CTX_new: function(meth: PSSL_METHOD):PSSL_CTX; cdecl;
SSL_CTX_free: procedure(arg0: PSSL_CTX); cdecl;
SSL_CTX_use_PrivateKey: function(ctx: PSSL_CTX; pkey: SslPtr):cint; cdecl;
SSL_CTX_use_PrivateKey_ASN1: function(pk: cint; ctx: PSSL_CTX; d: pbyte; len: cint):cint; cdecl;
SSL_CTX_use_PrivateKey_file: function(ctx: PSSL_CTX; _file: PChar; _type: cint):cint; cdecl;
SSL_CTX_use_RSAPrivateKey_file: function(ctx: PSSL_CTX; _file: pchar; _type: cint):cint; cdecl;
SSL_CTX_use_certificate: function(ctx: PSSL_CTX; x: SslPtr):cint; cdecl;
SSL_CTX_use_certificate_ASN1: function(ctx: PSSL_CTX; len: cint; d: pbyte):cint; cdecl;
SSL_CTX_use_certificate_file: function(ctx: PSSL_CTX; _file: pchar; _type: cint):cint; cdecl;
SSL_CTX_use_certificate_chain_file: function(ctx: PSSL_CTX; _file: PChar):cint; cdecl;
SSL_CTX_check_private_key: function(ctx: PSSL_CTX):cint; cdecl;
SSL_CTX_set_default_passwd_cb: procedure(ctx: PSSL_CTX; cb: PPasswdCb); cdecl;
SSL_CTX_set_default_passwd_cb_userdata: procedure( ctx: PSSL_CTX; u: SslPtr); cdecl;
SSL_CTX_load_verify_locations: function(ctx: PSSL_CTX; CAfile: pchar; CApath: pchar):cint; cdecl;
SSL_CTX_set_verify: procedure(ctx: PSSL_CTX; mode: cint; arg2: PFunction); cdecl;
SSLv3_method: function():PSSL_METHOD; cdecl;
TLSv1_method: function():PSSL_METHOD; cdecl;
SSLv23_method: function():PSSL_METHOD; cdecl;
SSL_use_certificate_file: function(ssl: PSSL; _file: pchar; _type: cint):cint; cdecl;
SSL_use_PrivateKey_file: function(ssl: PSSL; _file: PChar; _type: cint):cint; cdecl;
SSL_set_fd: function(s: PSSL; fd: cint):cint; cdecl;
SSL_set_rfd: function(s: PSSL; fd: cint):cint; cdecl;
SSL_set_wfd: function(s: PSSL; fd: cint):cint; cdecl;
SSL_accept: function(ssl: PSSL):cint; cdecl;
SSL_connect: function(ssl: PSSL):cint; cdecl;
SSL_shutdown: function(ssl: PSSL):cint; cdecl;
SSL_read: function(ssl: PSSL; buf: SslPtr; num: cint):cint; cdecl;
SSL_peek: function(ssl: PSSL; buf: SslPtr; num: cint):cint; cdecl;
SSL_write: function(ssl: PSSL; buf: SslPtr; num: cint):cint; cdecl;
SSL_pending: function(ssl: PSSL):cint; cdecl;
SSL_get_version: function(ssl: PSSL): pchar; cdecl;
SSL_get_peer_certificate: function(ssl: PSSL): PX509; cdecl;
SSL_get_current_cipher: function(s: PSSL):SslPtr; cdecl;
SSL_CIPHER_get_name: function(c: SslPtr): pchar; cdecl;
SSL_CIPHER_get_bits: function(c: SslPtr; var alg_bits: cint):cint; cdecl;
SSL_get_verify_result: function(ssl: PSSL):cint; cdecl;
SSLeay: function: cardinal; cdecl;
OpenSSL_add_all_ciphers: procedure; cdecl;
OpenSSL_add_all_digests: procedure; cdecl;
ERR_load_crypto_strings: procedure; cdecl;
ERR_peek_error: function: cardinal; cdecl;
ERR_peek_last_error: function: cardinal; cdecl;
CRYPTO_malloc: function(length: clong; const f: PCharacter; line: cint): pointer; cdecl;
CRYPTO_realloc: function(str: PCharacter; length: clong; const f: PCharacter; line: cint): pointer; cdecl;
CRYPTO_remalloc: function(a: pointer; length: clong; const f: PCharacter; line: cint): pointer; cdecl;
CRYPTO_free: procedure(str: pointer); cdecl;
SSLeay_version: function(t: cint): pchar; cdecl;
ERR_error_string_n: procedure(e: cint; buf: PChar; len: cint); cdecl;
ERR_get_error: function(): cint; cdecl;
ERR_clear_error: procedure; cdecl;
ERR_free_strings: procedure; cdecl;
ERR_remove_state: procedure(pid: cint); cdecl;
OPENSSL_add_all_algorithms_noconf: procedure; cdecl;
CRYPTO_cleanup_all_ex_data: procedure; cdecl;
i2d_X509_bio: function(b: PBIO; x: PX509): cint; cdecl;
i2d_PrivateKey_Bio: function(b: PBIO; pkey: pEVP_PKEY): cint; cdecl;
CRYPTO_num_locks: function: cint; cdecl;
CRYPTO_set_locking_callback: procedure(cb: Sslptr); cdecl;
CRYPTO_set_id_callback: procedure(func: pointer); cdecl;
OBJ_obj2nid: function(asn1_object: pointer): cint; cdecl;
OBJ_txt2nid: function(s: PCharacter): cint; cdecl;
OBJ_txt2obj: function(s: PCharacter; no_name: cint): cint; cdecl;
sk_new_null: function: pointer; cdecl;
sk_free: procedure(st: pointer); cdecl;
sk_push: function(st: pointer; val: pointer): cint; cdecl;
sk_num: function(st: pointer): cint; cdecl;
sk_value: function(st: pointer; i: cint): pointer; cdecl;

Description

Functions and Procedures

function int2bin(n: cint): cint;
 
function OPENSSL_malloc(length: clong): pointer;
 
function OPENSSL_realloc(address: PCharacter; length: clong): pointer;
 
function OPENSSL_remalloc(var address: pointer; length: clong): pointer;
 
procedure OPENSSL_free(address: pointer);
 
function SSL_set_options(ssl: PSSL; options: cint): cint;
 
procedure initsslinterface;
 
procedure initializeopenssl(const sonames: array of filenamety; const sonamesutil: array of filenamety);
 
procedure releaseopenssl;
 
procedure regopensslinit(const initproc: dynlibprocty);
 
procedure regopenssldeinit(const deinitproc: dynlibprocty);
 

Types

sslsize_t = culong;
 
SslPtr = Pointer;
 
pSslPtr = ˆSslPtr;
 
pSSL_CTX = SslPtr;
 
pSSL = SslPtr;
 
pSSL_METHOD = SslPtr;
 
pBIO_METHOD = SslPtr;
 
pBIO = SslPtr;
 
pX509 = SslPtr;
 
ppX509 = ˆpX509;
 
pX509_NAME = SslPtr;
 
pEVP_MD = SslPtr;
 
pEVP_CIPHER = SslPtr;
 
pEVP_PKEY = SslPtr;
 
ppEVP_PKEY = ˆpEVP_PKEY;
 
pX509_REQ = SslPtr;
 
ppX509_REQ = ˆpX509_REQ;
 
pX509_CRL = SslPtr;
 
ppX509_CRL = pX509_CRL;
 
pPKCS7 = SslPtr;
 
pASN1_cint = SslPtr;
 
pSTACK_OFX509 = SslPtr;
 
pX509_SIG = SslPtr;
 
pBIGNUM = SslPtr;
 
pBN_MONT_CTX = SslPtr;
 
pBN_BLINDING = SslPtr;
 
pRSA = SslPtr;
 
ppRSA = ˆpRSA;
 
pDSA = SslPtr;
 
ppDSA = ˆpDSA;
 
pASN1_UTCTIME = SslPtr;
 
pASN1_INTEGER = SslPtr;
 
pASN1_ENUMERATED = SslPtr;
 
pASN1_OCTET_STRING = SslPtr;
 
pPasswdCb = SslPtr;
 
pDH = SslPtr;
 
pBUF_MEM = SslPtr;
 
pEC_KEY = SslPtr;
 
pSTACK = SslPtr;
 
pPKCS7_SIGNER_INFO = SslPtr;
 
pAES_KEY = SslPtr;
 
pENGINE = SslPtr;
 
pRAND_METHOD = SslPtr;
 
pFunction = procedure; cdecl;
 
pCharacter = PChar;
 
TProgressCallbackFunction = procedure(status: cint; progress: cint; data: pointer);
 
TPWCallbackFunction = function(buffer: pcuchar; length: cint; verify: cint; data: pointer): cint; cdecl;
 

Constants

openssllib: array[0..4] of filenamety = ( 'libssl.so.1.0.0','libssl.so.0.9.8','libssl.so.0.9.7','libssl.so.0.9.6', 'libssl.so');
 
opensslutillib: array[0..4] of filenamety = ( 'libcrypto.so.1.0.0','libcrypto.so.0.9.8','libcrypto.so.0.9.7', 'libcrypto.so.0.9.6','libcrypto.so');
 
SHA_DIGEST_LENGTH = 20;
 
BN_CTX_NUM = 16;
 
BN_CTX_NUM_POS = 12;
 
SSL_CTRL_OPTIONS = 32;
 
CRYPTO_LOCK = 1;
 
CRYPTO_UNLOCK = 2;
 
CRYPTO_READ = 4;
 
CRYPTO_WRITE = 8;
 
EVP_MAX_MD_SIZE = 16 + 20;
 
SSL_ERROR_NONE = 0;
 
SSL_ERROR_SSL = 1;
 
SSL_ERROR_WANT_READ = 2;
 
SSL_ERROR_WANT_WRITE = 3;
 
SSL_ERROR_WANT_X509_LOOKUP = 4;
 
SSL_ERROR_SYSCALL = 5;
 
SSL_ERROR_ZERO_RETURN = 6;
 
SSL_ERROR_WANT_CONNECT = 7;
 
SSL_ERROR_WANT_ACCEPT = 8;
 
SSL_OP_NO_SSLv2 = $01000000;
 
SSL_OP_NO_SSLv3 = $02000000;
 
SSL_OP_NO_TLSv1 = $04000000;
 
SSL_OP_ALL = $000FFFFF;
 
SSL_VERIFY_NONE = $00;
 
SSL_VERIFY_PEER = $01;
 
OPENSSL_DES_DECRYPT = 0;
 
OPENSSL_DES_ENCRYPT = 1;
 
SSL_FILETYPE_ASN1 = 2;
 
SSL_FILETYPE_PEM = 1;
 
EVP_PKEY_RSA = 6;
 

Variables

SSL_new: function(ctx: PSSL_CTX):PSSL; cdecl;
 
SSL_free: procedure(ssl: PSSL); cdecl;
 
SSL_ctrl: function(ssl: PSSL; cmd: cint; larg: cint; parg: pointer): cint; cdecl;
 
SSL_get_error: function(s: PSSL; ret_code: cint):cint; cdecl;
 
SSL_library_init: function():cint; cdecl;
 
SSL_load_error_strings: procedure; cdecl;
 
SSL_set_cipher_list: function(arg0: PSSL_CTX; str: PChar):cint; cdecl;
 
SSL_CTX_set_cipher_list: function(arg0: PSSL_CTX; str: PChar):cint; cdecl;
 
SSL_CTX_new: function(meth: PSSL_METHOD):PSSL_CTX; cdecl;
 
SSL_CTX_free: procedure(arg0: PSSL_CTX); cdecl;
 
SSL_CTX_use_PrivateKey: function(ctx: PSSL_CTX; pkey: SslPtr):cint; cdecl;
 
SSL_CTX_use_PrivateKey_ASN1: function(pk: cint; ctx: PSSL_CTX; d: pbyte; len: cint):cint; cdecl;
 
SSL_CTX_use_PrivateKey_file: function(ctx: PSSL_CTX; _file: PChar; _type: cint):cint; cdecl;
 
SSL_CTX_use_RSAPrivateKey_file: function(ctx: PSSL_CTX; _file: pchar; _type: cint):cint; cdecl;
 
SSL_CTX_use_certificate: function(ctx: PSSL_CTX; x: SslPtr):cint; cdecl;
 
SSL_CTX_use_certificate_ASN1: function(ctx: PSSL_CTX; len: cint; d: pbyte):cint; cdecl;
 
SSL_CTX_use_certificate_file: function(ctx: PSSL_CTX; _file: pchar; _type: cint):cint; cdecl;
 
SSL_CTX_use_certificate_chain_file: function(ctx: PSSL_CTX; _file: PChar):cint; cdecl;
 
SSL_CTX_check_private_key: function(ctx: PSSL_CTX):cint; cdecl;
 
SSL_CTX_set_default_passwd_cb: procedure(ctx: PSSL_CTX; cb: PPasswdCb); cdecl;
 
SSL_CTX_set_default_passwd_cb_userdata: procedure( ctx: PSSL_CTX; u: SslPtr); cdecl;
 
SSL_CTX_load_verify_locations: function(ctx: PSSL_CTX; CAfile: pchar; CApath: pchar):cint; cdecl;
 
SSL_CTX_set_verify: procedure(ctx: PSSL_CTX; mode: cint; arg2: PFunction); cdecl;
 
SSLv3_method: function():PSSL_METHOD; cdecl;
 
TLSv1_method: function():PSSL_METHOD; cdecl;
 
SSLv23_method: function():PSSL_METHOD; cdecl;
 
SSL_use_certificate_file: function(ssl: PSSL; _file: pchar; _type: cint):cint; cdecl;
 
SSL_use_PrivateKey_file: function(ssl: PSSL; _file: PChar; _type: cint):cint; cdecl;
 
SSL_set_fd: function(s: PSSL; fd: cint):cint; cdecl;
 
SSL_set_rfd: function(s: PSSL; fd: cint):cint; cdecl;
 
SSL_set_wfd: function(s: PSSL; fd: cint):cint; cdecl;
 
SSL_accept: function(ssl: PSSL):cint; cdecl;
 
SSL_connect: function(ssl: PSSL):cint; cdecl;
 
SSL_shutdown: function(ssl: PSSL):cint; cdecl;
 
SSL_read: function(ssl: PSSL; buf: SslPtr; num: cint):cint; cdecl;
 
SSL_peek: function(ssl: PSSL; buf: SslPtr; num: cint):cint; cdecl;
 
SSL_write: function(ssl: PSSL; buf: SslPtr; num: cint):cint; cdecl;
 
SSL_pending: function(ssl: PSSL):cint; cdecl;
 
SSL_get_version: function(ssl: PSSL): pchar; cdecl;
 
SSL_get_peer_certificate: function(ssl: PSSL): PX509; cdecl;
 
SSL_get_current_cipher: function(s: PSSL):SslPtr; cdecl;
 
SSL_CIPHER_get_name: function(c: SslPtr): pchar; cdecl;
 
SSL_CIPHER_get_bits: function(c: SslPtr; var alg_bits: cint):cint; cdecl;
 
SSL_get_verify_result: function(ssl: PSSL):cint; cdecl;
 
SSLeay: function: cardinal; cdecl;
 
OpenSSL_add_all_ciphers: procedure; cdecl;
 
OpenSSL_add_all_digests: procedure; cdecl;
 
ERR_load_crypto_strings: procedure; cdecl;
 
ERR_peek_error: function: cardinal; cdecl;
 
ERR_peek_last_error: function: cardinal; cdecl;
 
CRYPTO_malloc: function(length: clong; const f: PCharacter; line: cint): pointer; cdecl;
 
CRYPTO_realloc: function(str: PCharacter; length: clong; const f: PCharacter; line: cint): pointer; cdecl;
 
CRYPTO_remalloc: function(a: pointer; length: clong; const f: PCharacter; line: cint): pointer; cdecl;
 
CRYPTO_free: procedure(str: pointer); cdecl;
 
SSLeay_version: function(t: cint): pchar; cdecl;
 
ERR_error_string_n: procedure(e: cint; buf: PChar; len: cint); cdecl;
 
ERR_get_error: function(): cint; cdecl;
 
ERR_clear_error: procedure; cdecl;
 
ERR_free_strings: procedure; cdecl;
 
ERR_remove_state: procedure(pid: cint); cdecl;
 
OPENSSL_add_all_algorithms_noconf: procedure; cdecl;
 
CRYPTO_cleanup_all_ex_data: procedure; cdecl;
 
i2d_X509_bio: function(b: PBIO; x: PX509): cint; cdecl;
 
i2d_PrivateKey_Bio: function(b: PBIO; pkey: pEVP_PKEY): cint; cdecl;
 
CRYPTO_num_locks: function: cint; cdecl;
 
CRYPTO_set_locking_callback: procedure(cb: Sslptr); cdecl;
 
CRYPTO_set_id_callback: procedure(func: pointer); cdecl;
 
OBJ_obj2nid: function(asn1_object: pointer): cint; cdecl;
 
OBJ_txt2nid: function(s: PCharacter): cint; cdecl;
 
OBJ_txt2obj: function(s: PCharacter; no_name: cint): cint; cdecl;
 
sk_new_null: function: pointer; cdecl;
 
sk_free: procedure(st: pointer); cdecl;
 
sk_push: function(st: pointer; val: pointer): cint; cdecl;
 
sk_num: function(st: pointer): cint; cdecl;
 
sk_value: function(st: pointer; i: cint): pointer; cdecl;
 

Generated by PasDoc 0.16.0.