]> granicus.if.org Git - neomutt/commit
Start cleaning up and fixing smime_keys.pl (closes #3324) (see #2456)
authorKevin McCarthy <kevin@8t8.us>
Fri, 15 May 2015 17:47:38 +0000 (10:47 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 15 May 2015 17:47:38 +0000 (10:47 -0700)
commit8e76cfdbd4b39679f22e21c9417889fcd244578b
treef154ae4404766ab7da9c2c275b0abc30a430f382
parent33f00482c36b409eaf2ce9c4c11b75f101ee3fd5
Start cleaning up and fixing smime_keys.pl (closes #3324) (see #2456)

* Convert to using File::Temp (#3324).  This was also suggested at
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775199

* Use File::Temp for add_p12 temp file. (#2456)

* Make the query_label() method a bit more robust with empty strings,
  ctrl-d, and leading spaces.

* Clean up openssl_do_verify() logic.  Mark cert as invalid
  rather that die'ing if an openssl verify command fails.

* General cleanup:
  - Clearly separate op handler, certificate management, and helper
    functions by section and using prefixes.
  - Create openssl helper functions to reduce copy/paste invocations
    and make the code clearer.
  - Make indentation consistent at 2 spaces.
  - Change handle_add_pem() to re-use handle_add_chain() once the
    correct files are identified.
  - Change openssl_parse_pem() to return a single array of data
    structures representing the parsed certs/keys.
smime_keys.pl