Skip to content

Commit 90c1aef

Browse files
dedokphuslu
authored andcommitted
Fix setting ssl extensions since it was broken by me for openssl-3.4
1 parent ccfe8f1 commit 90c1aef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

patches/openssl.openssl-3.4.patch

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ index 8e9b110bb3..3a2407b0e4 100644
3030
# define TLSEXT_TYPE_compress_certificate 27
3131

3232
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
33-
index 295b719ff2..3d92df0db1 100644
33+
index 295b719ff2..7bfc9e2eb0 100644
3434
--- a/ssl/ssl_lib.c
3535
+++ b/ssl/ssl_lib.c
36-
@@ -6641,6 +6641,106 @@ int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
36+
@@ -6641,6 +6641,107 @@ int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
3737
return 0;
3838
}
3939

@@ -83,6 +83,7 @@ index 295b719ff2..3d92df0db1 100644
8383
+ num = num * 2;
8484
+ if (ossl_unlikely((ptr + num + sizeof(uint16_t)) > end))
8585
+ return 0;
86+
+
8687
+ *(uint16_t*) ptr = (uint16_t) num;
8788
+ ptr += sizeof(uint16_t);
8889
+
@@ -96,7 +97,7 @@ index 295b719ff2..3d92df0db1 100644
9697
+ if (ext->type == TLSEXT_TYPE_ec_point_formats)
9798
+ formats = &ext->data;
9899
+ if (ossl_likely(ext->received_order < data_size)) {
99-
+ *(uint16_t*)(ptr + ext->received_order) = (uint16_t) ext->type;
100+
+ ((uint16_t*)(ptr))[ext->received_order] = (uint16_t) ext->type;
100101
+ }
101102
+ }
102103
+ }

0 commit comments

Comments
 (0)