[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, gnutls_2_8_x, updated. gnutls_2_8_6-5-ge72dcf4
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, gnutls_2_8_x, updated. gnutls_2_8_6-5-ge72dcf4 |
Date: |
Sat, 26 Jun 2010 19:54:04 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=e72dcf4095adad4811aa440ff44d272d633cdf9d
The branch, gnutls_2_8_x has been updated
via e72dcf4095adad4811aa440ff44d272d633cdf9d (commit)
from 74f77b602ea3099ec7b6105055bbf7054ecd4328 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e72dcf4095adad4811aa440ff44d272d633cdf9d
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jun 26 21:51:03 2010 +0200
When generating private key allow usage of --pkcs-cipher flag.
-----------------------------------------------------------------------
Summary of changes:
src/certtool.c | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/src/certtool.c b/src/certtool.c
index 5693cf2..a5890bf 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -195,6 +195,35 @@ generate_private_key_int (void)
return key;
}
+static int
+cipher_to_flags (const char *cipher)
+{
+ if (strcasecmp (cipher, "3des") == 0)
+ {
+ return GNUTLS_PKCS_USE_PBES2_3DES;
+ }
+ else if (strcasecmp (cipher, "aes-128") == 0)
+ {
+ return GNUTLS_PKCS_USE_PBES2_AES_128;
+ }
+ else if (strcasecmp (cipher, "aes-192") == 0)
+ {
+ return GNUTLS_PKCS_USE_PBES2_AES_192;
+ }
+ else if (strcasecmp (cipher, "aes-256") == 0)
+ {
+ return GNUTLS_PKCS_USE_PBES2_AES_256;
+ }
+ else if (strcasecmp (cipher, "rc2-40") == 0)
+ {
+ return GNUTLS_PKCS_USE_PKCS12_RC2_40;
+ }
+
+ error (EXIT_FAILURE, 0, "Unknown cipher %s\n", cipher);
+ return -1;
+}
+
+
static void
print_private_key (gnutls_x509_privkey_t key)
{
@@ -220,7 +249,7 @@ print_private_key (gnutls_x509_privkey_t key)
if (info.export)
flags = GNUTLS_PKCS_USE_PKCS12_RC2_40;
else
- flags = GNUTLS_PKCS_USE_PKCS12_3DES;
+ flags = cipher_to_flags (info.pkcs_cipher);
if ((pass = get_confirmed_pass (true)) == NULL || *pass == '\0')
flags = GNUTLS_PKCS_PLAIN;
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, gnutls_2_8_x, updated. gnutls_2_8_6-5-ge72dcf4,
Nikos Mavrogiannopoulos <=