Identify a gpg file
hans at guardianproject.info
Fri Jul 26 18:26:29 CEST 2013
On 07/25/2013 03:19 PM, Werner Koch wrote:
> On Thu, 25 Jul 2013 20:36, hans at guardianproject.info said:
>> extensions by default everywhere. So things like .pkr for public keys, .skr
>> for private keys, .sig for binary detach-sign, etc. Any specific format that
> With two drawbacks: You need to have a filename and you need extra code
> to handle data with a wrong suffix. Yes, that happends.
>> should avoid adding the ambiguous extensions, like .gpg, .pgp, .asc, but
> That is easy. GPGME does not know anything about suffixes and with GPG
> you should specificy the filename anyway yourself. The extensions are
> only used by default for convenience.
GPGME does not need to know about file extensions but gpg does since it is
automatically adding file extensions to files that it generates. The file
extensions should be standardized across all OpenPGP implementation, this will
make it possible to people to double-click the files and have the right app
open, and have that app be able to walk the user thru the right procedure for
that data type.
>> As a side note, the file-5.14 detection could use some improvement. Its not
>> detecting keys and detached signatures as something distinct. It seems that
>> the logic in gpa/src/filetype.c could be contributed to file.
> Last time I checked file(1) uses a not too simple pattern matching
> system, thus it is not easy to re-use the code - but possible.
Hopefully I'll find some time to look into that.
PGP fingerprint: 5E61 C878 0F86 295C E17D 8677 9F0F E587 374B BE81
More information about the Gnupg-devel