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

Chrome ERR_CERTIFICATE_TRANSPARENCY_REQUIRED with the second Android user #25

Open
PiRomant opened this issue Oct 8, 2022 · 0 comments

Comments

@PiRomant
Copy link

PiRomant commented Oct 8, 2022

Another Android user on the same device gets an error ERR_CERTIFICATE_TRANSPARENCY_REQUIRED in the Chrome.

In the meantime, there is a way to work around this: you can manually modify the flags used by Chrome, to explicitly trust your specific CA certificate, in addition to installing it the system store, thereby disabling certificate transparency checks.

You can do this using the --ignore-certificate-errors-spki-list=<cert hash> option. This is available on all platforms, but it's a bit tricky to set on Android, since you don't directly control how Chrome starts up. To enable this, you need to:

  1. Get the SPKI fingerprint of your certificate. You can do so using this OpenSSL magic incantation:>
    openssl x509 -in $YOUR_CA_CERTIFICATE -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64

  2. Create a file containing one line:
    chrome --ignore-certificate-errors-spki-list=$YOUR_SPKI_FINGERPRINT

  3. Use adb push to store this on your Android device at:

/data/local/chrome-command-line
/data/local/android-webview-command-line
/data/local/webview-command-line
/data/local/content-shell-command-line
/data/local/tmp/chrome-command-line
/data/local/tmp/android-webview-command-line
/data/local/tmp/webview-command-line
/data/local/tmp/content-shell-command-line

This ensures it applies for all varieties of Chromium, in both normal & debug environments. You'll need root access to set the non-tmp files, which is what's used on production devices (while the tmp files are used by userdebug builds).

  1. Set the permissions of each the above with chmod 555 <filename> to ensure that it's readable by Chromium when it starts.
  2. Force stop Chrome (am force-stop com.android.chrome), and then open it again.
  3. Check the command line flags shown on chrome://version to ensure this command line option is included there.

https://httptoolkit.com/blog/chrome-android-certificate-transparency/#how-to-fix-it
https://habr.com/ru/company/globalsign/blog/666046/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant