Go to the source code of this file.
Defines | |
#define | RANDOM_BYTES 1024 |
Number of random bytes to obtain. | |
#define | URANDOM_DEVICE "/dev/urandom" |
The PRIMARY random device selected for seeding the PRNG. | |
#define | RANDOM_DEVICE "/dev/random" |
If a non-blocking device is not found on the system a blocking entropy producer is tried instead. | |
Functions | |
int | embed_ssl_socket (ssl_connection *ssl, int socket) |
Embeds a socket in a ssl connection. | |
int | update_ssl_cert_data (ssl_connection *ssl) |
Updates some data in the ssl connection. | |
int | check_ssl_md5sum (ssl_connection *ssl, char *md5sum) |
Compare certificate with given md5 sum. | |
ssl_connection * | create_ssl_socket (char *hostname, int port, int protocol) |
Open a socket against hostname:port with the given protocol. | |
int | close_ssl_socket (ssl_connection *ssl) |
Closes a ssl connection (ssl socket + net socket). | |
int | cleanup_ssl_socket (ssl_connection *ssl) |
Garbage collection for non reusabe parts of the ssl connection. | |
int | delete_ssl_socket (ssl_connection *ssl) |
Garbage collection for non-reusable parts a ssl connection. | |
ssl_server_connection * | init_ssl_server (char *pemfile, char *clientpemfile) |
Initializes a ssl connection for server use. | |
ssl_server_connection * | create_ssl_server_socket (char *pemfile, int port, int backlog, char *bindAddr, char *clientpemfile) |
Creates a server socket (SOCK_STREAM type) and binds it to the specified local port number. | |
int | close_ssl_server_socket (ssl_server_connection *ssl_server) |
Closes a ssl server connection (ssl socket + net socket). | |
int | cleanup_ssl_server_socket (ssl_server_connection *ssl_server) |
Garbage collection for a SSL server connection. | |
int | delete_ssl_server_socket (ssl_server_connection *ssl_server) |
Deletes a SSL server connection. | |
ssl_connection * | insert_accepted_ssl_socket (ssl_server_connection *ssl_server) |
Inserts an SSL connection in the connection list of a server. | |
int | close_accepted_ssl_socket (ssl_server_connection *ssl_server, ssl_connection *ssl) |
Closes an accepted SSL server connection and deletes it form the connection list. | |
int | delete_accepted_ssl_socket (ssl_server_connection *ssl_server, ssl_connection *ssl) |
Deletes an accepted SSL server connection from the connection list. | |
int | embed_accepted_ssl_socket (ssl_connection *ssl, int socket) |
Embeds an accepted server socket in an existing ssl connection. | |
ssl_connection * | accept_ssl_socket (ssl_server_connection *ssl_server) |
Do "accept" for a ssl server socket. | |
int | send_ssl_socket (ssl_connection *ssl, void *buffer, int len) |
Send data package though the ssl connection. | |
int | recv_ssl_socket (ssl_connection *ssl, void *buffer, int len) |
Receive data package though the ssl connection. | |
char * | gets_ssl_socket (ssl_connection *ssl, char *buffer, int len) |
Receives a string data package though the ssl connection. | |
int | printf_ssl_socket (ssl_connection *ssl, const char *format,...) |
Sends a formated string though the ssl connection. | |
int | start_ssl () |
Start SSL support library. | |
int | stop_ssl () |
Stop SSL support library. | |
void | config_ssl (int conf_allow_self_cert) |
Configures the ssl engine. | |
ssl_connection * | new_ssl_connection (char *clientpemfile) |
Generate a new ssl connection. | |
ssl_server_connection * | new_ssl_server_connection (char *pemfile, char *clientpemfile) |
Generate a new ssl server connection. | |
int | have_ssl (void) |
Checks if openssl is compiled in. |
Definition in file ssl.c.
|
Number of random bytes to obtain.
|
|
If a non-blocking device is not found on the system a blocking entropy producer is tried instead.
|
|
The PRIMARY random device selected for seeding the PRNG. We use a non-blocking pseudo random device, to generate pseudo entropy. |
|
Do "accept" for a ssl server socket.
Definition at line 1088 of file ssl.c. References ASSERT, close_accepted_ssl_socket(), embed_accepted_ssl_socket(), insert_accepted_ssl_socket(), len, ssl_connection, and ssl_server_connection. |
|
Compare certificate with given md5 sum.
Definition at line 296 of file ssl.c. References ASSERT, and ssl_connection. |
|
Garbage collection for a SSL server connection.
Definition at line 727 of file ssl.c. References close_accepted_ssl_socket(), delete_ssl_socket(), ssl_connection, and ssl_server_connection. Referenced by close_ssl_server_socket(), delete_ssl_server_socket(), and init_ssl_server(). |
|
Garbage collection for non reusabe parts of the ssl connection.
Definition at line 433 of file ssl.c. References ssl_connection. Referenced by close_ssl_socket(), delete_accepted_ssl_socket(), delete_ssl_socket(), and embed_ssl_socket(). |
|
Closes an accepted SSL server connection and deletes it form the connection list.
Definition at line 890 of file ssl.c. References delete_accepted_ssl_socket(), ssl_connection, and ssl_server_connection. Referenced by accept_ssl_socket(), cleanup_ssl_server_socket(), and destroy_wrapper(). |
|
Closes a ssl server connection (ssl socket + net socket).
Definition at line 699 of file ssl.c. References cleanup_ssl_server_socket(), and ssl_server_connection. |
|
Closes a ssl connection (ssl socket + net socket).
Definition at line 387 of file ssl.c. References cleanup_ssl_socket(), and ssl_connection. Referenced by d_check_process(). |
|
Configures the ssl engine.
|
|
Creates a server socket (SOCK_STREAM type) and binds it to the specified local port number. The socket get a ssl layer for data transmission.
Definition at line 645 of file ssl.c. References ASSERT, create_server_socket(), error(), init_ssl_server(), prog, ssl_server_connection, and start_ssl(). |
|
Open a socket against hostname:port with the given protocol. This socket is sent through a ssl connection. The protocol is normaly either SOCK_STREAM or SOCK_DGRAM.
Definition at line 337 of file ssl.c. References ASSERT, create_socket(), embed_ssl_socket(), error(), new_ssl_connection(), prog, ssl_connection, and start_ssl(). |
|
Deletes an accepted SSL server connection from the connection list.
Definition at line 931 of file ssl.c. References cleanup_ssl_socket(), delete_ssl_socket(), END_LOCK, LOCK, ssl_connection, and ssl_server_connection. Referenced by close_accepted_ssl_socket(). |
|
Deletes a SSL server connection.
Definition at line 780 of file ssl.c. References cleanup_ssl_server_socket(), and ssl_server_connection. Referenced by stop_httpd(). |
|
Garbage collection for non-reusable parts a ssl connection.
Definition at line 512 of file ssl.c. References cleanup_ssl_socket(), and ssl_connection. Referenced by cleanup_ssl_server_socket(), d_check_process(), delete_accepted_ssl_socket(), new_ssl_connection(), status(), and status_group(). |
|
Embeds an accepted server socket in an existing ssl connection.
Definition at line 985 of file ssl.c. References ASSERT, error(), prog, set_noblock(), ssl_connection, SSL_TIMEOUT, start_ssl(), and update_ssl_cert_data(). Referenced by accept_ssl_socket(), and start_httpd(). |
|
Embeds a socket in a ssl connection.
Definition at line 161 of file ssl.c. References cleanup_ssl_socket(), error(), prog, set_noblock(), ssl_connection, SSL_TIMEOUT, start_ssl(), and update_ssl_cert_data(). Referenced by create_ssl_socket(), and d_check_process(). |
|
Receives a string data package though the ssl connection.
Definition at line 1232 of file ssl.c. References ASSERT, len, recv_ssl_socket(), and ssl_connection. |
|
Checks if openssl is compiled in.
|
|
Initializes a ssl connection for server use.
Definition at line 548 of file ssl.c. References ASSERT, cleanup_ssl_server_socket(), error(), new_ssl_server_connection(), prog, ssl_server_connection, and start_ssl(). Referenced by create_ssl_server_socket(), and start_httpd(). |
|
Inserts an SSL connection in the connection list of a server.
Definition at line 816 of file ssl.c. References ASSERT, END_LOCK, LOCK, NEW, ssl_connection, ssl_server_connection, start_ssl(), and xstrdup(). Referenced by accept_ssl_socket(), and start_httpd(). |
|
Generate a new ssl connection.
Definition at line 1397 of file ssl.c. References delete_ssl_socket(), error(), NEW, prog, ssl_connection, start_ssl(), and xstrdup(). Referenced by create_ssl_socket(), d_check_process(), status(), and status_group(). |
|
Generate a new ssl server connection.
Definition at line 1498 of file ssl.c. References ASSERT, NEW, ssl_server_connection, start_ssl(), and xstrdup(). Referenced by init_ssl_server(). |
|
Sends a formated string though the ssl connection.
Definition at line 1292 of file ssl.c. References ASSERT, len, send_ssl_socket(), and ssl_connection. |
|
Receive data package though the ssl connection.
Definition at line 1189 of file ssl.c. References ASSERT, error(), len, prog, ssl_connection, and SSL_TIMEOUT. Referenced by gets_ssl_socket(), and port_recv(). |
|
Send data package though the ssl connection.
Definition at line 1144 of file ssl.c. References ASSERT, error(), len, prog, ssl_connection, and SSL_TIMEOUT. Referenced by d_check_process(), port_send(), and printf_ssl_socket(). |
|
Start SSL support library. It has to be run before the SSL support can be used.
Definition at line 1324 of file ssl.c. Referenced by create_ssl_server_socket(), create_ssl_socket(), embed_accepted_ssl_socket(), embed_ssl_socket(), init_ssl_server(), insert_accepted_ssl_socket(), new_ssl_connection(), and new_ssl_server_connection(). |
|
Stop SSL support library.
|
|
Updates some data in the ssl connection.
Definition at line 260 of file ssl.c. References ASSERT, ssl_connection, and xstrdup(). Referenced by embed_accepted_ssl_socket(), and embed_ssl_socket(). |