Skip to contentSkip to conversation

KEYS: pass expiry from X.509 cert to key structure

PATCH RESEND David Howells 3 participants 5 messages Aug 30, 2019 – Sep 2, 2019 Keys/keyrings

lore
Share & tools
lore
author maintainer
#1 lore raw
Quoted 1 line · Yihao Wu

+ prep->expiry = cert->valid_to;

Note that this patch has whitespace breakage, but I can fix that up by hand.

David

#3 lore raw
In reply to David Howells
Quoted 8 lines · David Howells
Quoted 1 line · Yihao Wu

+ prep->expiry = cert->valid_to;

Note that this patch has whitespace breakage, but I can fix that up by hand.

David

Thanks!

Yihao

author maintainer
#4 lore raw
In reply to David Howells
Quoted 3 lines · Yihao Wu

Expiry time is not utilized by X.509 cert yet. This patch reads expiry from X.509 cert into key_preparsed_payload. Then it is passed to key structure when the key is being instantiated.

Thinking on it again, it's more complicated than you think: Unless you can guarantee that the system clock is correct at time of boot, this may cause the system to fail to boot. The certs used for module signing and suchlike may appear to be expired because the clock is wrong and thus not be usable.

David