2018-03-07 00:52:44 +08:00
|
|
|
/**
|
|
|
|
|
* OpenSSL.h
|
|
|
|
|
*
|
|
|
|
|
* Header file in which we list all openssl functions in our own namespace
|
|
|
|
|
* that we call instead of the actual openssl functions. This allows us to
|
|
|
|
|
* intercept the calls and forward them to a dynamically loaded namespace
|
|
|
|
|
*
|
|
|
|
|
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
|
|
|
|
|
* @copyright 2018 Copernica BV
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Include guard
|
|
|
|
|
*/
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Dependencies
|
|
|
|
|
*/
|
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Begin of namespace
|
|
|
|
|
*/
|
2018-03-07 01:07:34 +08:00
|
|
|
namespace AMQP { namespace OpenSSL {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Function to check if openssl is loaded
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
bool valid();
|
|
|
|
|
|
2018-03-07 00:52:44 +08:00
|
|
|
/**
|
2018-03-07 01:07:34 +08:00
|
|
|
* List of all wrapper methods that are in use inside AMQP-CPP
|
2018-03-07 00:52:44 +08:00
|
|
|
*/
|
2018-03-07 05:03:53 +08:00
|
|
|
const SSL_METHOD *TLS_client_method();
|
2018-03-07 00:52:44 +08:00
|
|
|
SSL_CTX *SSL_CTX_new(const SSL_METHOD *method);
|
|
|
|
|
SSL *SSL_new(SSL_CTX *ctx);
|
|
|
|
|
int SSL_do_handshake(SSL *ssl);
|
|
|
|
|
int SSL_read(SSL *ssl, void *buf, int num);
|
|
|
|
|
int SSL_write(SSL *ssl, const void *buf, int num);
|
|
|
|
|
int SSL_shutdown(SSL *ssl);
|
|
|
|
|
int SSL_set_fd(SSL *ssl, int fd);
|
|
|
|
|
int SSL_get_error(const SSL *ssl, int ret);
|
|
|
|
|
int SSL_up_ref(SSL *ssl);
|
|
|
|
|
void SSL_set_connect_state(SSL *ssl);
|
2018-03-07 05:03:53 +08:00
|
|
|
void SSL_CTX_free(SSL_CTX *ctx);
|
2018-03-07 00:52:44 +08:00
|
|
|
void SSL_free(SSL *ssl);
|
2018-03-07 05:03:53 +08:00
|
|
|
long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg);
|
2018-03-07 00:52:44 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* End of namespace
|
|
|
|
|
*/
|
|
|
|
|
}}
|
|
|
|
|
|