[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] haiku: hrev57053 - src/kits/network/libnetapi
From:       waddlesplash <waddlesplash () gmail ! com>
Date:       2023-05-31 16:33:10
Message-ID: 20230531163310.BBE03409E2 () turing ! freelists ! org
[Download RAW message or body]

hrev57053 adds 1 changeset to branch 'master'
old head: 0e86ca77e77224b270dc3dff905907940cc74ae6
new head: 0992009d13f10606c7152904797a78f7d4379871
overview: https://git.haiku-os.org/haiku/log/?qt=range&q=0992009d13f1+%5E0e86ca77e772

----------------------------------------------------------------------------

0992009d13f1: libnetapi: remove support for old OpenSSL versions, prepare for OpenSSL 3
  
  - Remove backported function that was needed only for old OpenSSL versions
  - Add compile time options to declare which version of OpenSSL API we
    want to use
  
  This should make it possible to build with OpenSSL 3 while keeping the
  old APIs available. Once the migration to OpenSSL 3 is done, we can bump
  the OPENSSL_API_COMPAT value to get compile time errors when using APIs
  that are deprecated in OpenSSL3, and rewrite all the code that needs
  changes.
  
  Change-Id: I606633739ed12f9698a3013989025b68478352fc
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/6484
  Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
  Reviewed-by: waddlesplash <waddlesplash@gmail.com>

               [ Adrien Destugues <adrien.destugues@opensource.viveris.fr> ]

----------------------------------------------------------------------------

Revision:    hrev57053
Commit:      0992009d13f10606c7152904797a78f7d4379871
URL:         https://git.haiku-os.org/haiku/commit/?id=0992009d13f1
Author:      Adrien Destugues <adrien.destugues@opensource.viveris.fr>
Date:        Wed May 31 12:01:24 2023 UTC
Committer:   waddlesplash <waddlesplash@gmail.com>
Commit-Date: Wed May 31 16:33:08 2023 UTC

----------------------------------------------------------------------------

2 files changed, 1 insertion(+), 44 deletions(-)
src/kits/network/libnetapi/Jamfile          |  2 +-
src/kits/network/libnetapi/SecureSocket.cpp | 43 -------------------------

----------------------------------------------------------------------------

diff --git a/src/kits/network/libnetapi/Jamfile b/src/kits/network/libnetapi/Jamfile
index a51839f707..589091f351 100644
--- a/src/kits/network/libnetapi/Jamfile
+++ b/src/kits/network/libnetapi/Jamfile
@@ -17,7 +17,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
 		UsePrivateSystemHeaders ;
 
 		if [ FIsBuildFeatureEnabled openssl ] {
-			SubDirC++Flags -DOPENSSL_ENABLED ;
+			SubDirC++Flags -DOPENSSL_ENABLED -DOPENSSL_API_COMPAT=10101 -DOPENSSL_NO_DEPRECATED=1 ;
 			UseBuildFeatureHeaders openssl ;
 			sslSources = SSL.cpp ;
 			Includes [ FGristFiles $(sslSources) SecureSocket.cpp
diff --git a/src/kits/network/libnetapi/SecureSocket.cpp b/src/kits/network/libnetapi/SecureSocket.cpp
index 7b90fbb3c2..1aaed704db 100644
--- a/src/kits/network/libnetapi/SecureSocket.cpp
+++ b/src/kits/network/libnetapi/SecureSocket.cpp
@@ -39,49 +39,6 @@
 #ifdef OPENSSL_ENABLED
 
 #ifdef TRACE_SESSION_KEY
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
-/*
- * print session id and master key in NSS keylog format (RSA
- * Session-ID:<session id> Master-Key:<master key>)
- */
-int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x)
-{
-	size_t i;
-
-	if (x == NULL)
-		goto err;
-	if (x->session_id_length == 0 || x->master_key_length == 0)
-		goto err;
-
-	// the RSA prefix is required by the format's definition although there's
-	// nothing RSA-specific in the output, therefore, we don't have to check if
-	// the cipher suite is based on RSA
-	if (BIO_puts(bp, "RSA ") <= 0)
-		goto err;
-
-	if (BIO_puts(bp, "Session-ID:") <= 0)
-		goto err;
-	for (i = 0; i < x->session_id_length; i++) {
-		if (BIO_printf(bp, "%02X", x->session_id[i]) <= 0)
-			goto err;
-	}
-	if (BIO_puts(bp, " Master-Key:") <= 0)
-		goto err;
-	for (i = 0; i < (size_t)x->master_key_length; i++) {
-		if (BIO_printf(bp, "%02X", x->master_key[i]) <= 0)
-			goto err;
-	}
-	if (BIO_puts(bp, "\n") <= 0)
-		goto err;
-
-	return (1);
-err:
-	return (0);
-}
-
-
-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-
 
 // print client random id and master key in NSS keylog format
 // as session ID is not enough.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic