<!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;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
started a new
discussion on <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1262#note_351493519">lib/includes/gnutls/abstract.h</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="757" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
757
</td>
<td class="diff-line-num new_line" data-linenumber="757" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
757
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC757" class="line" lang="c">    <span class="p">(</span><span class="n" style="color: #333;">gnutls_certificate_credentials_t</span> <span class="n" style="color: #333;">cred</span><span class="p">,</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="758" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
758
</td>
<td class="diff-line-num new_line" data-linenumber="758" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
758
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC758" class="line" lang="c">     <span class="n" style="color: #333;">gnutls_certificate_retrieve_function3</span> <span class="o" style="font-weight: 600;">*</span><span class="n" style="color: #333;">func</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="759" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
759
</td>
<td class="diff-line-num new_line" data-linenumber="759" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
759
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC759" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="760" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="760" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
760
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC760" class="line" lang="c"><span class="k" style="font-weight: 600;">typedef</span> <span class="kt" style="color: #458; font-weight: 600;">int</span> <span class="n" style="color: #333;">gnutls_trust_list_getissuer_function</span><span class="p">(</span><span class="n" style="color: #333;">gnutls_x509_crt_t</span> <span class="n" style="color: #333;">crt</span><span class="p">,</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="760" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="761" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
761
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC761" class="line" lang="c">                                                 <span class="n" style="color: #333;">gnutls_x509_crt_t</span> <span class="n" style="color: #333;">issuer</span><span class="p">);</span></span>
</pre>
</td>
</tr>

</table>
<div style="">
<p dir="auto">I would suggest changing the signature to:</p>
<pre class="code highlight js-syntax-highlight c" lang="c" v-pre="true" style="background-color: #fff; font-family: monospace; font-size: 90%; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; color: #998; font-style: italic; margin: 0;"><code><span id="LC1" class="line" lang="c"><span class="k" style="font-weight: 600;">typedef</span> <span class="kt" style="color: #458; font-weight: 600;">int</span> <span class="nf" style="color: #900; font-weight: 600;">gnutls_trust_list_getissuer_function</span><span class="p">(</span><span class="k" style="font-weight: 600;">const</span> <span class="n" style="color: #333;">gnutls_x509_trust_list_t</span> <span class="n" style="color: #333;">tlist</span><span class="p">,</span></span>
<span id="LC2" class="line" lang="c">                                                 <span class="k" style="font-weight: 600;">const</span> <span class="n" style="color: #333;">gnutls_x509_crt_t</span> <span class="n" style="color: #333;">issuer</span><span class="p">,</span></span>
<span id="LC3" class="line" lang="c">                                                 <span class="n" style="color: #333;">gnutls_x509_crt_t</span> <span class="n" style="color: #333;">crt</span><span class="p">);</span></span></code></pre>
<p dir="auto">The first argument makes it future proof, if we eventually add <code>gnutls_x509_trust_list_{set,get}_ptr</code> functions for applications. The <code>const</code> serves the documentation that the callback is supposed to set <code>crt</code> using the information of <code>issuer</code>.</p>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1262#note_351493519">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/f8094eecee145a4b4ae4b0a34a486cda/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 Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1262#note_351493519"}}</script>


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