jiazhai opened a new pull request #7453:
URL: https://github.com/apache/pulsar/pull/7453
### Motivation
shade bouncy castle will cause some signature errors, this PR tries to
remove the bouncy castle shaded module.
Here is the related error stack:
```
10:01:34.257 [pulsar-client-io-33-1] ERROR
org.apache.pulsar.client.impl.ConsumerImpl - MessageCryptoBc may not included
in the jar. e:
java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.Cipher.getInstance(Cipher.java:657) ~[?:1.8.0_121]
at javax.crypto.Cipher.getInstance(Cipher.java:596) ~[?:1.8.0_121]
at
org.apache.pulsar.client.impl.crypto.MessageCryptoBc.<init>(MessageCryptoBc.java:147)
~[classes/:?]
at
org.apache.pulsar.client.impl.ConsumerImpl.<init>(ConsumerImpl.java:270)
~[classes/:?]
at
org.apache.pulsar.client.impl.ConsumerImpl.newConsumerImpl(ConsumerImpl.java:209)
~[classes/:?]
at
org.apache.pulsar.client.impl.PulsarClientImpl.lambda$doSingleTopicSubscribeAsync$5(PulsarClientImpl.java:364)
~[classes/:?]
at
java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
~[?:1.8.0_131]
at
java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
~[?:1.8.0_131]
...
Caused by: java.util.jar.JarException:
file:/Users/jia/.m2/repository/org/apache/pulsar/bouncy-castle-bc-shaded/2.7.0-SNAPSHOT/bouncy-castle-bc-shaded-2.7.0-SNAPSHOT.jar
has unsigned entries - org/bouncycastle/cert/AttributeCertificateHolder.class
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:500)
~[?:1.8.0_121]
at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361)
~[?:1.8.0_121]
at javax.crypto.JarVerifier.verify(JarVerifier.java:289) ~[?:1.8.0_121]
at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:159)
~[?:1.8.0_121]
at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:185)
~[?:1.8.0_121]
at javax.crypto.Cipher.getInstance(Cipher.java:653) ~[?:1.8.0_121]
```
### Modifications
- Remove bouncy castle shaded module.
- enhance test case to identify this error.
### Verifying this change
ut passed.
### documentation
put doc changes in a separate PR #7454. so it is easier for the release
manager to cherry-pick this PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]