diff options
author | Ivan Frade <ifrade@google.com> | 2023-11-17 10:14:26 -0800 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2023-11-17 10:17:28 -0800 |
commit | 52af8dbaff46191203b033f05a9fbc1ff0a46886 (patch) | |
tree | 7a1ffc6bf7ad8843319290a1f77a2c0e0d23cbdb | |
parent | 5c173c632d184d9fc5dd7994b2eccb7c9d28511f (diff) | |
download | jgit-52af8dbaff46191203b033f05a9fbc1ff0a46886.tar.gz jgit-52af8dbaff46191203b033f05a9fbc1ff0a46886.zip |
gpg.bc: Supress errorprone InsecureCryptoUsage
From errorprone doc: "Dynamically constructed transformation strings
are also flagged, as they may conceal an instance of ECB mode."
https://errorprone.info/bugpattern/InsecureCryptoUsage
Silence the message as a quick relief.
Change-Id: I348f0fff0e3b24ce1f11917e849b4095b186d1f0
-rw-r--r-- | org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java index 68f8a45555..3924d68596 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java @@ -75,6 +75,10 @@ class OCBPBEProtectionRemoverFactory .getSymmetricCipherName(encAlgorithm); byte[] decrypted = null; try { + // errorprone: "Dynamically constructed transformation + // strings are also flagged, as they may conceal an instance + // of ECB mode." + @SuppressWarnings("InsecureCryptoUsage") Cipher c = Cipher .getInstance(algorithmName + "/OCB/NoPadding"); //$NON-NLS-1$ SecretKey secretKey = new SecretKeySpec(key, algorithmName); |