Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9756f47
Update Gradle so project can be build in latest Android Studio
adriantuk Oct 16, 2025
30906b1
Implement message signing functionality and add tests for HTTP messag…
adriantuk Oct 16, 2025
a9d10f0
Build fix
adriantuk Oct 16, 2025
23aaae7
Add debug logging for message signing process. Currently message sign…
adriantuk Oct 17, 2025
0e7083f
Exclude 'content-length' header from signing when body is empty, as i…
adriantuk Oct 20, 2025
666c4ff
enhance DER signature validation, add defensive checks to ensure we n…
adriantuk Oct 22, 2025
8a84734
Implement HTTP Structured Fields Value syntax defined in IETF RFC 9651
adriantuk Oct 27, 2025
7b9e267
adding more tests with focus on sfv addition
adriantuk Oct 27, 2025
4972ffc
Refactor enableMessageSigning to include mutex protection and validat…
adriantuk Oct 27, 2025
9660898
add more edge cases tests for structured fields; make enableMessageSi…
adriantuk Oct 27, 2025
f99ee0a
Add comments to clarify validation logic and serialization rules in s…
adriantuk Nov 3, 2025
cc1ea7d
Enhance documentation with detailed comments for Structured Fields an…
adriantuk Nov 3, 2025
ec31621
Remove the fallback between algorithms; the user should explicitly sp…
adriantuk Nov 3, 2025
722a3fa
Message signing now derives the signer and header label directly from…
adriantuk Nov 4, 2025
67eb970
comment improvement
adriantuk Nov 4, 2025
4e03059
Implemented `getAccountMessageSignature` method in Dart and platform …
adriantuk Nov 4, 2025
151ee50
Add tests for getAccountMessageSignature method
adriantuk Nov 4, 2025
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: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
.gradle
.dart_tool
pubspec.lock
.idea
android/local.properties
android/build/
AGENTS.md
build/
15 changes: 7 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ version '1.0'
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:8.5.0'
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
Expand All @@ -25,18 +24,18 @@ apply plugin: 'com.android.library'
android {
namespace 'com.criticalblue.approov_service_flutter_httpclient'

compileSdkVersion 29
compileSdk 34

defaultConfig {
minSdkVersion 19
minSdk 21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the same as everywhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is automatically generated by Flutter initially, I had to update it to modern standards, minSdkVersion 21 is required for Flutter 3.10. We still support Android 5.0+ on SDK 21

}
lintOptions {
lint {
disable 'InvalidPackage'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

Expand Down
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Oct 16 13:35:42 BST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,27 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
} catch(Exception e) {
result.error("Approov.getMessageSignature", e.getLocalizedMessage(), null);
}
} else if (call.method.equals("getAccountMessageSignature")) {
try {
String messageSignature = Approov.getAccountMessageSignature((String) call.argument("message"));
result.success(messageSignature);
} catch (NoSuchMethodError e) {
try {
String messageSignature = Approov.getMessageSignature((String) call.argument("message"));
result.success(messageSignature);
} catch(Exception inner) {
result.error("Approov.getAccountMessageSignature", inner.getLocalizedMessage(), null);
}
} catch(Exception e) {
result.error("Approov.getAccountMessageSignature", e.getLocalizedMessage(), null);
}
} else if (call.method.equals("getInstallMessageSignature")) {
try {
String messageSignature = Approov.getInstallMessageSignature((String) call.argument("message"));
result.success(messageSignature);
} catch(Exception e) {
result.error("Approov.getInstallMessageSignature", e.getLocalizedMessage(), null);
}
} else if (call.method.equals("setUserProperty")) {
try {
Approov.setUserProperty(call.argument("property"));
Expand Down
3 changes: 3 additions & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
31 changes: 30 additions & 1 deletion ios/Classes/ApproovHttpClientPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,37 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
} else if ([@"setDevKey" isEqualToString:call.method]) {
[Approov setDevKey:call.arguments[@"devKey"]];
result(nil);
} else if ([@"getMessageSignature" isEqualToString:call.method]) {
} else if ([@"getMessageSignature" isEqualToString:call.method]) {
@try {
result([Approov getMessageSignature:call.arguments[@"message"]]);
}
@catch (NSException *exception) {
result([FlutterError errorWithCode:@"Approov.getMessageSignature"
message:exception.reason
details:nil]);
}
} else if ([@"getAccountMessageSignature" isEqualToString:call.method]) {
@try {
if ([Approov respondsToSelector:@selector(getAccountMessageSignature:)]) {
result([Approov getAccountMessageSignature:call.arguments[@"message"]]);
} else {
result([Approov getMessageSignature:call.arguments[@"message"]]);
}
}
@catch (NSException *exception) {
result([FlutterError errorWithCode:@"Approov.getAccountMessageSignature"
message:exception.reason
details:nil]);
}
} else if ([@"getInstallMessageSignature" isEqualToString:call.method]) {
@try {
result([Approov getInstallMessageSignature:call.arguments[@"message"]]);
}
@catch (NSException *exception) {
result([FlutterError errorWithCode:@"Approov.getInstallMessageSignature"
message:exception.reason
details:nil]);
}
} else if ([@"setUserProperty" isEqualToString:call.method]) {
[Approov setUserProperty:call.arguments[@"property"]];
result(nil);
Expand Down
Loading