diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/CertSetupScreen.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/CertSetupScreen.kt
index f9c4302..f2b8698 100644
--- a/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/CertSetupScreen.kt
+++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/CertSetupScreen.kt
@@ -107,6 +107,16 @@ fun CertSetupScreen(onDone: () -> Unit) {
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
)
+ // A downloaded certificate works in most cars, not all: say where to go when it doesn't.
+ if (!manualProgress) {
+ Text(
+ stringResource(R.string.certsetup_installed_hint),
+ style = MaterialTheme.typography.bodyMedium,
+ textAlign = TextAlign.Center,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ modifier = Modifier.padding(top = 8.dp),
+ )
+ }
Spacer(Modifier.height(20.dp))
Button(onClick = onDone, modifier = Modifier.fillMaxWidth().height(56.dp)) {
Text(stringResource(R.string.certsetup_continue))
diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/SettingsScreen.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/SettingsScreen.kt
index 03f765d..e6d4e7d 100644
--- a/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/SettingsScreen.kt
+++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/ui/SettingsScreen.kt
@@ -255,7 +255,11 @@ private fun CertificateSection() {
if (uri != null) pendingUri = uri
}
- SettingsSection(stringResource(R.string.settings_certificate), footer = notice ?: stringResource(R.string.cert_next_connection)) {
+ // With the aasdk certificate loaded, the footer says what to do when a car rejects it.
+ val certFooter = stringResource(
+ if (summary?.kind == CertProvider.Kind.DOWNLOADED) R.string.cert_downloaded_footer else R.string.cert_next_connection,
+ )
+ SettingsSection(stringResource(R.string.settings_certificate), footer = notice ?: certFooter) {
val s = summary
val loaded = s != null && s.kind != CertProvider.Kind.SELF_SIGNED
val hasDetails = s?.subject != null || s?.issuer != null
diff --git a/gearslip/src/main/res/values/strings.xml b/gearslip/src/main/res/values/strings.xml
index 47c2306..3d874e7 100644
--- a/gearslip/src/main/res/values/strings.xml
+++ b/gearslip/src/main/res/values/strings.xml
@@ -125,9 +125,9 @@
Download from aasdk
Certificate downloaded.
Download failed: %1$s
- The certificate the open-source aasdk project publishes on GitHub. Gearslip doesn\'t include one
+ The certificate the open-source aasdk project publishes on GitHub. Most cars accept it, but some from around 2020 on reject it
Import my own file
- A .p12 file with its private key, from wherever you choose
+ A .p12 file with its private key. Use your own when your car rejects the aasdk certificate
Remove imported certificate
Remove downloaded certificate
Removed the imported certificate.
@@ -330,13 +330,13 @@
Continue
Download failed
Retry
- A .p12 file with its private key, from wherever you choose.
+ A .p12 file with its private key. Use your own when your car rejects the aasdk certificate.
Skip car connection setup
Cars accept only Google-issued certificates, and you have one loaded.
Cars accept only Google-issued certificates. Gearslip doesn\'t include one, so choose where yours comes from.
- The open-source aasdk project publishes this certificate at github.com/opencardev/aasdk. Most cars accept it; some from around 2020 on don\'t.
+ The open-source aasdk project publishes this certificate at github.com/opencardev/aasdk. Most cars accept it. Some from around 2020 on reject it, and then you need to import your own.
Gearslip storage
@@ -840,4 +840,10 @@
- %1$d meter
- %1$d meters
+
+
+ If your car won\'t connect, it may reject this certificate. Import your own in Settings, under Certificate.
+
+
+ Car won\'t connect? Some cars from around 2020 on reject the aasdk certificate, so import your own instead. Changes take effect on the next connection.