<!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=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<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: -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: -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 style="color: #777777;">
<a href="https://gitlab.com/juxeii" style="color: #1068bf; text-decoration: none;">juxeii</a>
<a href="https://gitlab.com/gnutls/gnutls/-/issues/1365#note_951469861" style="color: #1068bf; text-decoration: none;">commented</a>:
</p>
<div class="md" style="color: #303030; word-wrap: break-word;">
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial"><a href="https://gitlab.com/dwmw2" data-user="274866" data-reference-type="user" data-container="body" data-placement="top" class="gfm gfm-project_member js-user-link" title="David Woodhouse" style="color: #1068bf; background-color: #cbe2f9; border-radius: 4px; margin-top: 0; text-decoration: none; padding: 0 2px;">@dwmw2</a> I am really sorry! Something went wrong in the other thread. Your provided patched DLL <a href="http://david.woodhou.se/libgnutls-30.dll" rel="nofollow noreferrer noopener" target="_blank" style="color: #1068bf; text-decoration: none;">http://david.woodhou.se/libgnutls-30.dll</a> 7fd09cf4eb3c44b7960197f9d0fdf7de4a6620363d49dfdf1208c18c54cf592e <strong style="font-weight: bold;">does work</strong>.</p>
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial">I can now see all certificates for <code style='font-size: 90%; color: #1f1f1f; word-wrap: break-word; background-color: #f0f0f0; border-radius: 4px; margin-top: 0; font-weight: inherit; font-family: "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;'>CERT_SYSTEM_STORE_LOCAL_MACHINE</code>.</p>
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial">And so I tried to connect(GNUTLS_DEBUG_LEVEL=6):</p>
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial"><code style='font-size: 90%; color: #1f1f1f; word-wrap: break-word; background-color: #f0f0f0; border-radius: 4px; margin-top: 0; font-weight: inherit; font-family: "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;'>C:\data\OpenConnect>openconnect --protocol=anyconnect --verbose --timestamp -c system:win:id=468652b4198f2d11b68c6414a20f9e74e09adedf;type=cert -k system:win:id=468652b4198f2d11b68c6414a20f9e74e09adedf;type=privkey --passwd-on-stdin myserver.com</code></p>
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial">Log is</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: 13px; color: #303030; line-height: 1.6em; overflow-x: auto; border-radius: 2px; position: relative; font-family: "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: #fafafa; margin: 0 0 16px; padding: 12px; border: 1px solid #dbdbdb;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: 4px; white-space: pre; margin-top: 0; font-family: "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;">gnutls[1]: There was a non-CA certificate in the trusted list: OU=Copyright (c) 1997 Microsoft Corp.,OU=Microsoft Corporation,CN=Microsoft Root Authority.</span>
<span id="LC2" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/verify-high.c[gnutls_x509_trust_list_add_cas]:396</span>
<span id="LC3" class="line" lang="plaintext">gnutls[1]: There was a non-CA certificate in the trusted list: C=US,O=MSFT,CN=Microsoft Authenticode(tm) Root Authority.</span>
<span id="LC4" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/verify-high.c[gnutls_x509_trust_list_add_cas]:396</span>
<span id="LC5" class="line" lang="plaintext">gnutls[1]: There was a non-CA certificate in the trusted list: CN=WSUS Publishers Self-signed.</span>
<span id="LC6" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/common.c[_gnutls_x509_get_raw_field2]:1560</span>
<span id="LC7" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_subject_unique_id]:3936</span>
<span id="LC8" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_issuer_unique_id]:3986</span>
<span id="LC9" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/common.c[_gnutls_x509_get_raw_field2]:1560</span>
<span id="LC10" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_subject_unique_id]:3936</span>
<span id="LC11" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_issuer_unique_id]:3986</span>
<span id="LC12" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/common.c[_gnutls_x509_get_raw_field2]:1560</span>
<span id="LC13" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_subject_unique_id]:3936</span>
<span id="LC14" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_issuer_unique_id]:3986</span>
<span id="LC15" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../../lib/x509/verify-high.c[gnutls_x509_trust_list_add_cas]:396</span>
<span id="LC16" class="line" lang="plaintext">gnutls[1]: There was a non-CA certificate in the trusted list: CN=Root Agency.</span>
<span id="LC17" class="line" lang="plaintext">[2022-05-18 16:09:19] Using system certificate system:win:id=468652b4198f2d11b68c6414a20f9e74e09adedf;type=cert</span>
<span id="LC18" class="line" lang="plaintext">[2022-05-18 16:09:19] Using system key system:win:id=468652b4198f2d11b68c6414a20f9e74e09adedf;type=privkey</span>
<span id="LC19" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../lib/system/keys-win.c[privkey_import_ncrypt]:713</span>
<span id="LC20" class="line" lang="plaintext">gnutls[3]: ASSERT: ../../lib/system/keys-win.c[_gnutls_privkey_import_system_url]:866</span>
<span id="LC21" class="line" lang="plaintext">[2022-05-18 16:09:19] Error importing system key system:win:id=468652b4198f2d11b68c6414a20f9e74e09adedf;type=privkey: The requested data were not available.</span>
<span id="LC22" class="line" lang="plaintext">[2022-05-18 16:09:19] Loading certificate failed. Aborting.</span></code></pre>
<copy-code></copy-code>
</div>
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial">I guess it should now work since you patched the DLL which is used in openconnect?!</p>
<p dir="auto" style="color: #303030; margin: 0;" align="initial">I tried different argument permutations with and without <code style='font-size: 90%; color: #1f1f1f; word-wrap: break-word; background-color: #f0f0f0; border-radius: 4px; margin-top: 0; font-weight: inherit; font-family: "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;'>-k</code>, always same failure. Does it make any difference if the private key is exportable or not?</p>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1365#note_951469861" style="color: #1068bf; text-decoration: none;">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/ac597dacbc877ba9f95e0488b31c8507/unsubscribe" style="color: #1068bf; text-decoration: none;">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/1365#note_951469861"}}</script>


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