mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add output during smime_keys purpose flag checking.

+11 -5
+11 -5
smime_keys.pl
··· 52 52 sub openssl_trust_flag ($$;$); 53 53 sub openssl_parse_pem ($$); 54 54 sub openssl_dump_cert ($); 55 - sub openssl_purpose_flag ($); 55 + sub openssl_purpose_flag ($$); 56 56 57 57 # key/certificate management methods 58 58 sub cm_list_certs (); ··· 619 619 return $output; 620 620 } 621 621 622 - sub openssl_purpose_flag ($) { 623 - my ($filename) = @_; 622 + sub openssl_purpose_flag ($$) { 623 + my ($filename, $certhash) = @_; 624 + 625 + print "==> checking purpose flags for $certhash\n"; 624 626 625 627 my $purpose = ""; 626 628 ··· 629 631 630 632 foreach my $line (@output) { 631 633 if ($line =~ /^S\/MIME signing\s*:\s*Yes/) { 634 + print "\t$line"; 632 635 $purpose .= "s"; 633 636 } 634 637 elsif ($line =~ /^S\/MIME encryption\s*:\s*Yes/) { 638 + print "\t$line"; 635 639 $purpose .= "e"; 636 640 } 637 641 } 638 642 639 643 if (! $purpose) { 644 + print "\tWARNING: neither encryption nor signing flags are enabled.\n"; 645 + print "\t $certhash will not be usable by Mutt.\n"; 640 646 $purpose = "-"; 641 647 } 642 648 ··· 795 801 $cert_data->{hashvalue} = cm_add_cert($filename); 796 802 $cert_data->{mailboxes} = [ openssl_emails($filename) ]; 797 803 $cert_data->{trust} = openssl_trust_flag($cert_data->{hashvalue}, $issuer_hash); 798 - $cert_data->{purpose} = openssl_purpose_flag($filename); 804 + $cert_data->{purpose} = openssl_purpose_flag($filename, $cert_data->{hashvalue}); 799 805 800 806 foreach my $mailbox (@{$cert_data->{mailboxes}}) { 801 807 cm_add_entry($mailbox, $cert_data->{hashvalue}, 1, $label, ··· 936 942 } 937 943 938 944 if ($#fields < 5) { 939 - $fields[5] = openssl_purpose_flag("$certificates_path/$fields[1]"); 945 + $fields[5] = openssl_purpose_flag("$certificates_path/$fields[1]", $fields[1]); 940 946 } 941 947 942 948 # To update an old private keys index format, always push the trust