SSLInterface Class Reference

#include <cryptography_ssl.h>

Detailed Description

This interface maps all OpenSSL functions into a interface.

Static Public Member Functions

static MAXON_METHOD ERR_STATE * ERR_get_state ()
 
static MAXON_METHOD void ERR_clear_error ()
 
static MAXON_METHOD void ADD_thread_state ()
 
static MAXON_METHOD void SSL_load_error_strings ()
 
static MAXON_METHOD int SSL_library_init ()
 
static MAXON_METHOD int OPENSSL_init_ssl ()
 
static MAXON_METHOD SSL_CTX * SSL_CTX_new (const SSL_METHOD *meth)
 
static MAXON_METHOD const SSL_METHOD * TLSv1_method ()
 
static MAXON_METHOD const SSL_METHOD * TLSv1_1_method ()
 
static MAXON_METHOD const SSL_METHOD * TLSv1_2_method ()
 
static MAXON_METHOD const SSL_METHOD * SSLv3_method ()
 
static MAXON_METHOD const SSL_METHOD * SSLv2_method ()
 
static MAXON_METHOD const SSL_METHOD * SSLv23_method ()
 
static MAXON_METHOD const SSL_METHOD * TLS_method ()
 
static MAXON_METHOD SSL * SSL_new (SSL_CTX *ctx)
 
static MAXON_METHOD String ERR_get_error_string ()
 
static MAXON_METHOD unsigned long ERR_get_error ()
 
static MAXON_METHOD unsigned long ERR_peek_last_error ()
 
static MAXON_METHOD int SSL_set_fd (SSL *s, int fd)
 
static MAXON_METHOD int SSL_set_tlsext_hostname (SSL *s, const char *serverName)
 
static MAXON_METHOD int SSL_connect (SSL *ssl)
 
static MAXON_METHOD int SSL_shutdown (SSL *s)
 
static MAXON_METHOD void SSL_free (SSL *ssl)
 
static MAXON_METHOD void SSL_CTX_free (SSL_CTX *ctx)
 
static MAXON_METHOD int SSL_read (SSL *ssl, void *buf, int num)
 
static MAXON_METHOD int SSL_write (SSL *ssl, const void *buf, int num)
 
static MAXON_METHOD long SSL_get_verify_result (const SSL *ssl)
 
static MAXON_METHOD int SSL_CTX_set_cipher_list (SSL_CTX *ctx, const char *str)
 
static MAXON_METHOD int SSL_CTX_load_verify_locations (SSL_CTX *ctx, const char *CAfile, const char *CApath)
 
static MAXON_METHOD int SSL_CTX_set_default_verify_paths (SSL_CTX *ctx)
 
static MAXON_METHOD int SSL_CTX_use_PrivateKey_file (SSL_CTX *ctx, const char *file, int type)
 
static MAXON_METHOD int SSL_CTX_use_certificate_chain_file (SSL_CTX *ctx, const char *file)
 
static MAXON_METHOD long SSL_CTX_ctrl (SSL_CTX *ctx, int cmd, long larg, void *parg)
 
static MAXON_METHOD void SSL_CTX_set_verify (SSL_CTX *ctx, int mode, sslctxsetverifycallback callback)
 
static MAXON_METHOD void SSL_set_connect_state (SSL *s)
 
static MAXON_METHOD void SSL_set_accept_state (SSL *s)
 
static MAXON_METHOD long BIO_ctrl (BIO *bp, int cmd, long larg, void *parg)
 
static MAXON_METHOD BIO * SSL_get_rbio (const SSL *s)
 
static MAXON_METHOD BIO * SSL_get_wbio (const SSL *s)
 
static MAXON_METHOD int SSL_do_handshake (SSL *s)
 
static MAXON_METHOD int SSL_get_error (const SSL *s, int ret_code)
 
static MAXON_METHOD const char * SSL_CIPHER_get_version (const SSL_CIPHER *current)
 
static MAXON_METHOD const SSL_CIPHER * SSL_get_current_cipher (const SSL *s)
 
static MAXON_METHOD void X509_free_ (X509 *a)
 
static MAXON_METHOD X509 * SSL_get_peer_certificate (const SSL *s)
 
static MAXON_METHOD char * X509_NAME_oneline (X509_NAME_ *a, char *buf, int size)
 
static MAXON_METHOD int X509_NAME_get_text_by_NID (X509_NAME_ *name, int nid, char *buf, int len)
 
static MAXON_METHOD X509_NAME_ * X509_get_subject_name (X509 *a)
 
