Well I am stuck. I found out that it is a "Unified" format (
https://openvpn.net/vpn-server-resource ... nnect-ios/).
I changed my
previously working .ovpn file to directly include the CERTIFICATE and KEY portions of my .ca, .crt, and .key files (with their BEGIN/END header/footers). FWIW- I think that this will be method that ends up working.
I then uploaded the .ovpn file to iCloud Drive and accessed it via the Files app on the phone, selected the .ovpn file and then the Share option. "Copy to OpenVPN" was given as a Share choice. (Thanks for getting me this far!)
When I tried to add the profile it was rejected with a "Failed to import OVPN profile from selected file. option_error: option <key> was not properly closed out". Here is the end of my .ovpn file (I can see no issue and no problems were flagged in the earlier parts of the file). I've double checked the key data to make sure that matches the key portion of my .key file.
----------------------------------------------------------------
<key>
-----BEGIN PRIVATE KEY-----
key data
-----END PRIVATE KEY-----
</key>
ns-cert-type server
cipher AES-128-CBC
comp-lzo
verb 4
-------------------------------------------------------------------
FWIW, I have never had tls-auth specified in any of my four other currently working OpenVPN profiles. I am running an OpenVPN server in my Merlin router.
Then I tried the .pfx/.p12 route. I used openssl to generate a file that contained the .ca, .crt, and .key files. I tried both .pfx and .p12 suffixes, but neither one gave me a "Copy to OpenVPN" when I tried to share them from iCloud with the Files app. In any event I had no idea what changes would need to be made to .ovpn file to reflect that I would be using a .pfx/.p12 file.
For completeness this is how I generated both the .pfx and .p12 files:
..\bin\openssl.exe pkcs12 -export -in iPhone.crt -inkey iPhone.key -certfile ca.crt -out iPhonePFX.p12
WARNING: can't open config file: c:/openssl/ssl/openssl.cnf
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:
unable to write 'random state'
NOTE: I have no idea if the Warning has any effect on the output. I did use the OPENSSL_CONF environment variable to point to the openssl.cnf file, but it got a parsing error. Since I didn't know how to deal with .ovpn file or how to share the file I didn't pursue it further.
For a Windows/Android guy, Apple software is a pain!