diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-11-09 22:41:02 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-11-09 22:45:06 +0100 |
commit | 6948eedc274fd4d8e6608f1fb17300476f2022a9 (patch) | |
tree | ab9e0a3d7013fb96770f52d1542bbf943f0fe28c /src/p11tool.c | |
parent | 1ba8d9f5e50a07046d33a91b2aeae5af77fbaf58 (diff) | |
download | gnutls-6948eedc274fd4d8e6608f1fb17300476f2022a9.tar.gz |
Added export-chain option to p11tool
Diffstat (limited to 'src/p11tool.c')
-rw-r--r-- | src/p11tool.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/p11tool.c b/src/p11tool.c index 93c4200434..4f85def0df 100644 --- a/src/p11tool.c +++ b/src/p11tool.c @@ -144,6 +144,11 @@ static void cmd_parser(int argc, char **argv) else cinfo.incert_format = GNUTLS_X509_FMT_PEM; + if (HAVE_OPT(OUTDER) || HAVE_OPT(OUTRAW)) + cinfo.outcert_format = GNUTLS_X509_FMT_DER; + else + cinfo.outcert_format = GNUTLS_X509_FMT_PEM; + if (HAVE_OPT(LOAD_CERTIFICATE)) cinfo.cert = OPT_ARG(LOAD_CERTIFICATE); @@ -212,6 +217,8 @@ static void cmd_parser(int argc, char **argv) login, detailed_url, &cinfo); } else if (HAVE_OPT(EXPORT)) { pkcs11_export(outfile, url, login, &cinfo); + } else if (HAVE_OPT(EXPORT_CHAIN)) { + pkcs11_export_chain(outfile, url, login, &cinfo); } else if (HAVE_OPT(WRITE)) { int priv; |