Exclude bouncycastle key files to fix SecurityException upon plugin-api
Exclude the 2 bouncycastle key files from the 2 downloaded jar files
that are repackaged into our gerrit plugin-api jar. Do so in order to
fix a SecurityException [1] thrown upon using the plugin api from plugin
IT tests [2] in standalone (non-tree) mode.
Indeed, BCKEY.DSA and BCKEY.SF used to be repackaged under META-INF/ in
our gerrit plugin-api jar. Doing so caused that exception [1], as such
BCKEY files did not properly sign our built plugin-api jar; they
strictly belonged to their 2 mother bouncycastle jar files. Our jar used
to have 2 sets of such key files, one set coming from bcprov and the
other from bcpg (the 2 bouncycastle libs involved herein). This fix
removes them all 4 (BC key files) from the resulting plugin-api jar:
jar tvf gerrit-plugin-api-2.12-SNAPSHOT.jar | grep BCKEY
=> (before this fix)
26965 Sun Mar 01 12:09:10 EST 2015 META-INF/BCKEY.SF
2219 Sun Mar 01 12:09:10 EST 2015 META-INF/BCKEY.DSA
269297 Sun Mar 01 12:09:32 EST 2015 META-INF/BCKEY.SF
2219 Sun Mar 01 12:09:32 EST 2015 META-INF/BCKEY.DSA
This fix is first for plugin IT tests [2], which expose this issue as
the first 'pure' plugin-api jar loaders. Such BC libs started to be
-needfully- introduced in acceptance testing by commit ed170f3
.
[1] java.lang.SecurityException: Invalid signature file digest for
Manifest main attributes
[2] https://gerrit-review.googlesource.com/#/q/topic:Plugin-IT-tests
Change-Id: Iea2c61ea026e8ee17684a82f0ec41d77d30e02e5
This commit is contained in:
parent
3b2aa8aace
commit
3420d83f39
@ -9,6 +9,7 @@ maven_jar(
|
||||
id = 'org.bouncycastle:bcprov-jdk15on:' + VERSION,
|
||||
sha1 = '88a941faf9819d371e3174b5ed56a3f3f7d73269',
|
||||
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
|
||||
exclude = ['META-INF/BCKEY.*'],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
@ -16,6 +17,7 @@ maven_jar(
|
||||
id = 'org.bouncycastle:bcpg-jdk15on:' + VERSION,
|
||||
sha1 = 'ff4665a4b5633ff6894209d5dd10b7e612291858',
|
||||
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
|
||||
exclude = ['META-INF/BCKEY.*'],
|
||||
deps = [':bcprov'],
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user