eta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/better-cgit-markdown-heading-color.css'/>
<link rel='shortcut icon' href='/cgit-static/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.koszko.org/guix/atom/tests/openpgp.scm?h=koszko' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='https://git.koszko.org/cgit-static/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/guix/'>guix</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'/><select name='h' onchange='this.form.submit();'>
<option value='koszko' selected='selected'>koszko</option>
<option value='koszko-scripts'>koszko-scripts</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Wojtek's customized Guix</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>refs</a><a class='active' href='/guix/log/tests/openpgp.scm'>log</a><a href='/guix/tree/tests/openpgp.scm?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>tree</a><a href='/guix/commit/tests/openpgp.scm?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>commit</a><a href='/guix/diff/tests/openpgp.scm?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/tests/openpgp.scm'>
<input type='hidden' name='id' value='6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/guix/log/?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>root</a>/<a href='/guix/log/tests?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>tests</a>/<a href='/guix/log/tests/openpgp.scm?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73'>openpgp.scm</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/guix/log/tests/openpgp.scm?id=6ea7297ea49f6c704afb727a5afe7ef9ce4a4f73&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th></tr>
<tr><td><span title='2020-09-29 22:53:36 +0200'>2020-09-29</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=680b80e37453d4e23ad8188d60894916e1c07162'>openpgp: Fix argument order of 'fxbit-set?'.</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm (fxbit-set?): Change to swap arguments compared to
'bit-set?'.
* tests/openpgp.scm (%binary-sample): New test vector.
("port-ascii-armored?, #t"): Add test.
("port-ascii-armored?, #f"): Add another test.

Co-authored-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</span></span></td><td>Lars-Dominik Braun</td></tr>
<tr><td><span title='2020-05-04 09:56:13 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=b835e158d51c873a99367afd27f3d57cfe92e10e'>openpgp: Add 'string-&gt;openpgp-packet'.</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm (string-&gt;openpgp-packet): New procedure.
* tests/openpgp.scm ("verify-openpgp-signature, missing key")
("verify-openpgp-signature, good signatures")
("verify-openpgp-signature, bad signature"): Use it.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-05-04 09:56:13 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=bd8126558dc7a022d7853d803d7134ffa1b7bc52'>openpgp: 'lookup-key-by-{id,fingerprint}' return the key first.</a><span class='msg-avail'>...<span class='msg-tooltip'>Previously, 'lookup-key-by-{id,fingerprint}' would always return the
list of packets where the primary key is first.  Thus, the caller would
need to use 'find' to actually find the requested key.

* guix/openpgp.scm (keyring-insert): Always add KEY to PACKETS.
(lookup-key-by-id, lookup-key-by-fingerprint): Change to return the key
as the first value.
(verify-openpgp-signature): Remove now unneeded call to 'find'.
* tests/openpgp.scm ("get-openpgp-keyring"): Adjust accordingly.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-05-04 09:56:12 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=b45fa0a123bec8d023e5520dfb381bfc73313929'>openpgp: 'verify-openpgp-signature' looks up by fingerprint when possible.</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm (verify-openpgp-signature): Use
'lookup-key-by-fingerprint' when SIG contains a fingerprint.
Honor FINGERPRINT in the 'find' predicate.  Upon missing-key, return
FINGERPRINT if available.
* tests/openpgp.scm ("verify-openpgp-signature, missing key"): Adjust
expected value accordingly.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-05-04 09:56:12 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=efe1f0122c61b8932671d07419f0200c170a994e'>openpgp: Add 'lookup-key-by-fingerprint'.</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm (&lt;openpgp-keyring&gt;)[table]: Rename to...
[ids]: ... this.
[fingerprints]: New field.
(keyring-insert, lookup-key-by-fingerprint): New procedures.
(%empty-keyring): Adjust.
(get-openpgp-keyring): Manipulate KEYRING instead of its vhash, use
'keyring-insert'.
* tests/openpgp.scm ("get-openpgp-keyring"): Test
'lookup-key-by-fingerprint'.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-05-04 09:56:12 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=7b2b3a13cc2d9b043f37b2e7ba0f147c08de8fad'>openpgp: Store the issuer key id and fingerprint in &lt;openpgp-signature&gt;.</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm (&lt;openpgp-signature&gt;)[issuer, issuer-fingerprint]:
New fields.
(openpgp-signature-issuer, openpgp-signature-issuer-fingerprint): Remove.
(verify-openpgp-signature): Use 'openpgp-signature-issuer-key-id'.
(get-signature): Initialize 'issuer' and 'issuer-fingerprint'.
* tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Adjust
accordingly.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-05-04 09:56:12 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=4459c7859c286ab54fa3a9901c8a17591b04c516'>openpgp: Decode the issuer-fingerprint signature subpacket.</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm (SUBPACKET-ISSUER-FINGERPRINT): New variable.
(openpgp-signature-issuer-fingerprint): New procedure.
(key-id-matches-fingerprint?): New procedure.
(get-signature): Look for the 'issuer and 'issuer-fingerprint
subpackets.  Ensure the issuer key ID matches the fingerprint when both
are available.
(parse-subpackets): Handle SUBPACKET-ISSUER-FINGERPRINT.
* tests/openpgp.scm (%rsa-key-fingerprint)
(%dsa-key-fingerprint, %ed25519-key-fingerprint): New variables.
* tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Check the
result of 'openpgp-signature-issuer-fingerprint'.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-05-04 09:56:12 +0200'>2020-05-04</span></td><td><a href='/guix/commit/tests/openpgp.scm?id=43408e304ffb1149f35cb539b40d673d567c9116'>Add (guix openpgp).</a><span class='msg-avail'>...<span class='msg-tooltip'>* guix/openpgp.scm, tests/openpgp.scm, tests/civodul.key,
tests/dsa.key, tests/ed25519.key, tests/rsa.key,
tests/ed25519.sec: New files.
* Makefile.am (MODULES): Add guix/openpgp.scm.
(SCM_TESTS): Add tests/openpgp.scm.
(EXTRA_DIST): Add tests/*.key and tests/ed25519.sec.
</span></span></td><td>Ludovic Courtès</td></tr>