Correct issue with Bouncy Castle code signing

If the Bouncy Castle Crypto libraries are unsigned, issues result with
the Eclipse build, since they rely on the copy that exists in the
libraries copied by the download_file.py script.  As a workaround, use
a genrule in ConvertKey to unsign the JARs manually.

Change-Id: I44d6ad5b05a18258e8bf5400c42f1cbd159e59b2
This commit is contained in:
Doug Kelly 2015-11-10 12:13:58 -08:00
parent b03dd90524
commit 920b1667d4
2 changed files with 32 additions and 4 deletions

View File

@ -1,12 +1,42 @@
include_defs('//lib/maven.defs')
genrule(
name = 'bcprov__unsign',
cmd = ' && '.join([
'unzip -qd $TMP $(location //lib/bouncycastle:bcprov)',
'cd $TMP',
'zip -Drq $OUT . -x META-INF/\*.RSA META-INF/\*.DSA META-INF/\*.SF META-INF/\*.LIST',
]),
out = 'bcprov-unsigned.jar',
)
prebuilt_jar(
name = 'bcprov',
binary_jar = ':bcprov__unsign',
)
genrule(
name = 'bcpkix__unsign',
cmd = ' && '.join([
'unzip -qd $TMP $(location //lib/bouncycastle:bcpkix)',
'cd $TMP',
'zip -Drq $OUT . -x META-INF/\*.RSA META-INF/\*.DSA META-INF/\*.SF META-INF/\*.LIST',
]),
out = 'bcpkix-unsigned.jar',
)
prebuilt_jar(
name = 'bcpkix',
binary_jar = ':bcpkix__unsign',
)
java_library(
name = 'convertkey__lib',
srcs = glob(['src/main/java/**/*.java']),
deps = [
':bcprov',
':bcpkix',
'//lib:jsch',
'//lib/bouncycastle:bcprov',
'//lib/bouncycastle:bcpkix',
'//lib/log:nop',
'//lib/mina:sshd',
],

View File

@ -8,7 +8,6 @@ maven_jar(
name = 'bcprov',
id = 'org.bouncycastle:bcprov-jdk15on:' + VERSION,
sha1 = '88a941faf9819d371e3174b5ed56a3f3f7d73269',
unsign = True,
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
)
@ -24,7 +23,6 @@ maven_jar(
name = 'bcpkix',
id = 'org.bouncycastle:bcpkix-jdk15on:' + VERSION,
sha1 = 'b8ffac2bbc6626f86909589c8cc63637cc936504',
unsign = True,
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
deps = [':bcprov'],
)