<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<div></div>
<p dir="auto">Hi</p>
<p dir="auto">Met following issue when trying to list down the private objects.</p>
<p dir="auto">root@localhost:/greengrass# p11tool --login --list-all-privkeys pkcs11:model=PKCS11-OP-TEE;manufacturer=NXP;serial=1;token=TEE_TOKEN
Token 'TEE_TOKEN' with URL 'pkcs11:model=PKCS11-OP-TEE;manufacturer=NXP;serial=1;token=TEE_TOKEN' requires user PIN
Enter PIN:
Object 0:
URL: pkcs11:model=PKCS11-OP-TEE;manufacturer=NXP;serial=1;token=TEE_TOKEN;id=%00%00;object=iotkey;type=private
Please insert token 'TEE_TOKEN' in slot and press enter</p>
<p dir="auto">On analyzing the code I found at <a href="https://gitlab.com/gnutls/gnutls/blob/master/lib/pkcs11_privkey.c#L217">https://gitlab.com/gnutls/gnutls/blob/master/lib/pkcs11_privkey.c#L217</a></p>
<p dir="auto">we are checking if (count == 1) for success, I was not able to understand why this check was added, because if no object matches with template C_FindObjects will write 0 in count.</p>
<p dir="auto">Please check this and let me know if I am missing something.</p>
<p dir="auto">Thanks
Sahil</p>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/583">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/8252900817ee082d55d24ec0f5a3d1fa/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/issues/583"}}</script>
</p>
</div>
</body>
</html>