unlink 'newcert.pem' or die;
unlink 'demoCA/cacert.pem' or die;
unlink 'demoCA/index.txt' or die;
+unlink 'demoCA/index.txt.attr' or die;
unlink 'demoCA/index.txt.old' or die;
unlink 'demoCA/serial' or die;
unlink 'demoCA/serial.old' or die;
open IN, 'list' or die;
<IN> eq "\n" or die;
-<IN> =~ /^(.*)\: Issued for\: user\@smime\.mutt \"old_label\" \(Unverified\)\n/ or die;
+<IN> =~ /^(.*)\: Issued for\: user\@smime\.mutt \"old_label\" \(Trusted\)\n/ or die;
close IN;
my $keyid = $1;
open IN, 'list' or die;
<IN> eq "\n" or die;
-<IN> =~ /^$keyid\: Issued for\: user\@smime\.mutt \"new_label\" \(Unverified\)\n/ or die;
+<IN> =~ /^$keyid\: Issued for\: user\@smime\.mutt \"new_label\" \(Trusted\)\n/ or die;
close IN;
unlink 'list' or die;
# try signing something
-run "openssl smime -sign -signer certificates/$keyid -inkey user.key -in /etc/passwd -certfile certificates/37adefc3.0 > signed";
+run "openssl smime -sign -signer certificates/$keyid -inkey user.key -in /etc/passwd -certfile ca-bundle.crt > signed";
unlink 'user.key' or die;
# verify it