<!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=utf-8" 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: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "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,.01) 0 0 1px; font-family: "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: #626168;">
<a href="https://gitlab.com/alavrentiev">alavrentiev</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1739">#1739</a>
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Please consider the following retrieval command:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">$ curl -vi -X POST -d 'qdata=<?xml version="1.0" encoding="utf-8"?><query_batch version="2.0" xmlns="http://www.crossref.org/qschema/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><head><doi_batch_id>SCVBID:1426270910:2452:2</doi_batch_id></head><body><query><doi>10.1002/cne.23771</doi></query></body></query_batch>' "https://doi.crossref.org/servlet/query?format=unixref&pid=noreply%40ncbi.nlm.nih.gov"</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">It runs without issues, yet when the retrieval is done with GNUTLS using socket I/O callbacks, it triggers an error when the remote closes the sending end of the connection:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;"> </doi_record></span>
<span id="LC2" class="line" lang="plaintext">09/18/25 14:52:53 SSOCK#1000[3]@18.205.36.254:443: EOF hit at offset 24398</span>
<span id="LC3" class="line" lang="plaintext">09/18/25 14:52:53 GNUTLS10: READ: Got 0 bytes from 0x1693330</span>
<span id="LC4" class="line" lang="plaintext">09/18/25 14:52:53 GNUTLS10: READ: read 0 bytes from 0x1693330</span>
<span id="LC5" class="line" lang="plaintext">09/18/25 14:52:53 TRACE: GNUTLS error -110(fatal) -> CONNECT GNUTLS status Unknown</span>
<span id="LC6" class="line" lang="plaintext">09/18/25 14:52:53 TRACE: SSOCK#1000[3]@18.205.36.254:443: The TLS connection was non-properly terminated while reading at offset 24398</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">When the same code is used with mbedTLS and its callbacks, it completes successfully, just as <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; white-space: break-spaces; overflow-wrap: break-word; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;'>curl</code> does:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;"> </doi_record></span>
<span id="LC2" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => read</span>
<span id="LC3" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => read record</span>
<span id="LC4" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => fetch input</span>
<span id="LC5" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: in_left: 0, nb_want: 5</span>
<span id="LC6" class="line" lang="plaintext">09/18/25 14:44:28 SSOCK#1000[3]@18.205.36.254:443: EOF hit at offset 24398</span>
<span id="LC7" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: in_left: 0, nb_want: 5</span>
<span id="LC8" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: ssl->f_recv(_timeout)() returned 0 (-0x0000)</span>
<span id="LC9" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS1: 0x26d0760: mbedtls_ssl_fetch_input() returned -29312 (-0x7280)</span>
<span id="LC10" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS1: 0x26d0760: ssl_get_next_record() returned -29312 (-0x7280)</span>
<span id="LC11" class="line" lang="plaintext">09/18/25 14:44:28 TRACE: SSOCK#1000[3]@18.205.36.254:443: Read 0 bytes at offset 24398</span>
<span id="LC12" class="line" lang="plaintext">09/18/25 14:44:28 TRACE: MbedTlsClose(0x26d0760): Enter</span>
<span id="LC13" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => write close notify</span>
<span id="LC14" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => send alert message</span>
<span id="LC15" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS3: 0x26d0760: send alert level=1 message=0</span>
<span id="LC16" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => write record</span>
<span id="LC17" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => encrypt buf</span>
<span id="LC18" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: dumping 'before encrypt: output payload' (2 bytes)</span>
<span id="LC19" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0000: 01 00 ..</span>
<span id="LC20" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS3: 0x26d0760: dumping 'CID' (0 bytes)</span>
<span id="LC21" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: dumping 'IV used (internal)' (12 bytes)</span>
<span id="LC22" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0000: dd 92 25 b2 6b 24 cd 49 32 1e 83 46 ..%.k$.I2..F</span>
<span id="LC23" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: dumping 'IV used (transmitted)' (0 bytes)</span>
<span id="LC24" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: dumping 'additional data used for AEAD' (5 bytes)</span>
<span id="LC25" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0000: 17 03 03 00 20 ....</span>
<span id="LC26" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS3: 0x26d0760: before encrypt: msglen = 16, including 0 bytes of padding</span>
<span id="LC27" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: dumping 'after encrypt: tag' (16 bytes)</span>
<span id="LC28" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0000: 40 2c ca 66 7b 6d e6 19 cc f7 62 17 93 d6 8f 6f @,.f{m....b....o</span>
<span id="LC29" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: <= encrypt buf</span>
<span id="LC30" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS3: 0x26d0760: output record: msgtype = 23, version = [3:3], msglen = 32</span>
<span id="LC31" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: dumping 'output record sent to network' (37 bytes)</span>
<span id="LC32" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0000: 17 03 03 00 20 b3 f3 9b cb ae c2 01 48 c3 45 43 .... .......H.EC</span>
<span id="LC33" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0010: 5f ef 89 a6 c7 40 2c ca 66 7b 6d e6 19 cc f7 62 _....@,.f{m....b</span>
<span id="LC34" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS4: 0x26d0760: 0020: 17 93 d6 8f 6f ....o</span>
<span id="LC35" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => flush output</span>
<span id="LC36" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: message length: 37, out_left: 37</span>
<span id="LC37" class="line" lang="plaintext">09/18/25 14:44:28 SSOCK#1000[3]@18.205.36.254:443: Written at offset 1150</span>
<span id="LC38" class="line" lang="plaintext">#################### [BEGIN] Raw Data (37 bytes):</span>
<span id="LC39" class="line" lang="plaintext">\27\3\3\0 \263\363\233\313\256\302\1H\303EC_\357\211\246\307@,\312f{m\346\31\314\367b\27\223\326\217o\</span>
<span id="LC40" class="line" lang="plaintext">#################### [_END_] Raw Data</span>
<span id="LC41" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: ssl->f_send() returned 37 (-0xffffffdb)</span>
<span id="LC42" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: <= flush output</span>
<span id="LC43" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: <= write record</span>
<span id="LC44" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: <= send alert message</span>
<span id="LC45" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: <= write close notify</span>
<span id="LC46" class="line" lang="plaintext">09/18/25 14:44:28 TRACE: MbedTlsClose(0x26d0760): Leave(0)</span>
<span id="LC47" class="line" lang="plaintext">09/18/25 14:44:28 TRACE: MbedTlsDelete(0x26d0760): Enter</span>
<span id="LC48" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: => free</span>
<span id="LC49" class="line" lang="plaintext">09/18/25 14:44:28 MBEDTLS2: 0x26d0760: <= free</span>
<span id="LC50" class="line" lang="plaintext">09/18/25 14:44:28 TRACE: MbedTlsDelete(0x26d0760): Leave</span>
<span id="LC51" class="line" lang="plaintext">09/18/25 14:44:28 SSOCK#1000[3]@18.205.36.254:443: Closing (in: 24398 bytes, out: 1187 bytes)</span>
<span id="LC52" class="line" lang="plaintext"></doi_records></span>
<span id="LC53" class="line" lang="plaintext">09/18/25 14:44:28 Closing connection</span>
<span id="LC54" class="line" lang="plaintext">09/18/25 14:44:28 Completed successfully</span>
<span id="LC55" class="line" lang="plaintext">09/18/25 14:44:28 TRACE: CORE_SetLOG(0x26cb</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">We think that the remote closing the TCP connection without sending some sort of a TLS message that it's going to do so (an alert?) beforehand somehow upsets GNUTLS, but we don't know much about the intricacies of TLS and would really appreciate if you could take a look as to why GNUTLS can't handle the request above.</p>
<p dir="auto" style="color: #3a383f; margin: 0;" align="initial">Thank you.</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1739">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/1-9e4emgqlsm7f5a4l2ojd9kvly/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>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.com/gnutls/gnutls/-/issues/1739 at 1758221649
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/1739"}}</script>
</p>
</div>
</body>
</html>