mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge remote-tracking branch 'public/bug20558'
This commit is contained in:
commit
b5d738e481
@ -156,11 +156,12 @@ tor_cert_parse(const uint8_t *encoded, const size_t len)
|
||||
cert->encoded_len = len;
|
||||
|
||||
memcpy(cert->signed_key.pubkey, parsed->certified_key, 32);
|
||||
const int64_t valid_until_64 = ((int64_t)parsed->exp_field) * 3600;
|
||||
int64_t valid_until_64 = ((int64_t)parsed->exp_field) * 3600;
|
||||
#if SIZEOF_TIME_T < SIZEOF_INT64_T
|
||||
if (valid_until_64 > TIME_MAX)
|
||||
cert->valid_until = TIME_MAX - 1;
|
||||
else
|
||||
cert->valid_until = (time_t) valid_until_64;
|
||||
valid_until_64 = TIME_MAX - 1;
|
||||
#endif
|
||||
cert->valid_until = (time_t) valid_until_64;
|
||||
cert->cert_type = parsed->cert_type;
|
||||
|
||||
for (unsigned i = 0; i < ed25519_cert_getlen_ext(parsed); ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user