Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as2-servlet: JCE cannot authenticate the provider BC #49

Closed
yusufbata opened this issue Jul 31, 2018 · 6 comments
Closed

as2-servlet: JCE cannot authenticate the provider BC #49

yusufbata opened this issue Jul 31, 2018 · 6 comments
Assignees
Labels

Comments

@yusufbata
Copy link

I'm getting the following error when trying to receive a message using as2-servlet:

ERROR [com.helger.as2lib.processor.receiver.net.AS2ReceiverHandler] (default task-8) Error decrypting [<MY-JUNIT-TEST-CASE-phax-as2-lib-31072018232014+0200-1843@OpenAS2B_OID_OpenAS2A_OID>]: JCE cannot authenticate the provider BC

I've tried a number of options found online without any success. Any ideas on how to resolve this?

Thanks!
Yusuf

@phax phax self-assigned this Aug 1, 2018
@phax phax added the question label Aug 1, 2018
@phax
Copy link
Owner

phax commented Aug 1, 2018

Hi. I'm on vacation this week so I only have quick ideas: is BouncyCastle in your classpath? If yes which version? The latest version of BC is 1.60.
Hth Philip

@yusufbata
Copy link
Author

Thanks for the quick reply!

I've packaged BouncyCastle version 1.59, as well as 1.60 - same issue occurs with both.

Do you have a working example project that contains as2-servlet (i.e. a deployable war)?

Thanks!
Yusuf

@phax
Copy link
Owner

phax commented Aug 1, 2018

What does packaged mean? Maven assembly plugin and BC does not work, because BC is a signed JAR! Also uberjar and all that stuff must be handled with care. A sgandalone example for using as2-servlet is available and will be published after my vacation next week. So stay tuned

@phax
Copy link
Owner

phax commented Aug 6, 2018

Did the hint on packaging help you? Did this solve your issue?
https://vzurczak.wordpress.com/2017/09/04/bouncycastle-osgi-and-uber-jars/ contains the explanation.
Try e.g. https://stackoverflow.com/questions/17658831/how-can-i-exclude-dsa-and-sf-files-from-shaded-jar for a possibility to exclude *.SF, .DSA,.RSA

@yusufbata
Copy link
Author

Thanks Philip - excluded the bouncy castle dependencies from the war and its working perfectly.

@phax
Copy link
Owner

phax commented Aug 7, 2018

Great that it works :)

@phax phax closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants