Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5776 - isCertificateExpired gets 5 min time buffer #5791

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion Account/FxAState.swift
Expand Up @@ -319,7 +319,8 @@ open class MarriedState: TokenKeysAndKeyPair {
}

func isCertificateExpired(_ now: Timestamp) -> Bool {
return certificateExpiresAt < now
// Without the 5 min early expiration, the certificate may be too close to expiring, and expire by the time it gets used.
return certificateExpiresAt < now - (5 * OneMinuteInMilliseconds)
}

func withoutKeyPair() -> CohabitingBeforeKeyPairState {
Expand Down