diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-11-13 11:23:37 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-11-16 03:36:27 +0300 |
commit | c97840a72257122095ccfc6e1806e1afc6e53069 (patch) | |
tree | c285df467a189cb85542fbb31068edd1fad01aa7 /src/certtool-common.c | |
parent | 4b2757edd3272ba71c7c306ec023ee3bda03a01e (diff) | |
download | gnutls-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>
Diffstat (limited to 'src/certtool-common.c')
-rw-r--r-- | src/certtool-common.c | 2 |
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); |