]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
The default cipher when encrypting with PKCS12 is AES.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 6 Mar 2012 08:39:06 +0000 (09:39 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 6 Mar 2012 08:39:06 +0000 (09:39 +0100)
src/certtool.c

index 0bf160950baad6e4daf93cca2b2a96157fa6ab6b..036aef5b816511d627f872c7345deea20376ff15 100644 (file)
@@ -223,7 +223,11 @@ generate_private_key_int (common_info_st * cinfo)
 static int
 cipher_to_flags (const char *cipher)
 {
-  if (strcasecmp (cipher, "3des") == 0)
+  if (cipher == NULL)
+    {
+      return GNUTLS_PKCS_USE_PBES2_AES_128;
+    }
+  else if (strcasecmp (cipher, "3des") == 0)
     {
       return GNUTLS_PKCS_USE_PBES2_3DES;
     }