diff options
author | Adam Langley <agl@chromium.org> | 2014-08-22 01:11:39 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-08-26 01:47:02 +0400 |
commit | 8e16b6e6582810de46b4db7926a2462be8e789d2 (patch) | |
tree | b2e1daa4ff57e91f289507a666a9105f8985b9cf /tool/tool.cc | |
parent | 9c01e00c2e5bb8087c27203c0adccd9738beb64d (diff) |
Add PKCS#12 parser.
This is cleaner than the OpenSSL code was, at least, but it's hardly
beautiful due to the "standard" that it's trying to implement. (See
[1].)
The references from the PKCS#8 code to various ciphers have digests have
been made into function pointer references rather than NIDs so that the
linker will be able to drop RC2 code for binaries that don't call PKCS#8
or #12 functions.
A bug that crashed OpenSSL/BoringSSL when parsing a malformed PKCS#8
structure has been fixed too.
See https://www.cs.auckland.ac.nz/~pgut001/pubs/pfx.html
Change-Id: Iaa1039e04ed7877b90792835e8ce3ebc3b29f89e
Reviewed-on: https://boringssl-review.googlesource.com/1592
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'tool/tool.cc')
-rw-r--r-- | tool/tool.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tool/tool.cc b/tool/tool.cc index b8aa9117..bf79a47b 100644 --- a/tool/tool.cc +++ b/tool/tool.cc @@ -19,11 +19,12 @@ #include <openssl/ssl.h> -bool Speed(const std::vector<std::string> &args); bool Client(const std::vector<std::string> &args); +bool PKCS12(const std::vector<std::string> &args); +bool Speed(const std::vector<std::string> &args); static void usage(const char *name) { - printf("Usage: %s [speed|client]\n", name); + printf("Usage: %s [speed|client|pkcs12]\n", name); } int main(int argc, char **argv) { @@ -43,6 +44,8 @@ int main(int argc, char **argv) { return !Speed(args); } else if (tool == "s_client" || tool == "client") { return !Client(args); + } else if (tool == "pkcs12") { + return !PKCS12(args); } else { usage(argv[0]); return 1; |