diff --git a/lib/client/client_store.go b/lib/client/client_store.go index f00992b513cef..d10b1b47a7b4b 100644 --- a/lib/client/client_store.go +++ b/lib/client/client_store.go @@ -127,11 +127,11 @@ func (s *Store) GetKeyRing(idx KeyRingIndex, opts ...CertOption) (*KeyRing, erro return nil, trace.Wrap(err) } - tlsCertExpiration, err := keyRing.TeleportTLSCertValidBefore() + // verify that the key ring has a TLS certificate + _, err = keyRing.TeleportTLSCertValidBefore() if err != nil { return nil, trace.Wrap(err) } - s.log.Debugf("Teleport TLS certificate valid until %q.", tlsCertExpiration) // Validate the SSH certificate. if keyRing.Cert != nil { diff --git a/tool/tsh/common/tsh_test.go b/tool/tsh/common/tsh_test.go index d8c58df31ec99..e19a3b945517d 100644 --- a/tool/tsh/common/tsh_test.go +++ b/tool/tsh/common/tsh_test.go @@ -5871,11 +5871,11 @@ func TestLogout(t *testing.T) { err = Run(context.Background(), []string{"logout"}, setHomePath(tmpHomePath)) require.NoError(t, err, trace.DebugReport(err)) - // direcory should be empty. + // directory should be empty. f, err := os.Open(tmpHomePath) require.NoError(t, err) - _, err = f.Readdir(1) - require.ErrorIs(t, err, io.EOF) + entries, err := f.ReadDir(1) + require.ErrorIs(t, err, io.EOF, "expected empty directory, but found %v", entries) }) } }