keychain_free(keychain);
}
-static struct key *key_lookup(const struct keychain *keychain, u_int32_t index)
+static struct key *key_lookup(const struct keychain *keychain, uint32_t index)
{
struct listnode *node;
struct key *key;
}
struct key *key_lookup_for_accept(const struct keychain *keychain,
- u_int32_t index)
+ uint32_t index)
{
struct listnode *node;
struct key *key;
if (key->accept.start == 0
|| (key->accept.start <= now
&& (key->accept.end >= now || key->accept.end == -1)))
- if (strncmp(key->string, auth_str, 16) == 0)
+ if (key->string && (strncmp(key->string, auth_str, 16) == 0))
return key;
}
return NULL;
return NULL;
}
-static struct key *key_get(const struct keychain *keychain, u_int32_t index)
+static struct key *key_get(const struct keychain *keychain, uint32_t index)
{
struct key *key;
int idx_number = 1;
VTY_DECLVAR_CONTEXT(keychain, keychain);
struct key *key;
- u_int32_t index;
+ uint32_t index;
index = strtoul(argv[idx_number]->arg, NULL, 10);
key = key_get(keychain, index);
int idx_number = 2;
VTY_DECLVAR_CONTEXT(keychain, keychain);
struct key *key;
- u_int32_t index;
+ uint32_t index;
index = strtoul(argv[idx_number]->arg, NULL, 10);
key = key_lookup(keychain, index);
const char *duration_str)
{
time_t time_start;
- u_int32_t duration;
+ uint32_t duration;
time_start = key_str2time(stime_str, sday_str, smonth_str, syear_str);
if (time_start < 0) {