#include "nanohttp-error.h"
#include "nanohttp-common.h"
#include "nanohttp-socket.h"
#include "nanohttp-logging.h"
#include "nanohttp-ssl.h"
Go to the source code of this file.
Defines | |
#define | CERT_SUBJECT 1 |
Functions | |
int | verify_sn (X509 *cert, int who, int nid, char *str) |
void | hssl_set_hssl_verify_cert (int func(X509 *cert)) |
void | hssl_set_certificate (const char *filename) |
void | hssl_set_certpass (const char *password) |
void | hssl_set_ca_list (const char *filename) |
void | hssl_enable (void) |
herror_t | hssl_module_init (int argc, char **argv) |
void | hssl_module_destroy (void) |
int | hssl_enabled (void) |
herror_t | hssl_client_ssl (struct hsocket_t *sock) |
herror_t | hssl_server_ssl (struct hsocket_t *sock) |
void | hssl_cleanup (struct hsocket_t *sock) |
herror_t | hssl_read (struct hsocket_t *sock, char *buf, size_t len, size_t *received) |
herror_t | hssl_write (struct hsocket_t *sock, const char *buf, size_t len, size_t *sent) |
Variables | |
int(* | _hssl_verify_cert )(X509 *cert) = _hssl_dummy_verify_cert |
|
Definition at line 87 of file nanohttp-ssl.c. Referenced by verify_sn(). |
|
SSL socket cleanup. Definition at line 547 of file nanohttp-ssl.c. References hsocket_t::ssl. Referenced by hsocket_close(). |
|
SSL client socket initialization.
Definition at line 440 of file nanohttp-ssl.c. References H_OK, herror_new(), HSSL_ERROR_CLIENT, HSSL_ERROR_CONNECT, HSSL_ERROR_CONTEXT, log_error1, log_error2, log_verbose1, hsocket_t::sock, and hsocket_t::ssl. Referenced by hsocket_open(). |
|
Enabled SSL in the nanoHTTP server. You have to call this function before calling httpd_run.
Definition at line 261 of file nanohttp-ssl.c. |
|
Check if SSL is enabled in the nanoHTTP server.
Definition at line 434 of file nanohttp-ssl.c. References hssl_enabled(). Referenced by hssl_enabled(). |
|
Shutdown of the SSL module. Definition at line 408 of file nanohttp-ssl.c. |
|
Initialization of the SSL module
Definition at line 390 of file nanohttp-ssl.c. References log_verbose1. Referenced by hsocket_module_init(). |
|
Read from a SSL socket.
Definition at line 560 of file nanohttp-ssl.c. References H_OK, herror_new(), HSOCKET_ERROR_RECEIVE, hsocket_select_recv(), hsocket_t::sock, and hsocket_t::ssl. Referenced by hsocket_recv(). |
|
SSL server socket initialization.
Definition at line 499 of file nanohttp-ssl.c. References H_OK, herror_new(), HSSL_ERROR_SERVER, log_error1, log_error2, log_verbose2, log_warn1, hsocket_t::sock, and hsocket_t::ssl. Referenced by hsocket_accept(). |
|
Sets the filename for a certification authority list. Definition at line 250 of file nanohttp-ssl.c. |
|
Sets the SSL certificate to be used. Definition at line 228 of file nanohttp-ssl.c. |
|
Sets the password for the SSL certificate.
Definition at line 239 of file nanohttp-ssl.c. |
|
Definition at line 220 of file nanohttp-ssl.c. References _hssl_verify_cert. |
|
Write to a SSL socket.
Definition at line 586 of file nanohttp-ssl.c. References H_OK, herror_new(), HSOCKET_ERROR_SEND, hsocket_t::sock, and hsocket_t::ssl. Referenced by hsocket_send(). |
|
Quick function for verifying a portion of the cert nid is any NID_ defined in <openssl/objects.h> returns non-zero if everything went ok Definition at line 194 of file nanohttp-ssl.c. References CERT_SUBJECT. |
|
Definition at line 107 of file nanohttp-ssl.c. Referenced by hssl_set_hssl_verify_cert(). |