gpg clear signed message on website
gnupg at lists.grepular.com
gnupg at lists.grepular.com
Mon Sep 3 16:22:02 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 03/09/12 13:07, anotst01 at fastmail.fm wrote:
> The goal is to sign a message on a webserver.
>
> I clear signed a plain text file and double checked I can still
> verify it. The resulting clear signed text has been put into a new
> file surrounded by
>
> <pre> -----BEGIN PGP SIGNED MESSAGE----- ....... -----END PGP
> SIGNATURE----- </pre>
>
> and saved as file.html. When I open file.html with a browser, copy
> the text into a text file and store it, I get a bad signature.
>
> What is the correct syntax for a website source to show a gpg
> signed message?
It's a complete ball-ache. I've done this myself on my front page
here: https://grepular.com/ - I found that different browsers put
different things in the clipboard when you select text and copy it.
They usually mess with white-space and line endings. I originally used
<pre> myself for that page, but ended up using a <p> and lots of <br>
instead to make it play nicely with more browsers. To stop the
white-space collapsing in on it's self, for alignment, I replaced
every other consecutive space with a unicode no-break space character
instead. That might not be obvious to you if you just do a "view
source". Also, to make things difficult that page is "compressed". Sorry.
I don't have any hard and fast rules to make this work, but I've
messed with it long enough to have a feeling for what to do when
something doesn't.
- --
Mike Cardwell https://grepular.com/ http://cardwellit.com/
OpenPGP Key 35BC AF1D 3AA2 1F84 3DC3 B0CF 70A5 F512 0018 461F
XMPP OTR Key 8924 B06A 7917 AAF3 DBB1 BF1B 295C 3C78 3EF1 46B4
-----BEGIN PGP SIGNATURE-----
iQGGBAEBCgBwBQJQRL0KMBSAAAAAACAAB3ByZWZlcnJlZC1lbWFpbC1lbmNvZGlu
Z0BwZ3AuY29tcGdwbWltZTgUgAAAAAAVABpwa2EtYWRkcmVzc0BnbnVwZy5vcmdt
aWtlLmNhcmR3ZWxsQGdyZXB1bGFyLmNvbQAKCRCdJiMBwdHnBKbKB/9H0/QE1qII
WXYvkjvqWcEk4Q79YNIxuKOwI5Wi/3HL/SlV+4HQbe9eAHRi7Fho8zeoMZ/1T55H
AalJanfGdus6aX5b5A/kFJEXkSV97KM2Ok8yAiHz35gaAS4gLxgQOIBCJbffrUuh
VQnrr8VSQk9lkyNnNyS1xqaoSwtnyEAbb9TqOw2abfCH8O4YcViQZsaQQfRw/ZdZ
MWtlJNlwARhrxYzWziU7ty4KuF/NgEJD4TKDvB80tjT3i3GDg4+s5zU0SnZLcmxb
CKV1lrxDLqrQeDE5Zbep3J1XL5ZJ4e98+CrRyKJkVXmKwH5+A/ySMk3CTNXKtoWT
3H34WvVdMTJb
=qU7I
-----END PGP SIGNATURE-----
More information about the Gnupg-users
mailing list