<!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, "GitLab Mono"), JetBrains Mono, 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, "GitLab Sans"),-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, "GitLab Sans"),-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/jjelen">Jakub Jelen</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1515">#1515</a>
</p>
<div class="md" style="color: #333238; word-wrap: break-word;">
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-color: #e6e6ea; border-bottom-style: solid; color: #333238; margin: 0 0 16px;" align="initial">
<a id="user-content-description-of-problem" class="anchor" href="#description-of-problem" aria-hidden="true" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Description of problem:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">This works fine with 3.8.1, but stopped working with macos updating the gnutls package. Reproducible also in Fedora rawhide</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Logs:
<a href="https://github.com/latchset/pkcs11-provider/actions/runs/7029081189/job/19126109458?pr=309" rel="nofollow noreferrer noopener" target="_blank" style="margin-top: 0;">https://github.com/latchset/pkcs11-provider/actions/runs/7029081189/job/19126109458?pr=309</a></p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-color: #e6e6ea; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a id="user-content-version-of-gnutls-used" class="anchor" href="#version-of-gnutls-used" aria-hidden="true" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Version of gnutls used:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">3.8.2</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-color: #e6e6ea; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a id="user-content-distributor-of-gnutls-eg-ubuntu-fedora-rhel" class="anchor" href="#distributor-of-gnutls-eg-ubuntu-fedora-rhel" aria-hidden="true" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Fedora/Brew</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-color: #e6e6ea; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a id="user-content-how-reproducible" class="anchor" href="#how-reproducible" aria-hidden="true" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>How reproducible:</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">deterministic, with Fedora rawhide in podman container</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Steps to Reproduce:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true" style='display: block; font-size: 14px; color: #333238; line-height: 1.6em; overflow-x: auto; border-radius: 4px; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","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, "GitLab Mono"),"JetBrains Mono","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="plaintext" style="margin-top: 0;">podman run -ti fedora:rawhide</span>
<span id="LC2" class="line" lang="plaintext"># in container</span>
<span id="LC3" class="line" lang="plaintext">dnf install -y softhsm opensc p11-kit-devel p11-kit-server gnutls-utils</span>
<span id="LC4" class="line" lang="plaintext">PINVALUE="12345678"               </span>
<span id="LC5" class="line" lang="plaintext">TOKDIR="tokens"</span>
<span id="LC6" class="line" lang="plaintext">mkdir ${TOKDIR}</span>
<span id="LC7" class="line" lang="plaintext">cat >"$TMPPDIR/softhsm.conf" <<EOF</span>
<span id="LC8" class="line" lang="plaintext">directories.tokendir = $PWD/$TOKDIR</span>
<span id="LC9" class="line" lang="plaintext">objectstore.backend = file</span>
<span id="LC10" class="line" lang="plaintext">log.level = DEBUG</span>
<span id="LC11" class="line" lang="plaintext">EOF</span>
<span id="LC12" class="line" lang="plaintext">export SOFTHSM2_CONF=$TMPPDIR/softhsm.conf</span>
<span id="LC13" class="line" lang="plaintext">cat >> ${TMPPDIR}/cert.cfg <<HEREDOC</span>
<span id="LC14" class="line" lang="plaintext">ca</span>
<span id="LC15" class="line" lang="plaintext">cn = "Issuer"</span>
<span id="LC16" class="line" lang="plaintext">serial = 1</span>
<span id="LC17" class="line" lang="plaintext">expiration_days = 365</span>
<span id="LC18" class="line" lang="plaintext">email = "testcert@example.org"</span>
<span id="LC19" class="line" lang="plaintext">signing_key</span>
<span id="LC20" class="line" lang="plaintext">encryption_key</span>
<span id="LC21" class="line" lang="plaintext">HEREDOC</span>
<span id="LC22" class="line" lang="plaintext">export GNUTLS_PIN=$PINVALUE</span>
<span id="LC23" class="line" lang="plaintext">softhsm2-util --init-token --label "token_name" --free --pin $PINVALUE --so-pin $PINVALUE</span>
<span id="LC24" class="line" lang="plaintext">pkcs11-tool --keypairgen --key-type="EC:edwards25519" --login --pin=$PINVALUE --module=/usr/lib64/pkcs11/libsofthsm2.so --label="${EDCRTN}" --id="$KEYID"</span>
<span id="LC25" class="line" lang="plaintext">certtool -d9999 --generate-self-signed --outfile="cacert.crt" --template=cert.cfg --provider=/usr/lib64/pkcs11/libsofthsm2.so --load-privkey "pkcs11:object=edCert;type=private"  --load-pubkey "pkcs11:object=edCert;type=public" --outder</span></code></pre>
<copy-code></copy-code>
</div>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-color: #e6e6ea; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a id="user-content-actual-results" class="anchor" href="#actual-results" aria-hidden="true" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Actual results:</h2>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true" style='display: block; font-size: 14px; color: #333238; line-height: 1.6em; overflow-x: auto; border-radius: 4px; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","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, "GitLab Mono"),"JetBrains Mono","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="plaintext" style="margin-top: 0;">Setting log level to 9999</span>
<span id="LC2" class="line" lang="plaintext">|<2>| p11: Initializing module: /usr/lib64/pkcs11/libsofthsm2.so</span>
<span id="LC3" class="line" lang="plaintext">Generating a self signed certificate...</span>
<span id="LC4" class="line" lang="plaintext">|<2>| p11: Login result = ok (0)</span>
<span id="LC5" class="line" lang="plaintext">|<3>| ASSERT: ../../../lib/x509/key_decode.c[_gnutls_x509_read_ecc_params]:257</span>
<span id="LC6" class="line" lang="plaintext">|<2>| Cannot determine PKCS #11 key algorithm</span>
<span id="LC7" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/privkey.c[_gnutls_privkey_import_pkcs11_url]:607</span>
<span id="LC8" class="line" lang="plaintext">error importing key at pkcs11:object=edCert;type=private: The specified algorithm or protocol is unknown.</span></code></pre>
<copy-code></copy-code>
</div>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-color: #e6e6ea; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a id="user-content-expected-results" class="anchor" href="#expected-results" aria-hidden="true" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Expected results:</h2>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">The Ed25519 key is imported and self-signed certificate is created</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/1515">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/647408875564593a8f526685ccfdfe32/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/1515"}}</script>


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