Skip to content

Commit 71aaa15

Browse files
petermarkoleimaohui
authored andcommitted
openssl: upgrade 3.3.1 -> 3.4.0
Release information: https://github.com/openssl/openssl/blob/openssl-3.4/NEWS.md#major-changes-between-openssl-33-and-openssl-340-22-oct-2024 Handles CVE-2024-9143 Refreshed patches. (From OE-Core rev: 45c6b85ccc8157f0dd31eb3d5138832ced7966d5) Signed-off-by: Peter Marko <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent a58d561 commit 71aaa15

4 files changed

+28
-35
lines changed

meta/recipes-connectivity/openssl/openssl/0001-Added-handshake-history-reporting-when-test-fails.patch

+23-30
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@ Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/22481]
77

88
Signed-off-by: William Lyu <[email protected]>
99
---
10-
test/helpers/handshake.c | 139 +++++++++++++++++++++++++++++----------
10+
test/helpers/handshake.c | 137 +++++++++++++++++++++++++++++----------
1111
test/helpers/handshake.h | 70 +++++++++++++++++++-
1212
test/ssl_test.c | 44 +++++++++++++
13-
3 files changed, 218 insertions(+), 35 deletions(-)
13+
3 files changed, 217 insertions(+), 34 deletions(-)
1414

