18 int server_random_first, u8 *out,
size_t out_len);
20 const u8 *in_data,
size_t in_len,
size_t *out_len);
22 const u8 *in_data,
size_t in_len,
23 u8 *out_data,
size_t out_len);
25 const u8 *in_data,
size_t in_len,
26 u8 *out_data,
size_t out_len);
34 int tlsv1_server_set_verify(
struct tlsv1_server *conn,
int verify_peer);
36 typedef int (*tlsv1_server_session_ticket_cb)
37 (
void *ctx,
const u8 *ticket,
size_t len,
const u8 *client_random,
38 const u8 *server_random, u8 *master_secret);
40 void tlsv1_server_set_session_ticket_cb(
struct tlsv1_server *conn,
41 tlsv1_server_session_ticket_cb cb,
45 void (*cb)(
void *ctx,
const char *msg),
void *ctx);
47 void tlsv1_server_set_test_flags(
struct tlsv1_server *conn, u32 flags);
int tlsv1_server_prf(struct tlsv1_server *conn, const char *label, int server_random_first, u8 *out, size_t out_len)
Use TLS-PRF to derive keying material.
Definition: tlsv1_server.c:465
int tlsv1_server_set_cipher_list(struct tlsv1_server *conn, u8 *ciphers)
Configure acceptable cipher suites.
Definition: tlsv1_server.c:656
Definition: tlsv1_cred.h:8
int tlsv1_server_shutdown(struct tlsv1_server *conn)
Shutdown TLS connection.
Definition: tlsv1_server.c:582
int tlsv1_server_get_keyblock_size(struct tlsv1_server *conn)
Get TLS key_block size.
Definition: tlsv1_server.c:639
void tlsv1_server_deinit(struct tlsv1_server *conn)
Deinitialize TLSv1 server connection.
Definition: tlsv1_server.c:437
int tlsv1_server_resumed(struct tlsv1_server *conn)
Was session resumption used.
Definition: tlsv1_server.c:603
int tlsv1_server_decrypt(struct tlsv1_server *conn, const u8 *in_data, size_t in_len, u8 *out_data, size_t out_len)
Decrypt data from TLS tunnel.
Definition: tlsv1_server.c:254
struct tlsv1_server * tlsv1_server_init(struct tlsv1_credentials *cred)
Initialize TLSv1 server connection.
Definition: tlsv1_server.c:371
u8 * tlsv1_server_handshake(struct tlsv1_server *conn, const u8 *in_data, size_t in_len, size_t *out_len)
Process TLS handshake.
Definition: tlsv1_server.c:128
int tlsv1_server_get_cipher(struct tlsv1_server *conn, char *buf, size_t buflen)
Get current cipher name.
Definition: tlsv1_server.c:498
int tlsv1_server_global_init(void)
Initialize TLSv1 server.
Definition: tlsv1_server.c:346
int tlsv1_server_established(struct tlsv1_server *conn)
Check whether connection has been established.
Definition: tlsv1_server.c:449
int tlsv1_server_get_random(struct tlsv1_server *conn, struct tls_random *data)
Get random data from TLS connection.
Definition: tlsv1_server.c:615
Definition: tlsv1_server_i.h:8
int tlsv1_server_encrypt(struct tlsv1_server *conn, const u8 *in_data, size_t in_len, u8 *out_data, size_t out_len)
Encrypt data into TLS tunnel.
Definition: tlsv1_server.c:221
void tlsv1_server_global_deinit(void)
Deinitialize TLSv1 server.
Definition: tlsv1_server.c:360