Hello,
Our private keys are not exportable we are aware of that, even if they are, we should be able to get a reference to the private key objects right?
We use the following code blocks but private key list is empty. What could be the reason for that?
<span data-scayt_word="ArrayList" data-scaytid="5">ArrayList<<span data-scayt_word="CryptokiAttribute" data-scaytid="16">CryptokiAttribute> template = new <span data-scayt_word="ArrayList" data-scaytid="15">ArrayList<<span data-scayt_word="CryptokiAttribute" data-scaytid="17">CryptokiAttribute>();
template.add(new <span data-scayt_word="CryptokiAttribute" data-scaytid="7">CryptokiAttribute(CryptokiAttribute.CKA_CLASS, CryptokiObject.CKO_PRIVATE_KEY));
List<<span data-scayt_word="CryptokiObject" data-scaytid="26" style="background-color: rgb(195, 206, 213);">CryptokiObject> objects = session.getObjects().find(template, 10);
Are the flags passed while opening a session is important?
Session session = token.openSession(SessionInfo.CKF_SERIAL_SESSION | SessionInfo.CKF_RW_SESSION, null, null);
We login with user passcode
<span data-scayt_word="int" data-scaytid="52">int <span data-scayt_word="nRes" data-scaytid="53">nRes = session.login(Session.CKU_USER, "<span data-scayt_word="xxxxxx" data-scaytid="58">xxxxxx");
Everything goes well up to this point and we could get public keys and certificates but not the private keys