Changeset View
Changeset View
Standalone View
Standalone View
g10/keygen.c
Context not available. | |||||
byte sym[MAX_PREFS], hash[MAX_PREFS], zip[MAX_PREFS]; | byte sym[MAX_PREFS], hash[MAX_PREFS], zip[MAX_PREFS]; | ||||
int nsym=0, nhash=0, nzip=0, val, rc=0; | int nsym=0, nhash=0, nzip=0, val, rc=0; | ||||
int mdc=1, modify=0; /* mdc defaults on, modify defaults off. */ | int mdc=1, modify=0; /* mdc defaults on, modify defaults off. */ | ||||
char dummy_string[45+1]; /* Enough for 15 items. */ | char dummy_string[80+1]; /* Enough for 20 items. */ | ||||
if (!string || !ascii_strcasecmp (string, "default")) | if (!string || !ascii_strcasecmp (string, "default")) | ||||
{ | { | ||||
Context not available. | |||||
possible to prefer AES128. | possible to prefer AES128. | ||||
*/ | */ | ||||
/* Make sure we do not add more than 15 items here, as we | /* Make sure we do not add more than 20 items here, as we | ||||
could overflow the size of dummy_string. We currently | could overflow the size of dummy_string. We currently | ||||
have at most 12. */ | have at most 15. */ | ||||
if ( !openpgp_cipher_test_algo (CIPHER_ALGO_AES256) ) | if ( !openpgp_cipher_test_algo (CIPHER_ALGO_AES256) ) | ||||
strcat(dummy_string,"S9 "); | strcat(dummy_string,"S9 "); | ||||
if ( !openpgp_cipher_test_algo (CIPHER_ALGO_AES192) ) | if ( !openpgp_cipher_test_algo (CIPHER_ALGO_AES192) ) | ||||
Context not available. | |||||
if ( !openpgp_cipher_test_algo (CIPHER_ALGO_IDEA) ) | if ( !openpgp_cipher_test_algo (CIPHER_ALGO_IDEA) ) | ||||
strcat(dummy_string,"S1 "); | strcat(dummy_string,"S1 "); | ||||
/* SHA-1 */ | /* default-preference-list: | ||||
strcat(dummy_string,"H2 "); | SHA512 SHA384 SHA256 SHA224 RIPEMD160 SHA1 */ | ||||
if (!openpgp_md_test_algo(DIGEST_ALGO_SHA512)) | |||||
strcat(dummy_string,"H10 "); | |||||
if (!openpgp_md_test_algo(DIGEST_ALGO_SHA384)) | |||||
strcat(dummy_string,"H9 "); | |||||
if (!openpgp_md_test_algo(DIGEST_ALGO_SHA256)) | if (!openpgp_md_test_algo(DIGEST_ALGO_SHA256)) | ||||
strcat(dummy_string,"H8 "); | strcat(dummy_string,"H8 "); | ||||
if (!openpgp_md_test_algo(DIGEST_ALGO_SHA224)) | |||||
strcat(dummy_string,"H11 "); | |||||
/* RIPEMD160 */ | /* RIPEMD160 */ | ||||
if (!openpgp_md_test_algo(DIGEST_ALGO_RMD160)) | if (!openpgp_md_test_algo(DIGEST_ALGO_RMD160)) | ||||
strcat(dummy_string,"H3 "); | strcat(dummy_string,"H3 "); | ||||
/* SHA-1 */ | |||||
strcat(dummy_string,"H2 "); | |||||
/* ZLIB */ | /* ZLIB */ | ||||
strcat(dummy_string,"Z2 "); | strcat(dummy_string,"Z2 "); | ||||
Context not available. |