<div dir="ltr">Hi Tobias/Andreas,<div><br></div><div style>Sorry for spamming.</div><div><br></div><div style>After trying the below command:</div><div style><span style="font-family:arial,sans-serif;font-size:13px"> openssl rsa -in defaultPrivateKey.pem -out defaultPrivateKey1.pem</span><br>
</div><div style><span style="font-family:arial,sans-serif;font-size:13px"> </span></div><div style><font face="arial, sans-serif">sizes for both the files are same:</font></div><div style><font face="arial, sans-serif"><br>
</font></div><div style><font face="arial, sans-serif">And cat on the two files:</font></div><div style><font face="arial, sans-serif"><br></font></div><div style><font face="arial, sans-serif"><div># cat defaultPrivateKey.pem </div>
<div>-----BEGIN RSA PRIVATE KEY-----</div><div>MIIEowIBAAKCAQEAsqGsl3jjjMuaxLanT+ehiZzT9vVJdTkpO1vAUvWOsmW9HZXC</div><div>+DVoYOMWz5OMwWSkdRVLIymFHDaIBN9xuf5rhEoj8y1hPAnjBn+lq1x+NFvfZKSI</div><div>aNtOFrCCZSxtzghdlEAlwPxRmCU6njgykM3mtKMYxB8y3UsaWGggIID3gbomeftp</div>
<div>H/oRPndasTmIXhTNCRpHbl69hfSPn1TAwF5OuLghvL+8+Q5U62IYA691oUZM7/kk</div><div>yA7gL6ohWldum6Wu5apqRHDuZ65JRd4yfHA1kp/pd/dEyHYPKZ+GyU8sn7PXGLaQ</div><div>6Z9H53b7hb53GxgE/m+RIn6FBEuifZpiAR4qEQIDAQABAoIBAQCWa8RdjSP4xN8g</div>
<div>NTsw8zm5GwH3HNhtyOOqo3mRokw2d6vHxPv4bWjm5XOo+nP1yp0eJv8treH0PwtN</div><div>JyeqWs8JCDG7rgQKPb0aFNVaNrnjt1Wnd1GTEtFwE9TKA563d53toBLqrs660ubI</div><div>o0QZYfmbNRg+1pLLfFnEBnK/TDqf1svQfoDjG/EHKCZIsnpyiBrLchRS1HfCFrcy</div>
<div>6T1SmAAX48PqiBZmZ6Nvmd7lpxOozIfCe7FhV0MgbXMpYXfY8RqT5/YD5LeL/ZFj</div><div>Htvj3e7wm0TEK1Rsd4SLlEmi6XjddYS7AiRmkmPsuMHeT+XGy+vzr3lNHhIFJUOS</div><div>2MeQ54BRAoGBAOAo7Q5qwF5zGUmwFrq4g/SI7BIQcGNMWEF7XjattejWADtu3vh5</div>
<div>erHlxtQCDysaWwPsvWcDkIQwPWnQlX2R83dJO0KlcxIMiKPYDWt9MxiGjwRtw2Ch</div><div>Su28YNejFLfCvB2SsQgxuG9YCoxyauxvugDTOZNz9toCxYLIBfA9+IvFAoGBAMwB</div><div>NkdKs43A2uvunBtH/WopCE5dndkzGaTAtIYctWIkg+/eNELcY5zA+XQhlmBp0IWC</div>
<div>7pu/IzD+PTaSXA3x3yQvEDaeb6z46nVV6lnQw3/n+uHJOhmL1bPuw8wkB3C3Zq7r</div><div>5iHeae9060mmSKUQwPGl4sya/V3w5bF0VEiZao3dAoGAeaX8MCzCxP8VpCXJz/8+</div><div>rUB5TLxbIahW5QJ8eJQA+qDYc2iR3KqgaVbXdkq/zJZ6+kBJ8VO/490CFyC5X/IK</div>
<div>/Jtja6G6NvtSVAh2D/Vb+11a0/51X0VpEmd+7sd0AN3PlQT8ygOhodtXriyR1koz</div><div>2SrIPjtapamHYpgGkQAwmDkCgYAtaBuntJXQeFuB5gMzA0wBZA6oOqgWnwwXIplL</div><div>vHoW1R/UtPWW6Cz3x+/+DDfHT+YMwX7QhbOUhRIk4mDA7dQH3r3SGmOq8WBmK3BU</div>
<div>+2V4Q68QsFRROVGgkgVcm6xYR0oApxr68OFNXg28v9ktfFQltRGNDvZUAXlujQDx</div><div>g8w2tQKBgBRqVxD2XxFdEW2Tu3SzDTt8dTs++RxnZC6Ldwr3Okbi6/LsZ0Mxj00N</div><div>xXDTJ5Sx544XZgfvazKWZQ94JsSlb+91HyXePqD+VX1qwBHDAGQl6ybKdU4xAsAK</div>
<div>eEK77/miWSPnPamIUYbqEzBxvjSzChjACJS1o4ma5AmRLVteYQ/q</div><div>-----END RSA PRIVATE KEY-----</div><div><br></div><div><br></div><div><br></div><div># cat defaultPrivateKey1.pem </div><div>-----BEGIN RSA PRIVATE KEY-----</div>
<div>MIIEowIBAAKCAQEAsqGsl3jjjMuaxLanT+ehiZzT9vVJdTkpO1vAUvWOsmW9HZXC</div><div>+DVoYOMWz5OMwWSkdRVLIymFHDaIBN9xuf5rhEoj8y1hPAnjBn+lq1x+NFvfZKSI</div><div>aNtOFrCCZSxtzghdlEAlwPxRmCU6njgykM3mtKMYxB8y3UsaWGggIID3gbomeftp</div>
<div>H/oRPndasTmIXhTNCRpHbl69hfSPn1TAwF5OuLghvL+8+Q5U62IYA691oUZM7/kk</div><div>yA7gL6ohWldum6Wu5apqRHDuZ65JRd4yfHA1kp/pd/dEyHYPKZ+GyU8sn7PXGLaQ</div><div>6Z9H53b7hb53GxgE/m+RIn6FBEuifZpiAR4qEQIDAQABAoIBAQCWa8RdjSP4xN8g</div>
<div>NTsw8zm5GwH3HNhtyOOqo3mRokw2d6vHxPv4bWjm5XOo+nP1yp0eJv8treH0PwtN</div><div>JyeqWs8JCDG7rgQKPb0aFNVaNrnjt1Wnd1GTEtFwE9TKA563d53toBLqrs660ubI</div><div>o0QZYfmbNRg+1pLLfFnEBnK/TDqf1svQfoDjG/EHKCZIsnpyiBrLchRS1HfCFrcy</div>
<div>6T1SmAAX48PqiBZmZ6Nvmd7lpxOozIfCe7FhV0MgbXMpYXfY8RqT5/YD5LeL/ZFj</div><div>Htvj3e7wm0TEK1Rsd4SLlEmi6XjddYS7AiRmkmPsuMHeT+XGy+vzr3lNHhIFJUOS</div><div>2MeQ54BRAoGBAOAo7Q5qwF5zGUmwFrq4g/SI7BIQcGNMWEF7XjattejWADtu3vh5</div>
<div>erHlxtQCDysaWwPsvWcDkIQwPWnQlX2R83dJO0KlcxIMiKPYDWt9MxiGjwRtw2Ch</div><div>Su28YNejFLfCvB2SsQgxuG9YCoxyauxvugDTOZNz9toCxYLIBfA9+IvFAoGBAMwB</div><div>NkdKs43A2uvunBtH/WopCE5dndkzGaTAtIYctWIkg+/eNELcY5zA+XQhlmBp0IWC</div>
<div>7pu/IzD+PTaSXA3x3yQvEDaeb6z46nVV6lnQw3/n+uHJOhmL1bPuw8wkB3C3Zq7r</div><div>5iHeae9060mmSKUQwPGl4sya/V3w5bF0VEiZao3dAoGAeaX8MCzCxP8VpCXJz/8+</div><div>rUB5TLxbIahW5QJ8eJQA+qDYc2iR3KqgaVbXdkq/zJZ6+kBJ8VO/490CFyC5X/IK</div>
<div>/Jtja6G6NvtSVAh2D/Vb+11a0/51X0VpEmd+7sd0AN3PlQT8ygOhodtXriyR1koz</div><div>2SrIPjtapamHYpgGkQAwmDkCgYAtaBuntJXQeFuB5gMzA0wBZA6oOqgWnwwXIplL</div><div>vHoW1R/UtPWW6Cz3x+/+DDfHT+YMwX7QhbOUhRIk4mDA7dQH3r3SGmOq8WBmK3BU</div>
<div>+2V4Q68QsFRROVGgkgVcm6xYR0oApxr68OFNXg28v9ktfFQltRGNDvZUAXlujQDx</div><div>g8w2tQKBgBRqVxD2XxFdEW2Tu3SzDTt8dTs++RxnZC6Ldwr3Okbi6/LsZ0Mxj00N</div><div>xXDTJ5Sx544XZgfvazKWZQ94JsSlb+91HyXePqD+VX1qwBHDAGQl6ybKdU4xAsAK</div>
<div>eEK77/miWSPnPamIUYbqEzBxvjSzChjACJS1o4ma5AmRLVteYQ/q</div></font></div><div style><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">-rw-r--r-- 1 root root   1675 Jun  3 12:36 defaultPrivateKey.pem</font></div>
<div><font face="arial, sans-serif">-rw-r--r-- 1 root root   1675 Jun  3 12:49 defaultPrivateKey1.pem</font></div></div><div style><br></div><div style>Still I am getting the same error. Is anything I am doing wrong.</div>
<div style><br></div><div style><br></div><div class="gmail_extra">-Bhargav<br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 3:17 PM, Tobias Brunner <span dir="ltr"><<a href="mailto:tobias@strongswan.org" target="_blank">tobias@strongswan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bhargav,<br>
<div class="im"><br>
> openssl pkcs8 -nocrypt -in key8.pem -out key1.pem<br>
<br>
</div>Unfortunately, this command produces another PKCS#8 encoded file.<br>
<br>
Please try<br>
<br>
    openssl rsa -in key8.pem -out key1.pem<br>
<br>
to export the RSA key in PKCS#1 format.<br>
<br>
Regards,<br>
Tobias<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>
</div></div>