Skip to content

Commit 794ec39

Browse files
Merge pull request #12 from cloudfoundry/key-cert-file-bug
Disables watching the private key file for updates
2 parents 3883bfc + cdbc37c commit 794ec39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/cloudfoundry/security/FileWatchingX509ExtendedKeyManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ final class FileWatchingX509ExtendedKeyManager extends X509ExtendedKeyManager {
5555
this.keyManagerFactory = keyManagerFactory;
5656

5757
new FileWatcher(this.certificates, new FileWatcherCallback()).watch();
58-
new FileWatcher(this.privateKey, new FileWatcherCallback()).watch();
58+
// disable watching the key file to prevent race condition bug - a certificate file change covers the key change
59+
// new FileWatcher(this.privateKey, new FileWatcherCallback()).watch();
5960

6061
if (this.keyManager.compareAndSet(null, getKeyManager(getKeyStore()))) {
6162
this.logger.info(String.format("Initialized KeyManager for %s and %s", this.privateKey, this.certificates));

0 commit comments

Comments
 (0)