(subject string)
| 885 | } |
| 886 | |
| 887 | func (t *TLS) HasCertificateForSubject(subject string) bool { |
| 888 | certCacheMu.RLock() |
| 889 | allMatchingCerts := certCache.AllMatchingCertificates(subject) |
| 890 | certCacheMu.RUnlock() |
| 891 | for _, cert := range allMatchingCerts { |
| 892 | // check if the cert is manually loaded by this config |
| 893 | if _, ok := t.loaded[cert.Hash()]; ok { |
| 894 | return true |
| 895 | } |
| 896 | // check if the cert is automatically managed by this config |
| 897 | for _, name := range cert.Names { |
| 898 | if _, ok := t.managing[name]; ok { |
| 899 | return true |
| 900 | } |
| 901 | } |
| 902 | } |
| 903 | return false |
| 904 | } |
| 905 | |
| 906 | // keepStorageClean starts a goroutine that immediately cleans up all |
| 907 | // known storage units if it was not recently done, and then runs the |
no test coverage detected