<div dir="ltr">Hi,<div> I am using EAP-TLS authentication.</div><div> Tried to load the private key using the function below</div><div><br></div><div><div>METHOD(charonservice_t, get_user_key, private_key_t*,<br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>private_charonservice_t *this, public_key_t *pubkey)</div><div>{</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.der";</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><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>return key;</div><div>}</div><div><br></div><div><br></div><div>Is the call to this API equivalent to the call to the API android_private_key_create() in file android_private_key.c</div><div><br></div><div>I understand that the second function gets the certificate via the JNI and first function reads directly from the file.</div><div>The return type seems to the same, i.e private_key_t. </div><div><br></div><div>Can we treat these functions functionally equivalent ?</div><div>I am currently working in android and would like direct access to the private key file instead of reading from the JNI.</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>