Skip to content

Commit

Permalink
extract-jks: Prefer _p11_extract_jks_timestamp to SOURCE_DATE_EPOCH
Browse files Browse the repository at this point in the history
Give _p11_extract_jks_timestamp precedence over SOURCE_DATE_EPOCH so
that the test results are not affected by the envvar settings.
  • Loading branch information
ueno committed Jan 29, 2019
1 parent 1ba80c6 commit 2a474e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trust/extract-jks.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ prepare_jks_buffer (p11_enumerate *ex,
* when this was this certificate was added to the keystore, however
* we don't have that information. Java uses time in milliseconds
*/
{
if (_p11_extract_jks_timestamp)
now = _p11_extract_jks_timestamp;
else {
char *source_date_epoch;
source_date_epoch = secure_getenv ("SOURCE_DATE_EPOCH");
if (source_date_epoch) {
Expand All @@ -276,9 +278,7 @@ prepare_jks_buffer (p11_enumerate *ex,
return false;
}
now = epoch;
} else if (_p11_extract_jks_timestamp)
now = _p11_extract_jks_timestamp;
else
} else
now = time (NULL);
}

Expand Down

0 comments on commit 2a474e1

Please sign in to comment.