1

For development of a progressive web app I'm using a self signed certificate on my development computer, which works nicely on my computer.

Now I'd like to view my local development web site running in my LAN from mobile devices, in this case an Android 10 device (Zebra TC26).

This works, but I always get a warning about my self signed certificate being not secure (of course not, it's self signed).

How can I add this local self signed certificate to my development Android device so I get rid of this warning message during development?

On google I only found instructions how to add a self signed certificate for WLAN or authentication, but not how to trust a self signed cert on Android.

[Update] I already exported the self signed cert Visual Studio created and which works for localhost and imported this to my Android device. But it didn't help.

Maybe it's because my self signed cert is valid only for localhost, not for my IP. And of course I browse the pwa from the mobile device using the IP of my development computer, not "localhost". I tried creating my own self signed cert using

New-SelfSignedCertificate -Subject MyDevCertName -TextExtension @("2.5.29.17={text}DNS=localhost&IPAddress=192.168.1.27") -NotAfter (Get-Date).AddYears(25) -CertStoreLocation cert:\LocalMachine\My

Exported it to pfx using the certificate manager, but when I try to use it as dot-net dev cert I get an error:

dotnet dev-certs https --clean -i C:\Daten\MyDevCertName.pfx -p secret

The certificate at 'MyDevCertName.pfx' is not a valid ASP.NET Core HTTPS development certificate.

No progress so far...

Sam
  • 28,421
  • 49
  • 167
  • 247
  • I guess you can install a self signed certificate via `Settings > Security > Credential storage > Install from device storage`. – Darshan Sep 07 '22 at 14:49
  • Maybe my problem is, because the self signed cert visual studio created is only valid for localhost, not for my local IP (192.168...)? – Sam Sep 08 '22 at 09:05

0 Answers0