Skip to content

Update HttpEce to use BC provider when calling KeyAgreement - #205

Open
frmans wants to merge 1 commit into
web-push-libs:masterfrom
frmans:patch-1
Open

Update HttpEce to use BC provider when calling KeyAgreement#205
frmans wants to merge 1 commit into
web-push-libs:masterfrom
frmans:patch-1

Conversation

@frmans

Copy link
Copy Markdown

Since there already is a dependency to BouncyCastle in Utils.java it doesn't add any more restrictions doing this, also this solves the following issue #5

Since there already is a dependency to BouncyCastle in Utils.java it doesn't add any more restrictions doing this, also this solves the following issue web-push-libs#5
@dofs197

Copy link
Copy Markdown

This is useful patch. It helped me to reveal the problem under wildfly: https://issues.redhat.com/browse/WFLY-4576

java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:105)
at javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:230)
at nl.martijndwars.webpush.HttpEce.extractDH(HttpEce.java:360)
...
Caused by: java.lang.SecurityException: Cannot verify jar:vfs:/content/runawfe.ear/lib/bcprov-debug-jdk18on-1.73.jar!/
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:448)
...
Caused by: java.security.PrivilegedActionException: java.util.zip.ZipException: zip file is empty
at java.security.AccessController.doPrivileged(Native Method)
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:426)
... 75 more
Caused by: java.util.zip.ZipException: zip file is empty
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
... 77 more
Suppressed: java.nio.file.NoSuchFileException: /tmp/jar_cache2337284540188290599.tmp
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
... 86 more

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@frmans@dofs197