<!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=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<p class="details" style="font-style: italic; color: #777777;">
<a href="https://gitlab.com/rockdaboot">Tim Rühsen</a>
commented on a discussion
on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/809#note_119187485">tests/cert-tests/certtool-ecdsa</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="47" 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">
47
</td>
<td class="diff-line-num new_line" data-linenumber="47" 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">
47
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC47" class="line" lang="shell"> <span class="nb" style="color: #0086b3;">exit </span>1</span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="48" 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">
48
</td>
<td class="diff-line-num new_line" data-linenumber="48" 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">
48
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC48" class="line" lang="shell"><span class="k" style="font-weight: 600;">fi</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="49" 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">
49
</td>
<td class="diff-line-num new_line" data-linenumber="49" 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">
49
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC49" class="line" lang="shell"></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="diff-line-num old old_line" data-linenumber="50" 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">
50
</td>
<td class="diff-line-num new_line old" data-linenumber="50" 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 noteable_line old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC50" class="line" lang="shell"><span class="nv" style="color: teal;">$DIFF</span> <span class="nt" style="color: navy;"><span class="idiff left">-I</span></span><span class="idiff"> </span><span class="s1" style="color: #d14;"><span class="idiff">'Not After:'</span></span><span class="idiff right"> </span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">TMPFILE</span><span class="k" style="font-weight: 600;">}</span> <span class="s2" style="color: #d14;">"</span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">srcdir</span><span class="k" style="font-weight: 600;">}</span><span class="s2" style="color: #d14;">/data/cert-ecc256-full.pem"</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="51" 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="50" 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">
50
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC50" class="line" lang="shell"><span class="nv" style="color: teal;">$DIFF</span> <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">TMPFILE</span><span class="k" style="font-weight: 600;">}</span> <span class="s2" style="color: #d14;">"</span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">srcdir</span><span class="k" style="font-weight: 600;">}</span><span class="s2" style="color: #d14;">/data/cert-ecc256-full.pem"</span></span>
</pre>
</td>
</tr>
</table>
<div>
<p dir="auto">If have it ready - is it ok to add in common.sh ?</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true" style="background-color: #fff; font-family: monospace; font-size: 90%; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; margin: 0;"><code><span id="LC1" class="line" lang="plaintext"># $1, $2: the two files to check for equality</span>
<span id="LC2" class="line" lang="plaintext"># $3: Strings to be ignored, separated by |</span>
<span id="LC3" class="line" lang="plaintext">assert_equal() {</span>
<span id="LC4" class="line" lang="plaintext"> local tmp1=`basename "$1"`</span>
<span id="LC5" class="line" lang="plaintext"> local tmp2=`basename "$2"`</span>
<span id="LC6" class="line" lang="plaintext"></span>
<span id="LC7" class="line" lang="plaintext"> if test -n "$3"; then</span>
<span id="LC8" class="line" lang="plaintext"> local tmp1=`basename "$1"`"1.tmp"</span>
<span id="LC9" class="line" lang="plaintext"> local tmp2=`basename "$2"`"2.tmp"</span>
<span id="LC10" class="line" lang="plaintext"> grep -v "$3" "$1" | tr -d '\r' >"$tmp1"</span>
<span id="LC11" class="line" lang="plaintext"> grep -v "$3" "$2" | tr -d '\r' >"$tmp2"</span>
<span id="LC12" class="line" lang="plaintext"> diff "$tmp1" "$tmp2"</span>
<span id="LC13" class="line" lang="plaintext"> local rc=$?</span>
<span id="LC14" class="line" lang="plaintext"> rm -f "$tmp1" "$tmp2"</span>
<span id="LC15" class="line" lang="plaintext"> return $rc</span>
<span id="LC16" class="line" lang="plaintext"> fi</span>
<span id="LC17" class="line" lang="plaintext"></span>
<span id="LC18" class="line" lang="plaintext"> diff "$1" "$2"</span>
<span id="LC19" class="line" lang="plaintext"> return $?</span>
<span id="LC20" class="line" lang="plaintext">}</span></code></pre>
<p dir="auto">Using it as</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true" style="background-color: #fff; font-family: monospace; font-size: 90%; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; margin: 0;"><code><span id="LC1" class="line" lang="plaintext">assert_equal ${TMPFILE} "${srcdir}/data/cert-eddsa.pem" "Not After:"</span>
<span id="LC2" class="line" lang="plaintext">if test $? != 0; then</span>
<span id="LC3" class="line" lang="plaintext"> ...</span></code></pre>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777777;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/merge_requests/809#note_119187485">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/dbd5fea4c9b4c7ec8ccdfc497d5f6b37/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/809#note_119187485"}}</script>
</p>
</div>
</body>
</html>