Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl 开启后不work #53

Open
Charist opened this issue Jun 4, 2020 · 2 comments
Open

ssl 开启后不work #53

Charist opened this issue Jun 4, 2020 · 2 comments

Comments

@Charist
Copy link

Charist commented Jun 4, 2020

tcp+ssl的使用。 我在windows/linux下使用有问题,发现 'mOpenSSLCTX = SSL_CTX_new(SSLv23_method())' 初始处理指针为空,也没见调用‘SSL_library_init’的地方,是否测试过呢?

@IronsDu
Copy link
Owner

IronsDu commented Jun 4, 2020

@Charist 哦,不好意思,需要用户自己调用。
譬如这样:

    #ifdef USE_OPENSSL
        SSL_library_init();
        OpenSSL_add_all_algorithms();
        SSL_load_error_strings();
    #endif

https://github.com/IronsDu/Joynet/blob/b95eeb485bd5d726fba0e47e22a1bce27a4e3ab1/src/Joynet.cpp#L518-L522

@IronsDu
Copy link
Owner

IronsDu commented Jun 4, 2020

另外还需要在构建链接是调用 WithServerSideSSL 或者 WithClientSideSSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants