![]() |
SCTC
the soundcloud.com terminal client
|
#include "../_hard_config.h"#include "polarssl/oid.h"#include "polarssl/net.h"#include "polarssl/debug.h"#include "polarssl/ssl.h"#include "polarssl/entropy.h"#include "polarssl/ctr_drbg.h"#include "polarssl/error.h"#include "polarssl/certs.h"#include "../log.h"#include "../helper.h"#include "tls.h"#include "network.h"Data Structures | |
| struct | tls_conn |
Macros | |
| #define | TLS_CONN_MAGIC 0x42434445 |
| Magic used to validate the type of network_conn. More... | |
| #define | SHA512_LEN 64 |
Functions | |
| bool | tls_send (struct network_conn *nwc, char *buffer, size_t buffer_len) |
| bool | tls_send_fmt (struct network_conn *nwc, char *fmt,...) |
| int | tls_recv (struct network_conn *nwc, char *buffer, size_t buffer_len) |
| int | tls_recv_byte (struct network_conn *nwc) |
| void | tls_disconnect (struct network_conn *nwc) |
| bool | tls_init () |
| Global initialization of TLS. More... | |
| struct network_conn * | tls_connect (char *server, int port) |
| Connect an encrypted TCP/IP socket to server:port. More... | |
| bool | tls_finalize () |
| Free previous global initialization of TLS. More... | |
Variables | |
| static x509_crt | cacerts |
| #define SHA512_LEN 64 |
| #define TLS_CONN_MAGIC 0x42434445 |
Magic used to validate the type of network_conn.
| struct network_conn* tls_connect | ( | char * | server, |
| int | port | ||
| ) |
Connect an encrypted TCP/IP socket to server:port.
| server | The server to connect to, either an IP or a hostname. |
| port | The servers port (0 <= port <= 65536) |
| void tls_disconnect | ( | struct network_conn * | nwc | ) |
| bool tls_finalize | ( | ) |
Free previous global initialization of TLS.
| bool tls_init | ( | ) |
Global initialization of TLS.
This function is required to be called prior to the first call tls_connect(). Global initialization, such as loading the list of trusted CAs is performed here.
| int tls_recv | ( | struct network_conn * | nwc, |
| char * | buffer, | ||
| size_t | buffer_len | ||
| ) |
| int tls_recv_byte | ( | struct network_conn * | nwc | ) |
| bool tls_send | ( | struct network_conn * | nwc, |
| char * | buffer, | ||
| size_t | buffer_len | ||
| ) |
| bool tls_send_fmt | ( | struct network_conn * | nwc, |
| char * | fmt, | ||
| ... | |||
| ) |
|
static |
1.8.9.1