Skip to content

Commit

Permalink
fix: enable TLS 1.2 for hyper-rustls
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Pernoud committed Jun 3, 2024
1 parent 79a2f0b commit a85e33c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.22.0"
flutter-version: "3.22.1"
- name: Decode android/key.jks
run: echo "${{ secrets.KEY_JKS }}" | base64 --decode > android/key.jks
- name: Decode android/key.properties
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN chown -Rf "${UID}":"${UID}" /myapp
# Stage 2 : Frontend build #
############################

FROM --platform=$BUILDPLATFORM ghcr.io/cirruslabs/flutter:3.22.0 AS frontend-builder
FROM --platform=$BUILDPLATFORM ghcr.io/cirruslabs/flutter:3.22.1 AS frontend-builder
WORKDIR /build
COPY ./frontend .
RUN flutter pub get
Expand Down
6 changes: 3 additions & 3 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ http = "1.0"
http-body-util = "0.1"
hyper = { version = "1", default-features = false }
hyper-util = { version = "0.1.3", features = ["client-legacy", "http1", "tokio"], default-features = false }
hyper-rustls = { version = "0.27", features = ["webpki-tokio", "http1", "http2", "ring"], default-features = false }
hyper-rustls = { version = "0.27", features = ["webpki-tokio", "http1", "http2", "ring", "tls12"], default-features = false }
hyper-hickory = { version = "0.7.0", default-features = false, features = ["system-config"] }
jsonwebtoken = { version = "9", default-features = false }
maxminddb = "0.24"
Expand Down Expand Up @@ -71,9 +71,9 @@ tikv-jemallocator = "0.5"


[dev-dependencies]
async-tungstenite = { version = "0.25", features = ["tokio-runtime"] }
async-tungstenite = { version = "0.26", features = ["tokio-runtime"] }
reqwest = { version="0.12", default-features = false, features = ["json", "rustls-tls", "cookies", "stream"] }
tungstenite = "0.21"
tungstenite = "0.23"

[profile.release_optimized]
inherits = "release"
Expand Down
1 change: 1 addition & 0 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
pub const CONFIG_FILE: &str = "atrium.yaml";

fn main() -> Result<()> {
// println!("MiMalloc version: {}", mimalloc::MiMalloc.version()); // mimalloc = { version = "0.1", features = ["extended"] } in Cargo.toml to use this
// We need to work out the local time offset before entering multi-threaded context
let cfg: Config = match File::open(CONFIG_FILE) {
Ok(file) => serde_yaml::from_reader(file).expect("failed to parse configuration file"),
Expand Down
3 changes: 2 additions & 1 deletion backend/tests/backend/apps/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use tokio_stream::StreamExt;

use tracing::debug;
use tungstenite::{client::IntoClientRequest, Message};
use std::str::FromStr;

use crate::helpers::TestApp;

Expand Down Expand Up @@ -207,7 +208,7 @@ async fn test_websocket() {
let app = TestApp::spawn(Some(config)).await;

// Act : websocket request
let mut request = reqwest::Url::parse(&format!("ws://127.0.0.1:{}", app.port))
let mut request = http::Uri::from_str(&format!("ws://127.0.0.1:{}", app.port))
.unwrap()
.into_client_request()
.unwrap();
Expand Down
50 changes: 25 additions & 25 deletions frontend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.5.1"
version: "3.6.1"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -203,10 +203,10 @@ packages:
description:
path: "."
ref: master
resolved-ref: "92bdb69a313a56c391ef148c12ef6539bd31253d"
resolved-ref: "6689dc52d5a915f9f223f2553c8f8b88f66b2820"
url: "https://github.com/mchome/flutter_colorpicker"
source: git
version: "1.0.3"
version: "1.1.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -256,10 +256,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f"
sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e
url: "https://pub.dev"
source: hosted
version: "2.0.19"
version: "2.0.20"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -290,10 +290,10 @@ packages:
dependency: transitive
description:
name: image
sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e"
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
url: "https://pub.dev"
source: hosted
version: "4.1.7"
version: "4.2.0"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -402,10 +402,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514"
url: "https://pub.dev"
source: hosted
version: "2.2.4"
version: "2.2.5"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -506,10 +506,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.3"
shared_preferences_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -639,10 +639,10 @@ packages:
dependency: transitive
description:
name: universal_platform
sha256: d315be0f6641898b280ffa34e2ddb14f3d12b1a37882557869646e0cc363d0cc
sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec"
url: "https://pub.dev"
source: hosted
version: "1.0.0+1"
version: "1.1.0"
url_launcher:
dependency: "direct main"
description:
Expand All @@ -655,10 +655,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775"
sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf
url: "https://pub.dev"
source: hosted
version: "6.3.1"
version: "6.3.3"
url_launcher_ios:
dependency: transitive
description:
Expand Down Expand Up @@ -735,10 +735,10 @@ packages:
dependency: transitive
description:
name: video_player_android
sha256: "134e1ad410d67e18a19486ed9512c72dfc6d8ffb284d0e8f2e99e903d1ba8fa3"
sha256: "4f77780499ebbdb3a8387f3de7a9d07a7665cfb3a3741177c44a52353fe41d64"
url: "https://pub.dev"
source: hosted
version: "2.4.14"
version: "2.4.16"
video_player_avfoundation:
dependency: transitive
description:
Expand All @@ -759,10 +759,10 @@ packages:
dependency: transitive
description:
name: video_player_web
sha256: "41245cef5ef29c4585dbabcbcbe9b209e34376642c7576cabf11b4ad9289d6e4"
sha256: ff4d69a6614b03f055397c27a71c9d3ddea2b2a23d71b2ba0164f59ca32b8fe2
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.3.1"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -799,18 +799,18 @@ packages:
dependency: "direct main"
description:
name: webview_flutter
sha256: "25e1b6e839e8cbfbd708abc6f85ed09d1727e24e08e08c6b8590d7c65c9a8932"
sha256: "6869c8786d179f929144b4a1f86e09ac0eddfe475984951ea6c634774c16b522"
url: "https://pub.dev"
source: hosted
version: "4.7.0"
version: "4.8.0"
webview_flutter_android:
dependency: "direct main"
description:
name: webview_flutter_android
sha256: dad3313c9ead95517bb1cae5e1c9d20ba83729d5a59e5e83c0a2d66203f27f91
sha256: f42447ca49523f11d8f70abea55ea211b3cafe172dd7a0e7ac007bb35dd356dc
url: "https://pub.dev"
source: hosted
version: "3.16.1"
version: "3.16.4"
webview_flutter_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -869,4 +869,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.19.0"
flutter: ">=3.22.0"

0 comments on commit a85e33c

Please sign in to comment.