You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2022/07/30 02:25:33 UTC

[GitHub] [guacamole-server] jmuehlner commented on a diff in pull request #387: GUACAMOLE-1652: Only call SSL init functions when the library version requires it.

jmuehlner commented on code in PR #387:
URL: https://github.com/apache/guacamole-server/pull/387#discussion_r933712329


##########
src/guacd/daemon.c:
##########
@@ -381,10 +381,15 @@ int main(int argc, char* argv[]) {
         CRYPTO_set_locking_callback(guacd_openssl_locking_callback);
 #endif
 
-        /* Init SSL */
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+        /* Init OpenSSL for OpenSSL Versions < 1.1.0 */
         SSL_library_init();
         SSL_load_error_strings();
         ssl_context = SSL_CTX_new(SSLv23_server_method());
+#else
+        /* Set up OpenSSL for OpenSSL Versions >= 1.1.0 */
+        ssl_context = SSL_CTX_new(TLS_server_method());

Review Comment:
   Per https://www.openssl.org/docs/manmaster/man3/SSLv23_server_method.html, 
   
   > SSLv23_method(), SSLv23_server_method(), SSLv23_client_method()
   > These functions do not exist anymore, they have been renamed to TLS_method(), TLS_server_method() and TLS_client_method() respectively. Currently, the old function calls are renamed to the corresponding new ones by preprocessor macros, to ensure that existing code which uses the old function names still compiles. However, using the old function names is deprecated and new code should call the new functions instead.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org