1

Is it possible for a app to install the certificate in System Storage? Want this so that other Apps like for example chrome,firefox dont tag the server as insecure.

Asha
  • 11,002
  • 6
  • 44
  • 66

1 Answers1

0

Check out DevicePolicyManager Methods:

  • installCaCert()
  • setKeyPairCertificate()

Carefull, this methods are restricted. Check out each method documentation.

Paulo Pereira
  • 1,750
  • 1
  • 12
  • 23
  • To use this the app should be the owner of profile/Device right? Not possible for normal non admin apps? – Asha Jun 23 '21 at 11:03
  • Yes, right. Are you opening a webpage from your App? – Paulo Pereira Jun 23 '21 at 11:13
  • If you need to open a WebPage from your App, I will sugest you to considerer use a WebView. And then check this out https://stackoverflow.com/questions/36553190/check-in-the-onreceivedsslerror-method-of-a-webviewclient-if-a-certificate-is – Paulo Pereira Jun 23 '21 at 11:16
  • What I would like is install the CA certificate in system trust store so tht other webbroweser is opened to communicate with server authorised by same CA as my app will allow ssl handshake – Asha Jun 23 '21 at 20:02