version 1.28, 2000/06/20 01:39:40 |
version 1.29, 2000/07/10 16:30:25 |
|
|
int |
int |
ciphers_valid(const char *names) |
ciphers_valid(const char *names) |
{ |
{ |
char *ciphers; |
char *ciphers, *cp; |
char *p; |
char *p; |
int i; |
int i; |
|
|
if (names == NULL || strcmp(names, "") == 0) |
if (names == NULL || strcmp(names, "") == 0) |
return 0; |
return 0; |
ciphers = xstrdup(names); |
ciphers = cp = xstrdup(names); |
for ((p = strtok(ciphers, CIPHER_SEP)); p; (p = strtok(NULL, CIPHER_SEP))) { |
for ((p = strsep(&cp, CIPHER_SEP)); p && *p != '\0'; |
|
(p = strsep(&cp, CIPHER_SEP))) { |
i = cipher_number(p); |
i = cipher_number(p); |
if (i == -1 || !(cipher_mask2() & (1 << i))) { |
if (i == -1 || !(cipher_mask2() & (1 << i))) { |
xfree(ciphers); |
xfree(ciphers); |