<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "Menlo"), DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, -apple-system),BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: var(--default-regular-font, -apple-system),BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<p class="details" style="font-style: italic; color: #737278;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1467">#1467</a>
</p>
<div class="md" style="color: #333238; word-wrap: break-word;">
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">If there are multiple key objects with same label in a token, <code style='font-size: 0.875rem; color: #1f1e24; word-wrap: break-word; background-color: #ececef; border-radius: 4px; margin-top: 0; font-weight: inherit; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>p11tool --list-all</code> prints information of one of them, repeatedly:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre lang="console" class="code highlight js-syntax-highlight language-console" v-pre="true" style='display: block; font-size: 0.875rem; color: #333238; line-height: 1.6em; overflow-x: auto; border-radius: 4px; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 16px; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: 0.875rem; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: 4px; white-space: pre; margin-top: 0; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="console" style="margin-top: 0;"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span><span class="nb">mkdir </span>t</span>
<span id="LC2" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span><span class="nb">cd </span>t</span>
<span id="LC3" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span><span class="nb">echo</span> <span class="s1">'directories.tokendir = .'</span> <span class="o">></span> softhsm2.conf</span>
<span id="LC4" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span><span class="nb">export </span><span class="nv">SOFTHSM2_CONF</span><span class="o">=</span>softhsm2.conf</span>
<span id="LC5" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span>softhsm2-util <span class="nt">--init-token</span> <span class="nt">--slot</span> 0 <span class="nt">--so-pin</span> 1234 <span class="nt">--pin</span> 123456 <span class="nt">--label</span> Token1</span>
<span id="LC6" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span>pkcs11-tool <span class="nt">--module</span> /usr/lib64/pkcs11/libsofthsm2.so <span class="nt">--keypairgen</span> <span class="nt">--token-label</span> Token1 <span class="nt">--pin</span> 123456 <span class="nt">-v</span> <span class="nt">--key-type</span> rsa:1024</span>
<span id="LC7" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span>pkcs11-tool <span class="nt">--module</span> /usr/lib64/pkcs11/libsofthsm2.so <span class="nt">--keypairgen</span> <span class="nt">--token-label</span> Token1 <span class="nt">--pin</span> 123456 <span class="nt">-v</span> <span class="nt">--key-type</span> EC:prime256v1</span>
<span id="LC8" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span>pkcs11-tool <span class="nt">--module</span> /usr/lib64/pkcs11/libsofthsm2.so <span class="nt">--keypairgen</span> <span class="nt">--token-label</span> Token1 <span class="nt">--label</span> OpenDNSSEC1 <span class="nt">--pin</span> 123456 <span class="nt">-v</span> <span class="nt">--key-type</span> rsa:1024</span>
<span id="LC9" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span>pkcs11-tool <span class="nt">--module</span> /usr/lib64/pkcs11/libsofthsm2.so <span class="nt">--keypairgen</span> <span class="nt">--token-label</span> Token1 <span class="nt">--label</span> OpenDNSSEC1 <span class="nt">--pin</span> 123456 <span class="nt">-v</span> <span class="nt">--key-type</span> EC:prime256v1</span>
<span id="LC10" class="line" lang="console"><span class="gp" style="margin-top: 0;">$</span><span class="w"> </span>p11tool <span class="nt">--list-all</span> pkcs11:model<span class="o">=</span>SoftHSM%20v2</span>
<span id="LC11" class="line" lang="console"><span class="go" style="margin-top: 0;">Object 0:</span></span>
<span id="LC12" class="line" lang="console"><span class="gp" style="margin-top: 0;">      URL: pkcs11:model=SoftHSM%20v2;</span><span class="nv">manufacturer</span><span class="o">=</span>SoftHSM%20project<span class="p">;</span><span class="nv">serial</span><span class="o">=</span>87b4e2263f5f82a4<span class="p">;</span><span class="nv">token</span><span class="o">=</span>Token1<span class="p">;</span><span class="nv">object</span><span class="o">=</span>OpenDNSSEC1<span class="p">;</span><span class="nb">type</span><span class="o">=</span>public</span>
<span id="LC13" class="line" lang="console"><span class="go" style="margin-top: 0;">      Type: Public key (EC/ECDSA-SECP256R1)</span></span>
<span id="LC14" class="line" lang="console"><span class="go" style="margin-top: 0;">      Label: OpenDNSSEC1</span></span>
<span id="LC15" class="line" lang="console"><span class="gp" style="margin-top: 0;">      Flags: CKA_WRAP/UNWRAP;</span><span class="w"> </span></span>
<span id="LC16" class="line" lang="console"><span class="go" style="margin-top: 0;">      ID: </span></span>
<span id="LC17" class="line" lang="console"></span>
<span id="LC18" class="line" lang="console"><span class="go" style="margin-top: 0;">Object 1:</span></span>
<span id="LC19" class="line" lang="console"><span class="gp" style="margin-top: 0;">      URL: pkcs11:model=SoftHSM%20v2;</span><span class="nv">manufacturer</span><span class="o">=</span>SoftHSM%20project<span class="p">;</span><span class="nv">serial</span><span class="o">=</span>87b4e2263f5f82a4<span class="p">;</span><span class="nv">token</span><span class="o">=</span>Token1<span class="p">;</span><span class="nb">type</span><span class="o">=</span>public</span>
<span id="LC20" class="line" lang="console"><span class="go" style="margin-top: 0;">      Type: Public key</span></span>
<span id="LC21" class="line" lang="console"><span class="go" style="margin-top: 0;">      Label: </span></span>
<span id="LC22" class="line" lang="console"><span class="gp" style="margin-top: 0;">      Flags: CKA_WRAP/UNWRAP;</span><span class="w"> </span></span>
<span id="LC23" class="line" lang="console"><span class="go" style="margin-top: 0;">      ID: </span></span>
<span id="LC24" class="line" lang="console"></span>
<span id="LC25" class="line" lang="console"><span class="go" style="margin-top: 0;">Object 2:</span></span>
<span id="LC26" class="line" lang="console"><span class="gp" style="margin-top: 0;">      URL: pkcs11:model=SoftHSM%20v2;</span><span class="nv">manufacturer</span><span class="o">=</span>SoftHSM%20project<span class="p">;</span><span class="nv">serial</span><span class="o">=</span>87b4e2263f5f82a4<span class="p">;</span><span class="nv">token</span><span class="o">=</span>Token1<span class="p">;</span><span class="nb">type</span><span class="o">=</span>public</span>
<span id="LC27" class="line" lang="console"><span class="go" style="margin-top: 0;">      Type: Public key</span></span>
<span id="LC28" class="line" lang="console"><span class="go" style="margin-top: 0;">      Label: </span></span>
<span id="LC29" class="line" lang="console"><span class="gp" style="margin-top: 0;">      Flags: CKA_WRAP/UNWRAP;</span><span class="w"> </span></span>
<span id="LC30" class="line" lang="console"><span class="go" style="margin-top: 0;">      ID: </span></span>
<span id="LC31" class="line" lang="console"></span>
<span id="LC32" class="line" lang="console"><span class="go" style="margin-top: 0;">Object 3:</span></span>
<span id="LC33" class="line" lang="console"><span class="gp" style="margin-top: 0;">      URL: pkcs11:model=SoftHSM%20v2;</span><span class="nv">manufacturer</span><span class="o">=</span>SoftHSM%20project<span class="p">;</span><span class="nv">serial</span><span class="o">=</span>87b4e2263f5f82a4<span class="p">;</span><span class="nv">token</span><span class="o">=</span>Token1<span class="p">;</span><span class="nv">object</span><span class="o">=</span>OpenDNSSEC1<span class="p">;</span><span class="nb">type</span><span class="o">=</span>public</span>
<span id="LC34" class="line" lang="console"><span class="go" style="margin-top: 0;">      Type: Public key (EC/ECDSA-SECP256R1)</span></span>
<span id="LC35" class="line" lang="console"><span class="go" style="margin-top: 0;">      Label: OpenDNSSEC1</span></span>
<span id="LC36" class="line" lang="console"><span class="gp" style="margin-top: 0;">      Flags: CKA_WRAP/UNWRAP;</span><span class="w"> </span></span>
<span id="LC37" class="line" lang="console"><span class="go" style="margin-top: 0;">      ID: </span></span>
<span id="LC38" class="line" lang="console"></span></code></pre>
<copy-code></copy-code>
</div>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">Originally reported by <a href="https://gitlab.com/mhavrila" data-reference-type="user" data-user="8130335" data-container="body" data-placement="top" class="gfm gfm-project_member js-user-link" title="Marek Havrila" style="background-color: #cbe2f9; border-radius: 4px; color: #0b5cad; margin-top: 0; padding: 0 2px;">@mhavrila</a>.</p>
</div>

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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1467">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/b271a10adf455ca142ef6788a9c518a1/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/1467"}}</script>


</p>
</div>
</body>
</html>