- int (*init)(struct ustream_ssl *us, struct ustream *conn, void *ctx, bool server);
+ struct ustream_ssl_ctx *(*context_new)(bool server);
+ int (*context_set_crt_file)(struct ustream_ssl_ctx *ctx, const char *file);
+ int (*context_set_key_file)(struct ustream_ssl_ctx *ctx, const char *file);
+ int (*context_add_ca_crt_file)(struct ustream_ssl_ctx *ctx, const char *file);
+ void (*context_free)(struct ustream_ssl_ctx *ctx);
+
+ int (*init)(struct ustream_ssl *us, struct ustream *conn, struct ustream_ssl_ctx *ctx, bool server);
+ int (*set_peer_cn)(struct ustream_ssl *conn, const char *name);