GnuPG::Signature(3pm)
π GnuPG::Signature(3pm) β the glow-up
okay bestie, so this is the Perl doc for GnuPG::Signature, part of the User Contributed Perl Documentation for GnuPG. it's the little object that holds β¨vibesβ¨ about a GnuPG key signature. buckle up, it's short but it's iconic.
πΈ NAME πΈ
GnuPG::Signature β GnuPG Key Signature Objects. that's it, that's the whole name. π
β SYNOPSIS β
# assumes a GnuPG::Key or GnuPG::UserID or GnuPG::UserAttribute object in $signed
my $signing_id = $signed->signatures->[0]->hex_id();
so like, you've got one of those in $signed, and you just reach in and grab the hex id of the first signature. no big deal. π
π¦ DESCRIPTION π¦
okay so GnuPG::Signature objects are literally not meant to be made on their own β they get created as part of GnuPG::Key objects. they embody (love that word) the various aspects of a GnuPG signature on a key. main character energy, but as a data member. π
β¨ OBJECT METHODS β¨
new( %initialization_args )β this method creates a brand new object for you π«Ά. the arguments are optional and they're just initialization of data members. no stress.is_valid()β returns1if GnuPG was actually able to cryptographically verify the signature, otherwise0. like a vibe check but for crypto. πcompare( $other )β returns non-zero only when this Signature is identical to the otherGnuPG::Signature. literally twin flames or nothing. no partial credit. π
π OBJECT DATA MEMBERS π
validityβ a character indicating the cryptographic validity of the key. GnuPG uses at least these characters:"!"means valid π"-"means not valid π"?"means unknown (e.g. if the supposed signing key is not present in the local keyring)"%"means an error occurred (e.g. a non-supported algorithm) π¨
see the documentation for --check-sigs in gpg(1). iykyk.
algo_numβ the number of the algorithm used for the signature π’.hex_idβ the hex id of the signing key π.user_id_stringβ the first user id string on the key that made the signature. lowkey important caveat: this may not be defined if the signing key is not on the local keyring.sig_classβ the signature class. this is the numeric value of the class of signature.
a table of possible classes of signatures and their numeric types can be found at http://tools.ietf.org/html/rfc4880#section-5.2.1 β go read it, it's giving reference material π
is_exportableβ returns0for local-only signatures, non-zero for exportable signatures π§³β¨date_stringβ the formatted date the signature was performed on ποΈdateβ the date the signature was performed, represented as the number of seconds since midnight1970-01-01UTC β°expiration_date_stringβ the formatted date the signature will expire (signatures without expiration returnundef) πexpiration_dateβ the date the signature will expire, represented as the number of seconds since midnight1970-01-01UTC (signatures without expiration returnundef) β
π SEE ALSO π
that's literally it for cross-references, bestie. the section's just vibes. β¨
ngl the whole thing is short but it ate. remember: every one of those undef returns and every one of those validity characters matters, no cap. π₯
~~ sign-off ~~ this little gem is perl v5.40.1, dated 2025-03-14, and it lives at GnuPG::Signature(3pm) β go forth and verify some sigs, you absolute icon π«Άπβ¨
π¦ where this page comes from
- debian trixie: libgnupg-interface-perl 1.04-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgnupg-interface-perl 1.04-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgnupg-interface-perl 1.04-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms