certtool-cfg.c | certtool-cfg.c | |||
---|---|---|---|---|
skipping to change at line 106 | skipping to change at line 106 | |||
{ .name = "state", .type = OPTION_STRING }, | { .name = "state", .type = OPTION_STRING }, | |||
{ .name = "dn", .type = OPTION_STRING }, | { .name = "dn", .type = OPTION_STRING }, | |||
{ .name = "cn", .type = OPTION_STRING }, | { .name = "cn", .type = OPTION_STRING }, | |||
{ .name = "uid", .type = OPTION_STRING }, | { .name = "uid", .type = OPTION_STRING }, | |||
{ .name = "challenge_password", .type = OPTION_STRING }, | { .name = "challenge_password", .type = OPTION_STRING }, | |||
{ .name = "password", .type = OPTION_STRING }, | { .name = "password", .type = OPTION_STRING }, | |||
{ .name = "pkcs9_email", .type = OPTION_STRING }, | { .name = "pkcs9_email", .type = OPTION_STRING }, | |||
{ .name = "country", .type = OPTION_STRING }, | { .name = "country", .type = OPTION_STRING }, | |||
{ .name = "expiration_date", .type = OPTION_STRING }, | { .name = "expiration_date", .type = OPTION_STRING }, | |||
{ .name = "activation_date", .type = OPTION_STRING }, | { .name = "activation_date", .type = OPTION_STRING }, | |||
{ .name = "crl_revocation_date", .type = OPTION_STRING }, | ||||
{ .name = "crl_this_update_date", .type = OPTION_STRING }, | ||||
{ .name = "crl_next_update_date", .type = OPTION_STRING }, | ||||
{ .name = "policy*", .type = OPTION_MULTI_LINE }, /* not a multi-lin e but there are multi as it is a wildcard */ | { .name = "policy*", .type = OPTION_MULTI_LINE }, /* not a multi-lin e but there are multi as it is a wildcard */ | |||
{ .name = "pkcs12_key_name", .type = OPTION_STRING }, | { .name = "pkcs12_key_name", .type = OPTION_STRING }, | |||
{ .name = "proxy_policy_language", .type = OPTION_STRING }, | { .name = "proxy_policy_language", .type = OPTION_STRING }, | |||
{ .name = "serial", .type = OPTION_NUMERIC }, | { .name = "serial", .type = OPTION_NUMERIC }, | |||
{ .name = "expiration_days", .type = OPTION_NUMERIC }, | { .name = "expiration_days", .type = OPTION_NUMERIC }, | |||
{ .name = "crl_next_update", .type = OPTION_NUMERIC }, | { .name = "crl_next_update", .type = OPTION_NUMERIC }, | |||
{ .name = "crl_number", .type = OPTION_NUMERIC }, | { .name = "crl_number", .type = OPTION_NUMERIC }, | |||
{ .name = "path_len", .type = OPTION_NUMERIC }, | { .name = "path_len", .type = OPTION_NUMERIC }, | |||
{ .name = "ca", .type = OPTION_BOOLEAN }, | { .name = "ca", .type = OPTION_BOOLEAN }, | |||
{ .name = "honor_crq_extensions", .type = OPTION_BOOLEAN }, | { .name = "honor_crq_extensions", .type = OPTION_BOOLEAN }, | |||
skipping to change at line 160 | skipping to change at line 163 | |||
char **dn_oid; | char **dn_oid; | |||
char **permitted_nc_dns; | char **permitted_nc_dns; | |||
char **excluded_nc_dns; | char **excluded_nc_dns; | |||
char **permitted_nc_email; | char **permitted_nc_email; | |||
char **excluded_nc_email; | char **excluded_nc_email; | |||
char **crl_dist_points; | char **crl_dist_points; | |||
char *password; | char *password; | |||
char *pkcs12_key_name; | char *pkcs12_key_name; | |||
char *expiration_date; | char *expiration_date; | |||
char *activation_date; | char *activation_date; | |||
char *revocation_date; | ||||
char *this_update_date; | ||||
char *next_update_date; | ||||
int64_t serial; | int64_t serial; | |||
int expiration_days; | int expiration_days; | |||
int ca; | int ca; | |||
int path_len; | int path_len; | |||
int tls_www_client; | int tls_www_client; | |||
int tls_www_server; | int tls_www_server; | |||
int signing_key; | int signing_key; | |||
int encryption_key; | int encryption_key; | |||
int cert_sign_key; | int cert_sign_key; | |||
int crl_sign_key; | int crl_sign_key; | |||
skipping to change at line 378 | skipping to change at line 384 | |||
cfg.country = strdup(val->v.strVal); | cfg.country = strdup(val->v.strVal); | |||
val = optionGetValue(pov, "expiration_date"); | val = optionGetValue(pov, "expiration_date"); | |||
if (val != NULL && val->valType == OPARG_TYPE_STRING) | if (val != NULL && val->valType == OPARG_TYPE_STRING) | |||
cfg.expiration_date = strdup(val->v.strVal); | cfg.expiration_date = strdup(val->v.strVal); | |||
val = optionGetValue(pov, "activation_date"); | val = optionGetValue(pov, "activation_date"); | |||
if (val != NULL && val->valType == OPARG_TYPE_STRING) | if (val != NULL && val->valType == OPARG_TYPE_STRING) | |||
cfg.activation_date = strdup(val->v.strVal); | cfg.activation_date = strdup(val->v.strVal); | |||
val = optionGetValue(pov, "crl_revocation_date"); | ||||
if (val != NULL && val->valType == OPARG_TYPE_STRING) | ||||
cfg.revocation_date = strdup(val->v.strVal); | ||||
val = optionGetValue(pov, "crl_this_update_date"); | ||||
if (val != NULL && val->valType == OPARG_TYPE_STRING) | ||||
cfg.this_update_date = strdup(val->v.strVal); | ||||
val = optionGetValue(pov, "crl_next_update_date"); | ||||
if (val != NULL && val->valType == OPARG_TYPE_STRING) | ||||
cfg.next_update_date = strdup(val->v.strVal); | ||||
for (i = 0; i < MAX_POLICIES; i++) { | for (i = 0; i < MAX_POLICIES; i++) { | |||
snprintf(tmpstr, sizeof(tmpstr), "policy%d", i + 1); | snprintf(tmpstr, sizeof(tmpstr), "policy%d", i + 1); | |||
val = optionGetValue(pov, tmpstr); | val = optionGetValue(pov, tmpstr); | |||
if (val != NULL && val->valType == OPARG_TYPE_STRING) | if (val != NULL && val->valType == OPARG_TYPE_STRING) | |||
cfg.policy_oid[i] = strdup(val->v.strVal); | cfg.policy_oid[i] = strdup(val->v.strVal); | |||
if (cfg.policy_oid[i] != NULL) { | if (cfg.policy_oid[i] != NULL) { | |||
snprintf(tmpstr, sizeof(tmpstr), "policy%d_url", | snprintf(tmpstr, sizeof(tmpstr), "policy%d_url", | |||
i + 1); | i + 1); | |||
val = optionGetValue(pov, tmpstr); | val = optionGetValue(pov, tmpstr); | |||
skipping to change at line 1193 | skipping to change at line 1211 | |||
time_t get_activation_date(void) | time_t get_activation_date(void) | |||
{ | { | |||
if (batch && cfg.activation_date != NULL) { | if (batch && cfg.activation_date != NULL) { | |||
return get_date(cfg.activation_date); | return get_date(cfg.activation_date); | |||
} | } | |||
return time(NULL); | return time(NULL); | |||
} | } | |||
time_t get_crl_revocation_date(void) | ||||
{ | ||||
if (batch && cfg.revocation_date != NULL) { | ||||
return get_date(cfg.revocation_date); | ||||
} | ||||
return time(NULL); | ||||
} | ||||
time_t get_crl_this_update_date(void) | ||||
{ | ||||
if (batch && cfg.this_update_date != NULL) { | ||||
return get_date(cfg.this_update_date); | ||||
} | ||||
return time(NULL); | ||||
} | ||||
static | static | |||
time_t days_to_secs(int days) | time_t days_to_secs(int days) | |||
{ | { | |||
time_t secs = days; | time_t secs = days; | |||
time_t now = time(NULL); | time_t now = time(NULL); | |||
if (secs != (time_t)-1) { | if (secs != (time_t)-1) { | |||
if (INT_MULTIPLY_OVERFLOW(secs, 24*60*60)) { | if (INT_MULTIPLY_OVERFLOW(secs, 24*60*60)) { | |||
goto overflow; | goto overflow; | |||
} else { | } else { | |||
skipping to change at line 1846 | skipping to change at line 1884 | |||
} else { | } else { | |||
return | return | |||
read_yesno | read_yesno | |||
("Will the certificate be used for IPsec IKE operations? (y/N): ", | ("Will the certificate be used for IPsec IKE operations? (y/N): ", | |||
0); | 0); | |||
} | } | |||
} | } | |||
time_t get_crl_next_update(void) | time_t get_crl_next_update(void) | |||
{ | { | |||
return get_int_date(NULL, cfg.crl_next_update, "The next CRL will be issued in (days): "); | return get_int_date(cfg.next_update_date, cfg.crl_next_update, "The next CRL will be issued in (days): "); | |||
} | } | |||
const char *get_proxy_policy(char **policy, size_t * policylen) | const char *get_proxy_policy(char **policy, size_t * policylen) | |||
{ | { | |||
const char *ret; | const char *ret; | |||
if (batch) { | if (batch) { | |||
ret = cfg.proxy_policy_language; | ret = cfg.proxy_policy_language; | |||
if (!ret) | if (!ret) | |||
ret = "1.3.6.1.5.5.7.21.1"; | ret = "1.3.6.1.5.5.7.21.1"; | |||
End of changes. 5 change blocks. | ||||
1 lines changed or deleted | 39 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |