I have an Android app that communicates with my host server. The app and the server communicates thru SSL. Every year, I have to renew the (self-signed) certificate in the host server. Every time that cert expires, I have to update my Android app accordingly by creating my own TrustManager
and trusting the new certificate directly. This is working perfectly.
The thing is, I don't want to modify my Android app every time my cert expires. So the question is, how do I trust all the self-signed certificates that I issue? Again, only the self-signed certificates from me.
These are the restrictions:
- Only self-signed certs can be used
- I can only create new certs valid for 12 months max
This is how I generate the cert:
openssl req -newkey rsa:4096 \
-x509 \
-sha256 \
-days 365 \
-nodes \
-out selfSignedCert.crt \
-keyout newPrivate.key
Would appreciate your help.