[Pgp-tools-commit] r828 - in trunk: debian gpg-key2latex
Guilhem Moulin
guilhem-guest at moszumanska.debian.org
Tue Feb 2 18:04:44 UTC 2016
Author: guilhem-guest
Date: 2016-02-02 18:04:44 +0000 (Tue, 02 Feb 2016)
New Revision: 828
Modified:
trunk/debian/changelog
trunk/gpg-key2latex/gpg-key2latex
Log:
gpg-key2latex: Don't show capabilities of the entire key when --show-subkeys is set.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2016-02-02 14:45:29 UTC (rev 827)
+++ trunk/debian/changelog 2016-02-02 18:04:44 UTC (rev 828)
@@ -9,6 +9,10 @@
* gpgsigs, gpg-key2latex:
+ Use "Noto Mono" as default font when compiling with XeLaTeX or LuaLaTeX;
and "Noto Sans Mono CJK" as CJK font when compiling with XeLaTeX.
+ * gpg-key2latex:
+ + Don't show capabilities of the entire key when --show-subkeys is set.
+ (Instead, the capabilities of the master key and each subkey are shown
+ independently in uppercase.)
-- Guilhem Moulin <guilhem at guilhem.org> Tue, 02 Feb 2016 14:31:32 +0100
Modified: trunk/gpg-key2latex/gpg-key2latex
===================================================================
--- trunk/gpg-key2latex/gpg-key2latex 2016-02-02 14:45:29 UTC (rev 827)
+++ trunk/gpg-key2latex/gpg-key2latex 2016-02-02 18:04:44 UTC (rev 828)
@@ -119,7 +119,7 @@
$key{algo} = $3;
$key{creation} = $5;
$key{expiration} = $6 if $6 ne '';
- $key{flags} = $7;
+ $key{caps} = $7;
}
next;
}
@@ -141,7 +141,7 @@
$sub->{algo} = $3;
$sub->{creation} = $5;
$sub->{expiration} = $6 if $6 ne '';
- $sub->{flags} = $7;
+ $sub->{caps} = $7;
next;
}
if (/^fpr:(?:[^:]*:){8}([0-9A-F]{40})(?::.*)?$/) {
@@ -273,7 +273,7 @@
$str .= strftime '%Y-%m-%d', localtime($key->{creation});
$str .= ' [expires: '.strftime('%Y-%m-%d', localtime($key->{expiration})).']'
if defined $key->{expiration};
- $str .= ' ' x (72 + 1 - length($str) - length($key->{flags})) . $key->{flags};
+ $str .= ' ' x (72 + 1 - length($str) - length($key->{caps})) . $key->{caps};
$str . sprintf "\n Key fingerprint = %s %s %s %s %s %s %s %s %s %s\n",
map { substr($key->{fpr}, ($_ * 4), 4) } (0..9);
}
@@ -286,6 +286,13 @@
foreach my $n (0 .. $#KEYS) {
my $key = $KEYS[$n];
+ if ($options{'show-subkeys'}) {
+ $key->{caps} =~ y/[A-Z]//d; # ignore usable capabilities of the entire key
+ $_->{caps} =~ y/[a-z]/[A-Z]/ foreach ($key, @{$key->{sub}});
+ } else {
+ $key->{caps} =~ y/[a-z]//d; # ignore subkey capabilities
+ }
+
print "\\begin{SaveVerbatim}{PubKey$n}\n"
.pubkey_string('pub',$key)
."\\end{SaveVerbatim}\n";
More information about the Pgp-tools-commit
mailing list