<br>A quick question......<br><br>I saw this in &nbsp;be_package.c &nbsp;pkg_load()<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">        &nbsp;&nbsp;&nbsp; /* look around for a PGP signature file; load if available */<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MALLOC(pgpfile, strlen(pkgfile) + 5, RET_ERR(PM_ERR_MEMORY, NULL));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sprintf(pgpfile, &quot;%s.sig&quot;, pkgfile);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(access(pgpfile, R_OK) == 0) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FILE *f;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; long bytes;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; f = fopen(pgpfile, &quot;rb&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fseek(f, 0L, SEEK_END);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; bytes = ftell(f);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fseek(f, 0L, SEEK_SET);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* don&#39;t read the file in if it is obviously not the size of a sig */<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(bytes == 72) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CALLOC(newpkg-&gt;pgpsig.rawdata, bytes, sizeof(char),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RET_ERR(PM_ERR_MEMORY, NULL));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fread(newpkg-&gt;pgpsig.rawdata, sizeof(char), bytes, f);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; newpkg-&gt;pgpsig.rawlen = bytes;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _alpm_log(PM_LOG_DEBUG,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;loaded package .sig file, location %s\n&quot;, pgpfile);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _alpm_log(PM_LOG_WARNING, _(&quot;PGP signature file for %s was abnormal&quot;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot; (had length %ld), skipping\n&quot;), pkgfile, bytes);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fclose(f);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _alpm_log(PM_LOG_DEBUG, &quot;no package signature file found\n&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FREE(pgpfile);<br></blockquote><br><br>So do we download the signature file along with the package? Or use&nbsp; %PGPSIG% in the db? <br><br><br><br>On Tue, Dec 16, 2008 at 3:49 AM, Dan McGee &lt;<a href="mailto:dpmcgee@gmail.com">dpmcgee@gmail.com</a>&gt; wrote:<br>
&gt; On Mon, Dec 15, 2008 at 2:11 PM, Gerhard Brauer &lt;<a href="mailto:gerbra@archlinux.de">gerbra@archlinux.de</a>&gt; wrote:<br>&gt;&gt; Am Mon, 15 Dec 2008 13:50:49 -0600<br>&gt;&gt; schrieb Chris Brannon &lt;<a href="mailto:cmbrannon@cox.net">cmbrannon@cox.net</a>&gt;:<br>
&gt;&gt;&gt; I think pacman should at least complain if the signing key is not<br>&gt;&gt;&gt; found in the public keyring. &nbsp;Thoughts?<br>&gt;&gt;<br>&gt;&gt; IMHO pacman should refuse to install anything from core and extra if<br>
&gt;&gt; the signature is not found or corrupted.<br>&gt;&gt; I don&#39;t know what to to with community (maybe a second keyring with<br>&gt;&gt; TU signatures?)<br>&gt;<br>&gt; Pacman knows nothing about [core], [extra], and [community], so this<br>
&gt; will not be possible. However, I had considered a few possibilities<br>&gt; for this type of stuff and this was the best I could think of:<br>&gt; One shared keyring for all repos. Under each repository section, we<br>
&gt; would have a VerifySignatures option or something similar, which would<br>&gt; take values of &quot;Always&quot;, &quot;Optional&quot;, or &quot;Never&quot;, with one of these as<br>&gt; a sane default. We would fail when set to &quot;Always&quot; if packages had no<br>
&gt; signature, we didn&#39;t have the signature on the package, or if the<br>&gt; signature was invalid. For optional, we would verify the signature if<br>&gt; it was there and we had it in our keychain; spit a warning otherwise<br>
&gt; but continue on. Never seems self explanatory<br>&gt;<br>&gt;&gt; My thoughts were to make a option to each repo section in pacman.conf.<br>&gt;&gt; With this option: Keyring = /foo/bar we have an indicator that pacman<br>
&gt;&gt; should check for correct signatures and users could have their<br>&gt;&gt; unsigned or self-signed repos additionally.<br>&gt;<br>&gt; Ha! We think alike. I actually typed the above before I read this.<br>&gt;<br>
&gt; -Dan<br>&gt; _______________________________________________<br>&gt; pacman-dev mailing list<br>&gt; <a href="mailto:pacman-dev@archlinux.org">pacman-dev@archlinux.org</a><br>&gt; <a href="http://archlinux.org/mailman/listinfo/pacman-dev">http://archlinux.org/mailman/listinfo/pacman-dev</a><br>
&gt;<br><br>