1515
diff --git a/test/helpers/handshake.c b/test/helpers/handshake.c
16-
index e0422469e4..ae2ad59dd4 100644
16+
index f611b3a..5703b48 100644
1717
--- a/test/helpers/handshake.c
1818
+++ b/test/helpers/handshake.c
19-
@@ -1,5 +1,5 @@
20-
/*
21-
- * Copyright 2016-2022 The OpenSSL Project Authors. All Rights Reserved.
22-
+ * Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved.
23-
*
24-
* Licensed under the Apache License 2.0 (the "License"). You may not use
25-
* this file except in compliance with the License. You can obtain a copy
2619
@@ -24,6 +24,102 @@
2720
#include <netinet/sctp.h>
2821
#endif
29-
22+
3023
+/* Shamelessly copied from test/helpers/ssl_test_ctx.c */
3124
+/* Maps string names to various enumeration type */
3225
+typedef struct {
@@ -126,10 +119,10 @@ index e0422469e4..ae2ad59dd4 100644
126119
HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void)
127120
{
128121
HANDSHAKE_RESULT *ret;
129-
@@ -719,15 +815,6 @@ static void configure_handshake_ssl(SSL *server, SSL *client,
122+
@@ -725,15 +821,6 @@ static void configure_handshake_ssl(SSL *server, SSL *client,
130123
SSL_set_post_handshake_auth(client, 1);
131124
}
132-
125+
133126
-/* The status for each connection phase. */
134127
-typedef enum {
135128
- PEER_SUCCESS,
@@ -142,10 +135,10 @@ index e0422469e4..ae2ad59dd4 100644
142135
/* An SSL object and associated read-write buffers. */
143136
typedef struct peer_st {
144137
SSL *ssl;
145-
@@ -1074,17 +1161,6 @@ static void do_shutdown_step(PEER *peer)
138+
@@ -1080,17 +1167,6 @@ static void do_shutdown_step(PEER *peer)
146139
}
147140
}
148-
141+
149142
-typedef enum {
150143
- HANDSHAKE,
151144
- RENEG_APPLICATION_DATA,
@@ -160,10 +153,10 @@ index e0422469e4..ae2ad59dd4 100644
160153
static int renegotiate_op(const SSL_TEST_CTX *test_ctx)
161154
{
162155
switch (test_ctx->handshake_mode) {
163-
@@ -1162,19 +1238,6 @@ static void do_connect_step(const SSL_TEST_CTX *test_ctx, PEER *peer,
156+
@@ -1168,19 +1244,6 @@ static void do_connect_step(const SSL_TEST_CTX *test_ctx, PEER *peer,
164157
}
165158
}
166-
159+
167160
-typedef enum {
168161
- /* Both parties succeeded. */
169162
- HANDSHAKE_SUCCESS,
@@ -180,21 +173,21 @@ index e0422469e4..ae2ad59dd4 100644
180173
/*
181174
* Determine the handshake outcome.
182175
* last_status: the status of the peer to have acted last.
183-
@@ -1539,6 +1602,10 @@ static HANDSHAKE_RESULT *do_handshake_internal(
184-
176+
@@ -1545,6 +1608,10 @@ static HANDSHAKE_RESULT *do_handshake_internal(
177+
185178
start = time(NULL);
186-
179+
187180
+ save_loop_history(&(ret->history),
188181
+ phase, status, server.status, client.status,
189182
+ client_turn_count, client_turn);
190183
+
191184
/*
192185
* Half-duplex handshake loop.
193186
* Client and server speak to each other synchronously in the same process.
194-
@@ -1560,6 +1627,10 @@ static HANDSHAKE_RESULT *do_handshake_internal(
187+
@@ -1566,6 +1633,10 @@ static HANDSHAKE_RESULT *do_handshake_internal(
195188
0 /* server went last */);
196189
}
197-
190+
198191
+ save_loop_history(&(ret->history),
199192
+ phase, status, server.status, client.status,
200193
+ client_turn_count, client_turn);
@@ -203,7 +196,7 @@ index e0422469e4..ae2ad59dd4 100644
203196
case HANDSHAKE_SUCCESS:
204197
client_turn_count = 0;
205198
diff --git a/test/helpers/handshake.h b/test/helpers/handshake.h
206-
index 78b03f9f4b..b9967c2623 100644
199+
index 78b03f9..b9967c2 100644
207200
--- a/test/helpers/handshake.h
208201
+++ b/test/helpers/handshake.h
209202
@@ -1,5 +1,5 @@
@@ -214,9 +207,9 @@ index 78b03f9f4b..b9967c2623 100644
214207
* Licensed under the Apache License 2.0 (the "License"). You may not use
215208
* this file except in compliance with the License. You can obtain a copy
216209
@@ -12,6 +12,11 @@
217-
210+
218211
#include "ssl_test_ctx.h"
219-
212+
220213
+#define MAX_HANDSHAKE_HISTORY_ENTRY_BIT 4
221214
+#define MAX_HANDSHAKE_HISTORY_ENTRY (1 << MAX_HANDSHAKE_HISTORY_ENTRY_BIT)
222215
+#define MAX_HANDSHAKE_HISTORY_ENTRY_IDX_MASK \
@@ -228,7 +221,7 @@ index 78b03f9f4b..b9967c2623 100644
228221
@@ -22,6 +27,63 @@ typedef struct ctx_data_st {
229222
char *session_ticket_app_data;
230223
} CTX_DATA;
231-
224+
232225
+typedef enum {
233226
+ HANDSHAKE,
234227
+ RENEG_APPLICATION_DATA,
@@ -296,25 +289,25 @@ index 78b03f9f4b..b9967c2623 100644
296289
+ /* handshake loop history */
297290
+ HANDSHAKE_HISTORY history;
298291
} HANDSHAKE_RESULT;
299-
292+
300293
HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void);
301294
@@ -95,4 +159,8 @@ int configure_handshake_ctx_for_srp(SSL_CTX *server_ctx, SSL_CTX *server2_ctx,
302295
CTX_DATA *server2_ctx_data,
303296
CTX_DATA *client_ctx_data);
304-
297+
305298
+const char *handshake_connect_phase_name(connect_phase_t phase);
306299
+const char *handshake_status_name(handshake_status_t handshake_status);
307300
+const char *handshake_peer_status_name(peer_status_t peer_status);
308301
+
309302
#endif /* OSSL_TEST_HANDSHAKE_HELPER_H */
310303
diff --git a/test/ssl_test.c b/test/ssl_test.c
311-
index ea608518f9..9d6b093c81 100644
304+
index ea60851..9d6b093 100644
312305
--- a/test/ssl_test.c
313306
+++ b/test/ssl_test.c
314307
@@ -26,6 +26,44 @@ static OSSL_LIB_CTX *libctx = NULL;
315308
/* Currently the section names are of the form test-<number>, e.g. test-15. */
316309
#define MAX_TESTCASE_NAME_LENGTH 100
317-
310+
318311
+static void print_handshake_history(const HANDSHAKE_HISTORY *history)
319312
+{
320313
+ size_t first_idx;

meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Signed-off-by: Tim Orling <[email protected]>
1717
1 file changed, 10 deletions(-)
1818

1919
diff --git a/Configure b/Configure
20-
index 4569952..adf019b 100755
20+
index fff97bd..5ee54c1 100755
2121
--- a/Configure
2222
+++ b/Configure
23-
@@ -1422,16 +1422,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
23+
@@ -1529,16 +1529,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
2424
push @{$config{shared_ldflag}}, "-mno-cygwin";
2525
}
2626

meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Index: openssl-3.0.4/Configurations/unix-Makefile.tmpl
3838
===================================================================
3939
--- openssl-3.0.4.orig/Configurations/unix-Makefile.tmpl
4040
+++ openssl-3.0.4/Configurations/unix-Makefile.tmpl
41-
@@ -472,13 +472,23 @@ BIN_LDFLAGS={- join(' ', $target{bin_lfl
41+
@@ -502,13 +502,23 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
4242
'$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
4343
BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
4444

@@ -67,7 +67,7 @@ Index: openssl-3.0.4/crypto/build.info
6767
===================================================================
6868
--- openssl-3.0.4.orig/crypto/build.info
6969
+++ openssl-3.0.4/crypto/build.info
70-
@@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
70+
@@ -115,7 +115,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
7171

7272
DEPEND[info.o]=buildinf.h
7373
DEPEND[cversion.o]=buildinf.h

meta/recipes-connectivity/openssl/openssl_3.3.1.bb renamed to meta/recipes-connectivity/openssl/openssl_3.4.0.bb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SRC_URI:append:class-nativesdk = " \
1818
file://environment.d-openssl.sh \
1919
"
2020

21-
SRC_URI[sha256sum] = "777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e"
21+
SRC_URI[sha256sum] = "e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf"
2222

2323
inherit lib_package multilib_header multilib_script ptest perlnative manpages
2424
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"

0 commit comments

Comments
 (0)