diff options
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/examples/statistics.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/openpgp/examples/statistics.rs b/openpgp/examples/statistics.rs index 6311f63e..24fa6527 100644 --- a/openpgp/examples/statistics.rs +++ b/openpgp/examples/statistics.rs @@ -43,6 +43,8 @@ fn main() { let mut sigs_subpacket_tags_size_count = vec![0; 256]; let mut sigs_subpacket_tags_size_min = vec![::std::u32::MAX; 256]; let mut sigs_subpacket_tags_size_max = vec![0; 256]; + let mut sigs_subpacket_exportable_true = 0; + let mut sigs_subpacket_exportable_false = 0; // Per-Signature statistics. let mut signature_min = PerSignature::max(); @@ -168,6 +170,12 @@ fn main() { } else { p_aead.insert(a.clone(), 1); }, + SubpacketValue::ExportableCertification(v) => + if v { + sigs_subpacket_exportable_true += 1; + } else { + sigs_subpacket_exportable_false += 1; + }, _ => (), } } @@ -315,6 +323,22 @@ fn main() { sigs_subpacket_tags_unknown[t], "-", "-", "-", "-"); } + + match SubpacketTag::from(t as u8) { + SubpacketTag::ExportableCertification => { + if sigs_subpacket_exportable_true > 0 { + println!("{:>30} {:>8}", + "ExportableCertification(true)", + sigs_subpacket_exportable_true); + } + if sigs_subpacket_exportable_false > 0 { + println!("{:>30} {:>8}", + "ExportableCertification(false)", + sigs_subpacket_exportable_false); + } + }, + _ => (), + } } } |