static MAXON_METHOD X509_NAME_ * X509_get_issuer_name (X509 *a)
 
static MAXON_METHOD Result< void > SSL_get_alt_names (X509 *a, BaseArray< String > &alternativeNames)
 
static MAXON_METHOD void SSL_set_read_ahead (SSL *s, int yes)
 
static MAXON_METHOD int SSL_pending (const SSL *s)
 
static MAXON_METHOD int SSL_get_shutdown (const SSL *ssl)
 
static MAXON_METHOD int SSL_CTX_use_PrivateKey_ASN1_RSA (SSL_CTX *ctx, unsigned char *d, long len)
 
static MAXON_METHOD Result< BoolVerifySignature (const Block< const Char > &publicKey, const Block< const Char > &messageHash, const Block< const Char > &message)
 
static MAXON_METHOD Result< void > CreateSignature (const Block< const Char > &privateKey, BaseArray< Char > &messageHash, const Block< const Char > &message)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (SSLInterface, MAXON_REFERENCE_NONE, "net.maxon.interface.ssl")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( SSLInterface  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.interface.ssl"   
)
private

◆ ERR_get_state()

static MAXON_METHOD ERR_STATE* ERR_get_state ( )
static

◆ ERR_clear_error()

static MAXON_METHOD void ERR_clear_error ( )
static

◆ ADD_thread_state()

static MAXON_METHOD void ADD_thread_state ( )
static

◆ SSL_load_error_strings()

static MAXON_METHOD void SSL_load_error_strings ( )
static

◆ SSL_library_init()

static MAXON_METHOD int SSL_library_init ( )
static

◆ OPENSSL_init_ssl()

static MAXON_METHOD int OPENSSL_init_ssl ( )
static

◆ SSL_CTX_new()

static MAXON_METHOD SSL_CTX* SSL_CTX_new ( const SSL_METHOD *  meth)
static

◆ TLSv1_method()

static MAXON_METHOD const SSL_METHOD* TLSv1_method ( )
static

◆ TLSv1_1_method()

static MAXON_METHOD const SSL_METHOD* TLSv1_1_method ( )
static

◆ TLSv1_2_method()

static MAXON_METHOD const SSL_METHOD* TLSv1_2_method ( )
static

◆ SSLv3_method()

static MAXON_METHOD const SSL_METHOD* SSLv3_method ( )
static

◆ SSLv2_method()

static MAXON_METHOD const SSL_METHOD* SSLv2_method ( )
static

◆ SSLv23_method()

static MAXON_METHOD const SSL_METHOD* SSLv23_method ( )
static

◆ TLS_method()

static MAXON_METHOD const SSL_METHOD* TLS_method ( )
static

◆ SSL_new()

static MAXON_METHOD SSL* SSL_new ( SSL_CTX *  ctx)
static

◆ ERR_get_error_string()

static MAXON_METHOD String ERR_get_error_string ( )
static

◆ ERR_get_error()

static MAXON_METHOD unsigned long ERR_get_error ( )
static

◆ ERR_peek_last_error()

static MAXON_METHOD unsigned long ERR_peek_last_error ( )
static

◆ SSL_set_fd()

static MAXON_METHOD int SSL_set_fd ( SSL *  s,
int  fd 
)
static

◆ SSL_set_tlsext_hostname()

static MAXON_METHOD int SSL_set_tlsext_hostname ( SSL *  s,
const char *  serverName 
)
static

◆ SSL_connect()

static MAXON_METHOD int SSL_connect ( SSL *  ssl)
static

◆ SSL_shutdown()

static MAXON_METHOD int SSL_shutdown ( SSL *  s)
static

◆ SSL_free()

static MAXON_METHOD void SSL_free ( SSL *  ssl)
static

◆ SSL_CTX_free()

static MAXON_METHOD void SSL_CTX_free ( SSL_CTX *  ctx)
static

◆ SSL_read()

static MAXON_METHOD int SSL_read ( SSL *  ssl,
void *  buf,
int  num 
)
static

◆ SSL_write()

static MAXON_METHOD int SSL_write ( SSL *  ssl,
const void *  buf,
int  num 
)
static

◆ SSL_get_verify_result()

static MAXON_METHOD long SSL_get_verify_result ( const SSL *  ssl)
static

◆ SSL_CTX_set_cipher_list()

static MAXON_METHOD int SSL_CTX_set_cipher_list ( SSL_CTX *  ctx,
const char *  str 
)
static

◆ SSL_CTX_load_verify_locations()

