Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make x25519 the default key-share (previously X25519MLKEM768) when using BC #365

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Fluxzy.Core/Clients/Ssl/BouncyCastle/FluxzyTlsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ internal class FluxzyTlsClient : DefaultTlsClient
NamedGroup.secp256r1,
};

private static readonly int[] DefaultKeyShares = new int[] {
NamedGroup.x25519
};

private readonly IReadOnlyCollection<SslApplicationProtocol>_applicationProtocols;
private readonly FluxzyCrypto _crypto;
Expand Down Expand Up @@ -70,7 +73,7 @@ public override void Init(TlsClientContext context)
public override IList<int> GetEarlyKeyShareGroups()
{
if (_fingerPrint == null) {
return base.GetEarlyKeyShareGroups();
return DefaultKeyShares;
}

if (_fingerPrint.EarlySharedGroups != null)
Expand Down
2 changes: 1 addition & 1 deletion test/Fluxzy.Tests/Cli/ReverseProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static IEnumerable<object[]> GetArguments()
$"{TestConstants.PlainHttp11}/global-health-check",
$"{TestConstants.Http11Host}/global-health-check",
$"{TestConstants.Http2Host}/global-health-check",
"http://example.com",
"http://eu.httpbin.org/",
"https://www.example.com"
};

Expand Down
2 changes: 1 addition & 1 deletion test/Fluxzy.Tests/Cli/WithRuleOptionHostFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override void ConfigurePass(HttpRequestMessage requestMessage)

protected override void ConfigureBlock(HttpRequestMessage requestMessage)
{
requestMessage.RequestUri = new System.Uri("http://example.com");
requestMessage.RequestUri = new System.Uri("http://eu.httpbin.org/");
}
}
}
2 changes: 1 addition & 1 deletion test/Fluxzy.Tests/Cli/WithRuleOptionIsSecureFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected override void ConfigurePass(HttpRequestMessage requestMessage)

protected override void ConfigureBlock(HttpRequestMessage requestMessage)
{
requestMessage.RequestUri = new ("http://example.com");
requestMessage.RequestUri = new ("http://eu.httpbin.org/");
}
}
}
2 changes: 1 addition & 1 deletion test/Fluxzy.Tests/ProxyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public async Task Test_GetThrough_H1_Plain()

var httpClient = new HttpClient(messageHandler);

var response = await httpClient.GetAsync("http://example.com/", cancellationTokenSource.Token);
var response = await httpClient.GetAsync("http://eu.httpbin.org/", cancellationTokenSource.Token);

_ = await response.Content.ReadAsStringAsync(
cancellationTokenSource.Token);
Expand Down
4 changes: 2 additions & 2 deletions test/Fluxzy.Tests/UnitTests/Misc/PathAndQueryUtilityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace Fluxzy.Tests.UnitTests.Misc
public class PathAndQueryUtilityTests
{
[Theory]
[InlineData("http://example.com", "/")]
[InlineData("http://example.com/", "/")]
[InlineData("http://eu.httpbin.org", "/")]
[InlineData("http://eu.httpbin.org/", "/")]
[InlineData("https://example.com", "/")]
[InlineData("https://example.com/", "/")]
[InlineData("https://www.fluxzy.io/download", "/download")]
Expand Down
Loading