forked from spring-cloud/spring-cloud-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix perf issue of KeyStoreTextEncryptorLocator (spring-cloud#1496)
CipherEnvironmentEncryptor.decrypt() gets a TextEncryptor for each environment property by KeyStoreTextEncryptorLocator.locate() which calls KeyStoreKeyFactory.getKeyPair() to create an instance of RsaSecretEncrptor. Unfortunately KeyStoreKeyFactory.getKeyPair() seems extremely slow for jks files whose format is PKCS12. So we need not to repeat calling the method if possible. Reuse an intance of RsaSecretEncrptor to avoid the performance problem.
- Loading branch information
1 parent
4c7b8df
commit 75f3bbc
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters