#define RESSL_CLIENT (1 << 0)
#define RESSL_SERVER (1 << 1)
+#define RESSL_SERVER_CONN (1 << 2)
struct ressl {
struct ressl_config *config;
};
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);
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)
{