Add security improvements and race condition protection

Co-authored-by: warkanum <208308+warkanum@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-30 11:14:59 +00:00
parent ccf8522f88
commit 4f8edd6469
2 changed files with 35 additions and 6 deletions

View File

@@ -332,9 +332,10 @@ func TestShutdownCallbacks(t *testing.T) {
func TestSelfSignedSSLCertificateReuse(t *testing.T) {
logger.Init(true)
// Get cert directory to verify file creation
certDir, err := getCertDirectory()
// Get expected cert directory location
cacheDir, err := os.UserCacheDir()
require.NoError(t, err)
certDir := filepath.Join(cacheDir, "resolvespec", "certs")
host := "localhost"
certFile := filepath.Join(certDir, fmt.Sprintf("%s-cert.pem", host))