Commit db69ac3 1 parent ec2bd58 commit db69ac3 Copy full SHA for db69ac3
File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ func warnOnEarlyExpiration(
412
412
// Calculate a rough TTL, assuming this was called shortly after the
413
413
// identity was returned. We'll add a minute buffer to compensate and avoid
414
414
// superfluous warning messages.
415
- effectiveTTL := ident .TLSIdentity .Expires . Sub ( time . Now () ) + time .Minute
415
+ effectiveTTL := time . Until ( ident .TLSIdentity .Expires ) + time .Minute
416
416
417
417
if effectiveTTL < lifetime .TTL {
418
418
l := log .With (
@@ -428,12 +428,14 @@ func warnOnEarlyExpiration(
428
428
// particular limited the TTL.
429
429
430
430
if effectiveTTL < lifetime .RenewalInterval {
431
+ //nolint:sloglint // multiline string is actually constant
431
432
l .WarnContext (ctx , "The server returned an identity shorter than " +
432
433
"expected and below the configured renewal interval, probably " +
433
434
"due to a `max_session_ttl` configured on a server-side role. " +
434
435
"Unless corrected, the credentials will be invalid for some " +
435
436
"period until renewal." )
436
437
} else {
438
+ //nolint:sloglint // multiline string is actually constant
437
439
l .WarnContext (ctx , "The server returned an identity shorter than " +
438
440
"the requested TTL, probably due to a `max_session_ttl` " +
439
441
"configured on a server-side role. It may not remain valid as " +
You can’t perform that action at this time.
0 commit comments