<div dir="ltr">Hi all,<div>  I am trying to use TLS to setup a connection to a gateway programmatically.</div><div><br></div><div>Used the code below.  </div><div>------------------------</div><div><br></div><div><br></div><div><br></div><div>    private_key_t *key;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>char path[512]="/system/etc/user1_private.pem";</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                                                                               </span> BUILD_FROM_FILE, path, BUILD_END);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>if (!key) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>DBG1(DBG_DMN, "Parsing private key failed");<span class="gmail-Apple-tab-span" style="white-space:pre">                </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>} </div><div><br><div><br></div><div>----------------------------------</div><div>On running, I do not see "Parsing private key failed". But I see the print as below<br></div><div><br></div><div><br></div><div><div>10-05 15:31:37.266  4630  4650 D     : 08[ASN]   file content is not binary ASN.1</div><div>10-05 15:31:37.266  4630  4650 D     : 08[ASN]   -----BEGIN RSA PRIVATE KEY---</div><div>10-05 15:31:37.266  4630  4650 D     : 08[ASN]   -----END RSA PRIVATE KEY-----</div></div><div><br></div><div>My private key file is below. Can you help me find the issue</div><div><br></div><div><div>-----BEGIN RSA PRIVATE KEY-----</div><div>MIIEpAIBAAKCAQEAsVqa9nZctF/gxA26RTN3oSs6MbNiJYFP6jKpVJRAjflB17rC</div><div>7Pg6bf5NBr4SdgR0YyklI17wvzwEWxCDjJZHAw/CxeN/icSCsN6VehHoJ6ROhPOo</div><div>jdRs2MsyYyut8OZiSoG/jHVmLQWVgJIZvSOxxCGDj+xYqEbd6YhO8ejPrrh4v3/r</div><div>NJW6glu6PbbrgNfwtozMeNOQrXnETmSLBNJ5RlM+sntzivq6t8QJzDcjmf2OV3Xk</div><div>GwvNaLeOvoq55dbPf1wpuVyaU3npZphQe4EDsrX3p05DhYEW6rwUXc9iyF98D/HR</div><div>JTEnCN+Ri/pwXWyuUlEN/1Bq09nU/L6KfAQ8HwIDAQABAoIBADnNvhP2H+DqHufH</div><div>UZ6cV7E/1Ye9X4+5xcIfIPFgIGolg0A8rqttfB29dH1uFbZBXW20S1Zr6yto9EJ5</div><div>72Yy1JI64NB+hWLxmWbsJOvUSkYhVzYd9CHFynQeRh3sbpTFgeOmxjeRS+wAlemB</div><div>tMHgkF/MTITsEzlFX65trs1Jg+b9zc7wJs5ZeebBqw9m+Kn687MBDhOmx4uij59S</div><div>xP0ok2FnDlXNIEX1yLJpzSVPtEhhrFhcrFCq7LESUitZULoWD0v9VLaUVNe3n9yH</div><div>KPDRqu4lH5Y3bloI+Bx/hiZmxBCTV+kTF+4+PZJq1WzB6PCqmxNhN9zn+O7DDTzB</div><div>TSI/QoECgYEA34MnKE93DCNj4qL85NMCyCqo2ynsicqPBOtt1pZGXquYMbffefGx</div><div>kBl7BIpDfnn6077hWbTJzTeTO2gEXKcncQPWnDWCwIiCBbmgiec3k6WG+/Fki4mq</div><div>J+E1kO9eLn5Qw3uUzMNaey9P4kIore2zg7Ds42xHoNi7c3537evi6KsCgYEAyyHo</div><div>gz+gmIHr7mk6aKg6b4WydJuMYcB4g+sVt+JmUhhmfNAXx4MpKJo6c7jhgStAzXXD</div><div>d0FaYs4DfuU/ptcNmkmDPkVrpLj8NYHt7i2RZhULiObrY8iNRaW39LDUBvIkeuAr</div><div>JbuCJ7gYH8K7cnEF6/LvDsqllDUUEt+1I4UNIl0CgYEAkFyseOvCb3OYOzScdMsZ</div><div>W+G5yDxuy5yp/Tp2aggLkW/xUAN78s45qmHaw9btuw3cBNGfyYnsYYDItrD7SECq</div><div>R+N7xM8HEYXZvQrk9s0BZ3qdEbMbBsk2vqVGLMN+KDdrwKbcN9jhYvju9qtWjOgf</div><div>bypiBo3UQb5abEE+Asy9dRsCgYEAvDiBMAxnDKlmKhWLL6qh6vBheTcgjvs/ME1G</div><div>ZIr98Jf3bzOKtS3Nl3fBLbVkDsI7W6YBJqGB1Qe7qXtWzYt7aTkwySSeJ5XY7OOl</div><div>ygqjLYnWlFYUSvNsI9r4Z1zqOj1onArXMDFc2tz0TYmtEs+zgvwpkvUnE/tSzGJJ</div><div>f84ra2kCgYAY/qErTWgqRkc95A1qCyqsl/oU1swLMDmqe6F4rceFvdXuHkIyWGzL</div><div>Op8l/Nj1YzDRiGcQEyEooaGrgS1rvas2Q+nzxHMFBypVQsZE4y6F1qJ5dyr0xRGE</div><div>XeWrqWY/8UjLZzgDktjghg7DCoQEjI+c0rUs8ld6fFv4iK9ecI0Gng==</div><div>-----END RSA PRIVATE KEY-----</div></div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><font color="#666666">Regards,</font></div>
<div><font color="#666666">RaviKanth VN Vanapalli</font></div><div><br></div></div></div>
</div></div>