Skip to content

Commit

Permalink
s4-backupkey: Cert lifetime of 365 days, not secs
Browse files Browse the repository at this point in the history
hx509_ca_tbs_set_notAfter_lifetime expects the lifetime value in
in seconds. The Windows 7 client didn't seem to care that the lifetime
was only 6'03''. Two other TODOs in this implementation:

* Since notBefore is not set explicietely to "now", the heimdal code
  default of now-(24 hours) is applied.

* Server side validity checks and cert renewal are missing.

Signed-off-by: Arvid Requate <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Garming Sam <[email protected]>
  • Loading branch information
reqa authored and abartlet committed Feb 25, 2015
1 parent 9b2ff26 commit 8980300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source4/rpc_server/backupkey/dcesrv_backupkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ static WERROR generate_bkrp_cert(TALLOC_CTX *ctx, struct dcesrv_call_state *dce_
char *secret_name;
struct bkrp_exported_RSA_key_pair keypair;
enum ndr_err_code ndr_err;
uint32_t nb_days_validity = 365;
uint32_t nb_days_validity = 3600 * 24 * 365;

DEBUG(6, ("Trying to generate a certificate\n"));
hx509_context_init(&hctx);
Expand Down

0 comments on commit 8980300

Please sign in to comment.