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

Feature Request: Root CA certificate import #61

Closed
m-pastuszek opened this issue Nov 15, 2022 · 8 comments
Closed

Feature Request: Root CA certificate import #61

m-pastuszek opened this issue Nov 15, 2022 · 8 comments

Comments

@m-pastuszek
Copy link

m-pastuszek commented Nov 15, 2022

Hi!

Is it possible to add function to import CA certificate into Android Cert Store?
It would be best for self signed certificates used in internal SSL websites.

For now, Android require screen lock to import certificate and also renewing would be easier.

@h-mdm
Copy link
Owner

h-mdm commented Nov 16, 2022

Certificates can be embedded in the launcher code.

To embed certificates into Headwind MDM launcher, you need to do the following:

  1. Place the certificate files (PEM) into the app/src/main/assets directory
  2. Fill the "certificates" string array in the app/src/main/res/values/strings.xml

Note that downloading certificates from some URL is not safe so it's not done that way.

@h-mdm h-mdm closed this as completed Nov 16, 2022
@m-pastuszek
Copy link
Author

@h-mdm, I've just used new cerificate embedding and it works fine, but I have a problem with opening websistes in Kiosk Browser with self-signed certificates. It's just showing blank page.

In Logcat, there's an info:
Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Chrome opens this website correctly as trusted. Can I do something with this?

@h-mdm
Copy link
Owner

h-mdm commented Jan 19, 2023

I guess you can't use just a single self-signed certificate, but you need a chain of at least two certificates, so the "root" certificate is embedded as trusted, and a second one is used by a website.

@m-pastuszek
Copy link
Author

m-pastuszek commented Jan 19, 2023

So why Chrome opens it correctly?
I've embedded root certificate so in my opinion it should work.

Hierarchy:
rootca

@h-mdm
Copy link
Owner

h-mdm commented Jan 19, 2023

If Chrome trust the certificate, other web clients should trust it as well. Probably the Android component WebViewClient has a bug and it doesn't trust the certificates registered by an MDM app.

Anyway, you can rebuild the kiosk browser and ignore the SSL error: https://stackoverflow.com/questions/33825696/android-error-in-webview-loadurl-trust-anchor-for-certification-path-not-fou

@m-pastuszek
Copy link
Author

Yea, I thought about rebuilding, but I couldn't find repo of Kiosk Browser what made me thinking that it's private.

@h-mdm
Copy link
Owner

h-mdm commented Jan 19, 2023

Please contact the technical support https://h-mdm.com/contact-us/

@m-pastuszek
Copy link
Author

I've made the decision to leave it like it is. I mean, without SSL.
These websites are inside use only, so HTTPS is not needed - there's much more to do and little profit :)

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

2 participants