summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2018-11-13 11:23:37 +0300
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2018-11-16 03:36:27 +0300
commitc97840a72257122095ccfc6e1806e1afc6e53069 (patch)
treec285df467a189cb85542fbb31068edd1fad01aa7
parent4b2757edd3272ba71c7c306ec023ee3bda03a01e (diff)
downloadgnutls-c97840a72257122095ccfc6e1806e1afc6e53069.tar.gz
certtool: support --pkcs-cipher none
If password is specified on command line currently certtool will always output encrypted pkcs8 file. Add `--pkcs-cipher none' allowing one to force certtool to output unencrypted private keys. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-rw-r--r--src/certtool-common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/certtool-common.c b/src/certtool-common.c
index acd314a0ac..893e17f276 100644
--- a/src/certtool-common.c
+++ b/src/certtool-common.c
@@ -1174,6 +1174,8 @@ int cipher_to_flags(const char *cipher)
return GNUTLS_PKCS_USE_PBES2_GOST_CPC;
} else if (strcasecmp(cipher, "gost28147-cpd") == 0) {
return GNUTLS_PKCS_USE_PBES2_GOST_CPD;
+ } else if (strcasecmp(cipher, "none") == 0) {
+ return GNUTLS_PKCS_PLAIN;
}
fprintf(stderr, "unknown cipher %s\n", cipher);