LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.11k stars 484 forks source link

include header for calling rfbssl_init() #501

Closed derekschrock closed 2 years ago

derekschrock commented 2 years ago

I don't know if this info is old but based off the recommendation here https://github.com/LibVNC/libvncserver/issues/91#issuecomment-149641057 it seems that you're asking servers to set the cert and key then execute rfbssl_init() when they want to init an SSL server.

However, rfbssl_init() isn't in a .h file provided by the project. Should the prototype for rfbssl_init() be included in rfb.h or another file rfb_ssl.h be installed?

It seems that if websockets support is fully enabled then just setting the cert and key would be enough setup for SSL then rfbRunEventLoop will init ssl in time.

I guess the alt. is to just extern rfbssl_init() however it seems that function should be in a .h if you expecting servers to execute the function.

bk138 commented 2 years ago

IIRC the function is for internal use only, we got several implementations (OpenSSL, GnuTLS) which are exposed by rfbssl.h, the only user right now is websockets.c, though this will hopefully change with #396 some time. The user/developer documentation is here so it boils down to setting key and cert and the library will take over the rest internally.

Does this answer your question?

derekschrock commented 2 years ago

Ok I couldn't tell if it was internal. Thanks for the update.