static MAXON_METHOD int SSL_CTX_load_verify_locations ( SSL_CTX *  ctx,
const char *  CAfile,
const char *  CApath 
)
static

◆ SSL_CTX_set_default_verify_paths()

static MAXON_METHOD int SSL_CTX_set_default_verify_paths ( SSL_CTX *  ctx)
static

◆ SSL_CTX_use_PrivateKey_file()

static MAXON_METHOD int SSL_CTX_use_PrivateKey_file ( SSL_CTX *  ctx,
const char *  file,
int  type 
)
static

◆ SSL_CTX_use_certificate_chain_file()

static MAXON_METHOD int SSL_CTX_use_certificate_chain_file ( SSL_CTX *  ctx,
const char *  file 
)
static

◆ SSL_CTX_ctrl()

static MAXON_METHOD long SSL_CTX_ctrl ( SSL_CTX *  ctx,
int  cmd,
long  larg,
void *  parg 
)
static

◆ SSL_CTX_set_verify()

static MAXON_METHOD void SSL_CTX_set_verify ( SSL_CTX *  ctx,
int  mode,
sslctxsetverifycallback  callback 
)
static

◆ SSL_set_connect_state()

static MAXON_METHOD void SSL_set_connect_state ( SSL *  s)
static

◆ SSL_set_accept_state()

static MAXON_METHOD void SSL_set_accept_state ( SSL *  s)
static

◆ BIO_ctrl()

static MAXON_METHOD long BIO_ctrl ( BIO *  bp,
int  cmd,
long  larg,
void *  parg 
)
static

◆ SSL_get_rbio()

static MAXON_METHOD BIO* SSL_get_rbio ( const SSL *  s)
static

◆ SSL_get_wbio()

static MAXON_METHOD BIO* SSL_get_wbio ( const SSL *  s)
static

◆ SSL_do_handshake()

static MAXON_METHOD int SSL_do_handshake ( SSL *  s)
static

◆ SSL_get_error()

static MAXON_METHOD int SSL_get_error ( const SSL *  s,
int  ret_code 
)
static

◆ SSL_CIPHER_get_version()

static MAXON_METHOD const char* SSL_CIPHER_get_version ( const SSL_CIPHER *  current)
static

◆ SSL_get_current_cipher()

static MAXON_METHOD const SSL_CIPHER* SSL_get_current_cipher ( const SSL *  s)
static

◆ X509_free_()

static MAXON_METHOD void X509_free_ ( X509 *  a)
static

◆ SSL_get_peer_certificate()

static MAXON_METHOD X509* SSL_get_peer_certificate ( const SSL *  s)
static

◆ X509_NAME_oneline()

static MAXON_METHOD char* X509_NAME_oneline ( X509_NAME_ *  a,
char *  buf,
int  size 
)
static

◆ X509_NAME_get_text_by_NID()

static MAXON_METHOD int X509_NAME_get_text_by_NID ( X509_NAME_ *  name,
int  nid,
char *  buf,
int  len 
)
static

◆ X509_get_subject_name()

static MAXON_METHOD X509_NAME_* X509_get_subject_name ( X509 *  a)
static

◆ X509_get_issuer_name()

static MAXON_METHOD X509_NAME_* X509_get_issuer_name ( X509 *  a)
static

◆ SSL_get_alt_names()

static MAXON_METHOD Result<void> SSL_get_alt_names ( X509 *  a,
BaseArray< String > &  alternativeNames 
)
static

◆ SSL_set_read_ahead()

static MAXON_METHOD void SSL_set_read_ahead ( SSL *  s,
int  yes 
)
static

◆ SSL_pending()

static MAXON_METHOD int SSL_pending ( const SSL *  s)
static

◆ SSL_get_shutdown()

static MAXON_METHOD int SSL_get_shutdown ( const SSL *  ssl)
static

◆ SSL_CTX_use_PrivateKey_ASN1_RSA()

static MAXON_METHOD int SSL_CTX_use_PrivateKey_ASN1_RSA ( SSL_CTX *  ctx,
unsigned char *  d,
long  len 
)
static

◆ VerifySignature()

static MAXON_METHOD Result<Bool> VerifySignature ( const Block< const Char > &  publicKey,
const Block< const Char > &  messageHash,
const Block< const Char > &  message 
)
static

◆ CreateSignature()

static MAXON_METHOD Result<void> CreateSignature ( const Block< const Char > &  privateKey,
BaseArray< Char > &  messageHash,
const Block< const Char > &  message 
)
static