Hello All,
I am not sure that I am a "qualified" person to answer a question like "Do u know how i generate a correct cert for android O.S." - a good answer would need knowledge of how the Android VPN client is implemented.
As I understand the situation, there are 3 types of IKEv2 authentication (quoting from IKEv2 RFC):
In addition to authentication using public key signatures and shared
secrets, IKE supports authentication using methods defined in RFC
3748 [EAP].
- public key signatures
- shared secrets
- EAP
An Android 13 IKEv2/IPsec PSK (Pre-Shared Key = shared secret) connection is easy to define - it just requires a server name/address and the "secret". This option is not available when configuring a VPN client under Windows 11.
An Android 13 IKEv2/IPsec RSA connection possibly corresponds to the Windows 11 "Use machine certificates" (but could also be EAP-TLS - not tested/confirmed). This authentication method requires a private key and (optionally but preferred) corresponding certificate; the IKEv2 RFC says:
Optionally, messages 3 and 4 MAY include a certificate, or certificate chain providing evidence that the key used to compute a digital signature belongs to the name in the ID payload.
An Android 13 IKEv2/IPsec MSCHAPv2 connection corresponds to a Windows 11 "Use Extensible Authentication Protocol (EAP)" connection with a method of "Microsoft: Secured password (EAP-MSCHAP v2)". This method requires a root authority certificate of the issuer of the VPN server certificate.
I wanted to use MSCHAPv2, but when I made .cer (DER encoded X.509) or .p7b (PKCS#7) files available containing the root authority certificate, I could not load them (they did not appear) in the Android "Other security settings>Install from device storage>VPN and app user certificate" list.
I therefore created a PKCS#12 (.p12, .pfx) file that contained the root authority certificate and a plausible/usable private key and certificate for the client(s) (I used a generic name of "VPN Guest"). This file could be loaded via "Other security settings>Install from device storage>VPN and app user certificate".
Hopefully the above explains why I said that: there are more items in my "IPsec CA certificate" file than I think necessary. With that file, I can connect with both "IKEv2/IPsec RSA" and "IKEv2/IPsec MSCHAPv2".
The title of this thread is "Android 12 IKEv2 & RRAS" - I assume that readers of this topic are familiar with (and possibly manage) RRAS (Routing and Remote Access Service), NPS (Network Policy Server) and Windows Certificate Services. If that is not the case then please expand on which topics you are unfamiliar with.
Gary