<!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/lumag">Dmitry Eremin-Solenikov</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/1071#note_226764437">src/pkcs11.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="1536" 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">
1536
</td>
<td class="diff-line-num new_line" data-linenumber="1543" 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">
1543
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1543" class="line" lang="c">                           <span class="n" style="color: #333;">str</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">mech_list</span><span class="p">[</span><span class="n" style="color: #333;">mechanism</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="1537" 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="1544" 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">
1544
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1544" class="line" lang="c">                   <span class="k" style="font-weight: 600;">else</span> <span class="k" style="font-weight: 600;">if</span> <span class="p">((</span><span class="n" style="color: #333;">mechanism</span> <span class="o" style="font-weight: 600;">&</span> <span class="mh" style="color: #099;">0xfffff000</span><span class="p">)</span> <span class="o" style="font-weight: 600;">==</span> <span class="mh" style="color: #099;">0xd4321000</span> <span class="o" style="font-weight: 600;">&&</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1537" 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="1545" 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">
1545
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1545" class="line" lang="c">                            <span class="p">((</span><span class="n" style="color: #333;">mechanism</span> <span class="o" style="font-weight: 600;">&</span> <span class="mh" style="color: #099;">0xfff</span><span class="p">)</span> <span class="o" style="font-weight: 600;"><</span> <span class="k" style="font-weight: 600;">sizeof</span><span class="p">(</span><span class="n" style="color: #333;">gost_mech_list</span><span class="p">)</span> <span class="o" style="font-weight: 600;">/</span> <span class="k" style="font-weight: 600;">sizeof</span><span class="p">(</span><span class="n" style="color: #333;">gost_mech_list</span><span class="p">[</span><span class="mi" style="color: #099;">0</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="1537" 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="1546" 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">
1546
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1546" class="line" lang="c">                           <span class="n" style="color: #333;">str</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">gost_mech_list</span><span class="p">[</span><span class="n" style="color: #333;">mechanism</span> <span class="o" style="font-weight: 600;">&</span> <span class="mh" style="color: #099;">0xfff</span><span class="p">];</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="1537" 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">
1537
</td>
<td class="diff-line-num new_line" data-linenumber="1547" 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">
1547
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1547" class="line" lang="c">                   <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">str</span> <span class="o" style="font-weight: 600;">==</span> <span class="nb" style="color: #0086b3;">NULL</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="1538" 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">
1538
</td>
<td class="diff-line-num new_line" data-linenumber="1548" 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">
1548
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1548" class="line" lang="c">                           <span class="n" style="color: #333;">str</span> <span class="o" style="font-weight: 600;">=</span> <span class="s" style="color: #d14;">"UNKNOWN"</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="1539" 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">
1539
</td>
<td class="diff-line-num new_line" data-linenumber="1549" 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">
1549
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1549" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="diff-line-num old old_line" data-linenumber="1540" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
1540
</td>
<td class="diff-line-num new_line old" data-linenumber="1550" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC1540" class="line" lang="c">                   <span class="n" style="color: #333;">fprintf</span><span class="p">(</span><span class="n" style="color: #333;">outfile</span><span class="p">,</span> <span class="s" style="color: #d14;">"[0x%.4lx] %s</span><span class="se" style="color: #d14;">\n</span><span class="s" style="color: #d14;">"</span><span class="p">,</span> <span class="n" style="color: #333;">mechanism</span><span class="p">,</span> <span class="n" style="color: #333;">str</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="1541" 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="1550" 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">
1550
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1550" class="line" lang="c">                   <span class="n" style="color: #333;">fprintf</span><span class="p">(</span><span class="n" style="color: #333;">outfile</span><span class="p">,</span> <span class="s" style="color: #d14;">"[0x%.4lx] %s"</span><span class="p">,</span> <span class="n" style="color: #333;">mechanism</span><span class="p">,</span> <span class="n" style="color: #333;">str</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="1541" 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="1551" 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">
1551
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1551" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1541" 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="1552" 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">
1552
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1552" class="line" lang="c">                   <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">gnutls_pkcs11_token_check_mechanism</span><span class="p">(</span><span class="n" style="color: #333;">url</span><span class="p">,</span> <span class="n" style="color: #333;">mechanism</span><span class="p">,</span> <span class="o" style="font-weight: 600;">&</span><span class="n" style="color: #333;">minfo</span><span class="p">,</span> <span class="k" style="font-weight: 600;">sizeof</span><span class="p">(</span><span class="n" style="color: #333;">minfo</span><span class="p">),</span> <span class="mi" style="color: #099;">0</span><span class="p">)</span> <span class="o" style="font-weight: 600;">!=</span> <span class="mi" style="color: #099;">0</span><span class="p">)</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="1541" 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="1553" 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">
1553
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1553" class="line" lang="c">                           <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">minfo</span><span class="p">.</span><span class="n" style="color: #333;">max_key_size</span> <span class="o" style="font-weight: 600;">!=</span> <span class="mi" style="color: #099;">0</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="1541" 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="1554" 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">
1554
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1554" class="line" lang="c">                           <span class="n" style="color: #333;">fprintf</span><span class="p">(</span><span class="n" style="color: #333;">outfile</span><span class="p">,</span> <span class="s" style="color: #d14;">" keysize range (%ld, %ld)"</span><span class="p">,</span> <span class="n" style="color: #333;">minfo</span><span class="p">.</span><span class="n" style="color: #333;">min_key_size</span><span class="p">,</span> <span class="n" style="color: #333;">minfo</span><span class="p">.</span><span class="n" style="color: #333;">max_key_size</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="1541" 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="1555" 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">
1555
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1555" class="line" lang="c">                           <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">minfo</span><span class="p">.</span><span class="n" style="color: #333;">flags</span> <span class="o" style="font-weight: 600;">&</span> <span class="mh" style="color: #099;">0x1</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="1541" 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="1556" 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">
1556
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1556" class="line" lang="c">                                   <span class="n" style="color: #333;">printf</span><span class="p">(</span><span class="s" style="color: #d14;">" hw"</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="1541" 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="1557" 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">
1557
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1557" class="line" lang="c">                           <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">minfo</span><span class="p">.</span><span class="n" style="color: #333;">flags</span> <span class="o" style="font-weight: 600;">&</span> <span class="mh" style="color: #099;">0x100</span><span class="p">)</span></span>
</pre>
</td>
</tr>

</table>
<div style="">
<p dir="auto">done</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/1071#note_226764437">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/98b94c7a689f5e2f5d87ae4402db7cd1/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/1071#note_226764437"}}</script>


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