Lines Matching defs:ssl_ctx
105 SSL_CTX *ssl_ctx;
144 SSL_CTX *ssl_ctx;
146 ssl_ctx = SSL_CTX_new(TLS_server_method());
147 if (!ssl_ctx) {
151 SSL_CTX_set_options(ssl_ctx,
156 if (SSL_CTX_set1_curves_list(ssl_ctx, "P-256") != 1) {
168 SSL_CTX_set_tmp_ecdh(ssl_ctx, ecdh);
173 if (SSL_CTX_use_PrivateKey_file(ssl_ctx, key_file, SSL_FILETYPE_PEM) != 1) {
176 if (SSL_CTX_use_certificate_chain_file(ssl_ctx, cert_file) != 1) {
186 SSL_CTX_set_next_protos_advertised_cb(ssl_ctx, next_proto_cb, NULL);
190 SSL_CTX_set_alpn_select_cb(ssl_ctx, alpn_select_proto_cb, NULL);
193 return ssl_ctx;
197 static SSL *create_ssl(SSL_CTX *ssl_ctx) {
199 ssl = SSL_new(ssl_ctx);
257 ssl = create_ssl(app_ctx->ssl_ctx);
784 static void initialize_app_context(app_context *app_ctx, SSL_CTX *ssl_ctx,
787 app_ctx->ssl_ctx = ssl_ctx;
793 SSL_CTX *ssl_ctx;
797 ssl_ctx = create_ssl_ctx(key_file, cert_file);
799 initialize_app_context(&app_ctx, ssl_ctx, evbase);
805 SSL_CTX_free(ssl_ctx);