commit | 76ff279b1d788a1fa865bf65ecfa8f4c611d7d84 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Sun Apr 30 22:06:37 2017 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Fri May 12 15:21:02 2017 +0000 |
tree | 614df12d472ab743dd0894ed4e4b92506b7a8587 | |
parent | 897f7c60477c57c828068e2c33fd66de045e1cee [diff] |
Silent InsecureCipherMode Bazel has error-prone enabled which cases a build failure when creating the Cipher. This is a demo plugin on how to secure a config file with encryption: it is explicitily not targeting the highest level of security. Change-Id: Ia0058bcea76539d4f75de0bed3bc27343a914a2c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/secureconfig/PBECodec.java b/src/main/java/com/googlesource/gerrit/plugins/secureconfig/PBECodec.java index 9b7c1ba..e592eaf 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/secureconfig/PBECodec.java +++ b/src/main/java/com/googlesource/gerrit/plugins/secureconfig/PBECodec.java
@@ -88,6 +88,7 @@ private Cipher getCipher() throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException { + @SuppressWarnings("InsecureCipherMode") Cipher encoder = Cipher.getInstance(config.getCipher(), config.getJCEProvider()); return encoder;