[strongSwan] Issues when loading rsa private key

Sameer Agrawal agrawalsameer at gmail.com
Fri Apr 4 23:47:45 CEST 2014


Hi

I am using strongswan-4.5.2 and seeing some issue with loading rsa
private-key when I try to establish site-to-site connection.
I tried both "openssl" and "ipsec pki tool", however I am seeing the
following error when loading the key.

Using OPENSSL
==============
openssl genrsa -out ssl_r.pem 256

Key generated -> ssl_r.pem file
=================================
-----BEGIN RSA PRIVATE KEY-----
MIGqAgEAAiEAyrDMmSXhTCAbJp1tqwtpDvRVB/MbbEOqdBNJirWuE4UCAwEAAQIg
bxxYLCP9y1NWTubB9Z+9qMCk43rykSB7IbuopABJ0wkCEQD0Ef/I1/d0QugkG9ur
1yTfAhEA1JkGUEWfOr68YkG88PjQGwIQbIl0jgQ8bt8yDJy223wZUQIQUflnO9B8
ozQkg2aBqhDmfQIRANkGT4FW29x0nWvyLn8Kxx0=
-----END RSA PRIVATE KEY-----


Error message from pluto src code:
===========================
loading secrets from "ssl_r.pem"
line 2: unexpected end of id list
line 3: unexpected end of id list
line 4: unexpected end of id list
line 5: unexpected end of id list
line 6: unexpected end of id list
line 6: unexpected end of id list
...
and finally, ike alg: unable to retrieve my private key.


I faced similar issue when using "ipsec pki" tool too. Can you please
let me know what can i do so that the secret key is loaded correctly.

Thanks
Sam


More information about the Users mailing list