611
get_bits (gnutls_pk_algorithm_t key_type, int info_bits, const char* info_sec_param)
617
static int warned = 0;
623
"** Note: Please use the --sec-param instead of --bits\n");
632
gnutls_sec_param_to_pk_bits (key_type,
633
str_to_sec_param (info_sec_param));
637
gnutls_sec_param_to_pk_bits (key_type, GNUTLS_SEC_PARAM_NORMAL);
643
gnutls_sec_param_t str_to_sec_param (const char *str)
645
if (strcasecmp (str, "low") == 0)
647
return GNUTLS_SEC_PARAM_LOW;
649
else if (strcasecmp (str, "normal") == 0)
651
return GNUTLS_SEC_PARAM_NORMAL;
653
else if (strcasecmp (str, "high") == 0)
655
return GNUTLS_SEC_PARAM_HIGH;
657
else if (strcasecmp (str, "ultra") == 0)
659
return GNUTLS_SEC_PARAM_ULTRA;
663
fprintf (stderr, "Unknown security parameter string: %s\n", str);