AMQP-CPP/src/linux_tcp/openssl.h

63 lines
1.6 KiB
C
Raw Normal View History

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>
#include <openssl/err.h>
2018-03-07 00:52:44 +08:00
/**
* 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);
2018-03-09 20:55:49 +08:00
int SSL_pending(const SSL *ssl);
2018-03-07 00:52:44 +08:00
int SSL_set_fd(SSL *ssl, int fd);
int SSL_get_shutdown(const SSL *ssl);
2018-03-07 00:52:44 +08:00
int SSL_get_error(const SSL *ssl, int ret);
int SSL_use_certificate_file(SSL *ssl, const char *file, int type);
2018-03-07 00:52:44 +08:00
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);
2019-01-08 19:58:38 +08:00
long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
void ERR_clear_error(void);
2021-07-13 19:12:32 +08:00
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u);
2018-03-07 00:52:44 +08:00
/**
* End of namespace
*/
}}