mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Provide a function that returns a server connection context.
This commit is contained in:
parent
1d9775794f
commit
e7d3d1ae0d
@ -36,6 +36,7 @@ struct ressl_config {
|
||||
|
||||
#define RESSL_CLIENT (1 << 0)
|
||||
#define RESSL_SERVER (1 << 1)
|
||||
#define RESSL_SERVER_CONN (1 << 2)
|
||||
|
||||
struct ressl {
|
||||
struct ressl_config *config;
|
||||
@ -51,6 +52,7 @@ struct ressl {
|
||||
};
|
||||
|
||||
struct ressl *ressl_new(void);
|
||||
struct ressl *ressl_server_conn(struct ressl *ctx);
|
||||
|
||||
int ressl_check_hostname(X509 *cert, const char *host);
|
||||
int ressl_configure_keypair(struct ressl *ctx);
|
||||
|
@ -29,6 +29,19 @@ ressl_server(void)
|
||||
return (ctx);
|
||||
}
|
||||
|
||||
struct ressl *
|
||||
ressl_server_conn(struct ressl *ctx)
|
||||
{
|
||||
struct ressl *conn_ctx;
|
||||
|
||||
if ((conn_ctx = ressl_new()) == NULL)
|
||||
return (NULL);
|
||||
|
||||
conn_ctx->flags |= RESSL_SERVER_CONN;
|
||||
|
||||
return (conn_ctx);
|
||||
}
|
||||
|
||||
int
|
||||
ressl_listen(struct ressl *ctx, const char *host, const char *port, int af)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user