aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-05-05 21:18:47 +0000
committerDavid Shaw <[email protected]>2005-05-05 21:18:47 +0000
commit08bd93f7dc3190e654948aa095d1b0c6ed91add5 (patch)
tree67a446f1c569430068bbca7fdc6cb38b6332089c
parent* options.h, g10.c (main): Add new --default-sig-expire and (diff)
downloadgnupg-08bd93f7dc3190e654948aa095d1b0c6ed91add5.tar.gz
gnupg-08bd93f7dc3190e654948aa095d1b0c6ed91add5.zip
* keygen.c (keygen_set_std_prefs): Add SHA256 and BZip2 to default
preferences.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog3
-rw-r--r--g10/keygen.c22
2 files changed, 22 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 1283bd176..6bf97dccc 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,8 @@
2005-05-05 David Shaw <[email protected]>
+ * keygen.c (keygen_set_std_prefs): Add SHA256 and BZip2 to default
+ preferences.
+
* options.h, g10.c (main): Add new --default-sig-expire and
--default-cert-expire options. Suggested by Florian Weimer.
diff --git a/g10/keygen.c b/g10/keygen.c
index 8895ab5bc..26f3cc676 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -348,7 +348,8 @@ keygen_set_std_prefs (const char *string,int personal)
*/
/* Make sure we do not add more than 15 items here, as we
- could overflow the size of dummy_string. */
+ could overflow the size of dummy_string. We currently
+ have at most 12. */
if(!check_cipher_algo(CIPHER_ALGO_AES256))
strcat(dummy_string,"S9 ");
if(!check_cipher_algo(CIPHER_ALGO_AES192))
@@ -368,8 +369,23 @@ keygen_set_std_prefs (const char *string,int personal)
if(!check_cipher_algo(CIPHER_ALGO_IDEA))
strcat(dummy_string,"S1 ");
- /* SHA-1, RIPEMD160, ZLIB, ZIP */
- strcat(dummy_string,"H2 H3 Z2 Z1");
+ /* SHA-1 */
+ strcat(dummy_string,"H2 ");
+
+ if(!check_digest_algo(DIGEST_ALGO_SHA256))
+ strcat(dummy_string,"H8 ");
+
+ /* RIPEMD160 */
+ strcat(dummy_string,"H3 ");
+
+ /* ZLIB */
+ strcat(dummy_string,"Z2 ");
+
+ if(!check_compress_algo(COMPRESS_ALGO_BZIP2))
+ strcat(dummy_string,"Z3 ");
+
+ /* ZIP */
+ strcat(dummy_string,"Z1");
string=dummy_string;
}