提交 fe964f0c 编写于 作者: M Matt Caswell

Use the SSL_METHODs passed to create_ssl_ctx_pair()

Don't use hardcoded SSL_METHODs!
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 1e16987f
......@@ -16,8 +16,8 @@ int create_ssl_ctx_pair(const SSL_METHOD *sm, const SSL_METHOD *cm,
SSL_CTX *serverctx = NULL;
SSL_CTX *clientctx = NULL;
serverctx = SSL_CTX_new(TLS_server_method());
clientctx = SSL_CTX_new(TLS_client_method());
serverctx = SSL_CTX_new(sm);
clientctx = SSL_CTX_new(cm);
if (serverctx == NULL || clientctx == NULL) {
printf("Failed to create SSL_CTX\n");
goto err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册