Skip to content

Commit 141f564

Browse files
committed
fix order of default group ids (TLS) ; 0.5.5
1 parent e19dd15 commit 141f564

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["boring", "boring-sys", "tokio-boring"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.5.3"
6+
version = "0.5.5"
77
repository = "https://github.com/plabayo/rama-boring"
88
# we should stick on edition 2021 until ecosystem is ready,
99
# and perhaps let cloudflare do it if ever,
@@ -18,9 +18,9 @@ tag-prefix = ""
1818
publish = false
1919

2020
[workspace.dependencies]
21-
rama-boring = { version = "0.5.3", path = "./boring" }
22-
rama-boring-sys = { version = "0.5.3", path = "./boring-sys" }
23-
rama-boring-tokio = { version = "0.5.3", path = "./tokio-boring" }
21+
rama-boring = { version = "0.5.5", path = "./boring" }
22+
rama-boring-sys = { version = "0.5.5", path = "./boring-sys" }
23+
rama-boring-tokio = { version = "0.5.5", path = "./tokio-boring" }
2424

2525
antidote = "1.0.0"
2626
anyhow = "1"

boring-sys/patches/rama_boring_pq.patch

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3915,17 +3915,16 @@ index 7f018ceec..6dfd090e6 100644
39153915
#define SN_MLKEM1024 "MLKEM1024"
39163916
#define NID_MLKEM1024 966
39173917
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
3918-
index eb9ef2d87..f70b1b40a 100644
3918+
index eb9ef2d87..fde43d5dd 100644
39193919
--- a/include/openssl/ssl.h
39203920
+++ b/include/openssl/ssl.h
3921-
@@ -2559,6 +2559,10 @@ OPENSSL_EXPORT size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
3921+
@@ -2559,6 +2559,9 @@ OPENSSL_EXPORT size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
39223922
#define SSL_GROUP_X25519 29
39233923
#define SSL_GROUP_X25519_MLKEM768 0x11ec
39243924
#define SSL_GROUP_X25519_KYBER768_DRAFT00 0x6399
39253925
+#define SSL_GROUP_X25519_KYBER512_DRAFT00 0xfe30
39263926
+#define SSL_GROUP_X25519_KYBER768_DRAFT00_OLD 0xfe31
39273927
+#define SSL_GROUP_P256_KYBER768_DRAFT00 0xfe32
3928-
+#define SSL_GROUP_X25519_MLKEM768 0x11ec
39293928
#define SSL_GROUP_MLKEM1024 0x0202
39303929

39313930
// SSL_CTX_set1_group_ids sets the preferred groups for |ctx| to |group_ids|.
@@ -3957,7 +3956,7 @@ index f623e2dc8..ea0d825e4 100644
39573956
// DefaultSupportedGroupIds returns the list of IDs for the default groups that
39583957
// are supported when the caller hasn't explicitly configured supported groups.
39593958
diff --git a/ssl/ssl_key_share.cc b/ssl/ssl_key_share.cc
3960-
index 94d07ff95..b4421ff24 100644
3959+
index 94d07ff95..51eba7fb2 100644
39613960
--- a/ssl/ssl_key_share.cc
39623961
+++ b/ssl/ssl_key_share.cc
39633962
@@ -26,14 +26,15 @@
@@ -4603,17 +4602,25 @@ index 94d07ff95..b4421ff24 100644
46034602
};
46044603

46054604
static_assert(std::size(kNamedGroups) == kNumNamedGroups,
4606-
@@ -455,6 +804,9 @@ Span<const NamedGroup> NamedGroups() { return kNamedGroups; }
4605+
@@ -455,9 +804,14 @@ Span<const NamedGroup> NamedGroups() { return kNamedGroups; }
46074606

46084607
Span<const uint16_t> DefaultSupportedGroupIds() {
46094608
static const uint16_t kDefaultSupportedGroupIds[] = {
4610-
+ SSL_GROUP_X25519_KYBER768_DRAFT00,
4611-
+ SSL_GROUP_X25519_MLKEM768,
4612-
+ SSL_GROUP_MLKEM1024,
4613-
SSL_GROUP_X25519,
4614-
SSL_GROUP_SECP256R1,
4615-
SSL_GROUP_SECP384R1,
4616-
@@ -472,10 +824,16 @@ UniquePtr<SSLKeyShare> SSLKeyShare::Create(uint16_t group_id) {
4609+
- SSL_GROUP_X25519,
4610+
- SSL_GROUP_SECP256R1,
4611+
- SSL_GROUP_SECP384R1,
4612+
+ SSL_GROUP_X25519_MLKEM768, // 0x11ec
4613+
+ SSL_GROUP_X25519, // 0x001d
4614+
+ SSL_GROUP_MLKEM1024, // 0x0202
4615+
+ SSL_GROUP_SECP256R1, // 0x0017
4616+
+ SSL_GROUP_SECP384R1, // 0x0018
4617+
+ SSL_GROUP_SECP521R1, // 0x0019
4618+
+ SSL_GROUP_X25519_KYBER768_DRAFT00, // 0x6399
4619+
+ SSL_GROUP_X25519_KYBER512_DRAFT00, // 0xfe30
4620+
};
4621+
return Span(kDefaultSupportedGroupIds);
4622+
}
4623+
@@ -472,10 +826,16 @@ UniquePtr<SSLKeyShare> SSLKeyShare::Create(uint16_t group_id) {
46174624
return MakeUnique<ECKeyShare>(EC_group_p521(), SSL_GROUP_SECP521R1);
46184625
case SSL_GROUP_X25519:
46194626
return MakeUnique<X25519KeyShare>();

0 commit comments

Comments
 (0)