I am able now to change the algorithm using the JCE provider by simply adding the corresponding entry:
[secureConfig]
cipher = PBEWithSHA1AndDESede
I tried the same in the past and I couldn't make it work so most likely I missed something.
I've been trying to use a stronger algorithm with BC by downloading it to my corresponding lib directory
curl -o /var/gerrit/lib/bcprov-jdk18-176.jar https://www.bouncycastle.org/download/bcprov-jdk18on-176.jar
And adapting gerrit.config
[secureConfig]
jceProvider= BC
cipher = PBEWithMD2AndDES
but I keep getting the next:
fatal: 1) [Guice/ErrorInjectingConstructor]: NullPointerException
fatal: at InitContainer.<init>(InitContainer.java:44)
fatal: at InitContainer.class(InitContainer.java:44)
fatal: while locating InitContainer
fatal: while locating InitStep annotated with @UniqueAnnotations$Internal(value=10)
fatal:
fatal: Learn more:
fatal: https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR
fatal: Caused by: NullPointerException
fatal: at java.base/Security.insertProviderAt(Security.java:363)
fatal: at java.base/Security.addProvider(Security.java:408)
fatal: at PBECodec.<init>(PBECodec.java:49)I tried again adding the next setup just in case (not sure this would actually be required) but didn't make any difference
// gerrit.config
[container]
javaOptions = -Djava.security.properties=/var/gerrit/etc/bouncycastle.security
// /var/gerrit/etc/bouncycastle.security
security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider
I think this might be more a Java issue than Gerrit itself though but I'm not really familiar with it.