Comments (3)
we repackage the class files of License3J and its dependencies (in this case the BCprov jar) into this jar.
With that you loose the signature created by BC. The solution is to use the original JAR. Anything else is wrong approach.
On Thu, Apr 24, 2014 at 9:06 PM, Raghavendranc [email protected]
wrote:
Hi,
We are working on a standalone application where License3j is used for Licensing feature, and License3j in turn uses bouncy castle (bcprov-jdk16-1.46.jar). Our product is a jar and we repackage the class files of License3J and its dependencies (in this case the BCprov jar) into this jar.
When we tried to execute our application through command line, we are getting the following exception, “JCE cannot authenticate the provider BC” (Please find the attached stack trace).
Caused by: org.bouncycastle.openpgp.PGPException: Exception creating cipher
at org.bouncycastle.openpgp.PGPSecretKey.extractKeyData(Unknown Source)
~[LicenseGenerator-2.0.0-467.jar:na]
at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(Unknown Sourc
e) ~[LicenseGenerator-2.0.0-467.jar:na]
at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(Unknown Sourc
e) ~[LicenseGenerator-2.0.0-467.jar:na]
at com.verhas.licensor.License.encodeLicense(License.java:465) ~[License
Generator-2.0.0-467.jar:na]
at com.truvenhealth.analyticsengine.licensegenerator.LicenseGeneratorImp
l.createLicense(LicenseGeneratorImpl.java:105) ~[LicenseGenerator-2.0.0-467.jar:
na]
... 2 common frames omitted
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.Cipher.getInstance(DashoA13_..) ~[na:1.6]
... 7 common frames omitted
Caused by: java.util.jar.JarException: Cannot parse file:/C:/Users/dharanirajd/D
esktop/Test/Test3/LicenseGenerator-2.0.0-467.jar
at javax.crypto.SunJCE_c.a(DashoA13_..) ~[na:1.6]
at javax.crypto.SunJCE_b.b(DashoA13_..) ~[na:1.6]
at javax.crypto.SunJCE_b.a(DashoA13_..) ~[na:1.6]
... 8 common frames omitted
While making the BC as an installed/bundled provider (placing the bcprov jar in the jre ext folder worked), we do not want this. We want the bcprov classes to be within our jar and want the BC to be registered dynamically.
We tried with the following scenarios, like,
- Set the Bouncy castle jar in the classpath
- Set the Provider dynamically with the priority, as, “Security.insertProviderAt(new BouncyCastleProvider(), 2)”
- Also edited the java.policy file and set the grant permission for the bouncy castle jar.
Even after all the above 3 steps we are still getting the above exception.
But if we place the bouncy castle jar in the JAVA’s ext folder, then it’s working, but we didn’t want to go with that approach.
Can you please help us with your suggestions on how to get this working.
Thanks and RegardsRaga
Reply to this email directly or view it on GitHub:
#5
from license3j.
@verhas : Actually the version of License 3j that we are using is 1.0.3 (latest). This uses Bouncy castle version jdk16-1.46 which though signed does not work still as the certificate is expired. Any suggestions how we can get this right?
from license3j.
I will release a new version with newer dependency.
Workaround until that time: update dependency in pom and recompile license3j 1.0.3 as 1.0.3.yourname
Peter
On Fri, Apr 25, 2014 at 12:40 PM, pka123 [email protected] wrote:
@verhas : Actually the version of License 3j that we are using is 1.0.3 (latest). This uses Bouncy castle version jdk16-1.46 which though signed does not work still as the certificate is expired. Any suggestions how we can get this right?
Reply to this email directly or view it on GitHub:
#5 (comment)
from license3j.
Related Issues (20)
- License verification on Ubuntu vs Windows HOT 14
- License file is not closed after reading it HOT 1
- missing class HOT 1
- Exception when use a string with colon HOT 3
- Support for offline licensing HOT 7
- Improve performance by reducing / deferring Stream terminal operations HOT 1
- Sample and How to for new version HOT 1
- java.lang.ClassNotFoundException: javax0.license3j.io.LicenseReader
- A new version with org.bouncycastle:bcprov-jdk15on v1.60 HOT 5
- Question - Warning updating from 1.0.4 to 2.0.1 HOT 3
- License verification when adding a feature after signing. HOT 3
- how to migrate from 2 -> 3 HOT 2
- [ERROR] Key format STRING is unknown HOT 1
- Using network interface names to calculate machine UUID downsides HOT 3
- Wishlist: HOT 1
- Tests fail with JVM 13 and 17 HOT 1
- Exception while serializing Feature to JSON, e.g. DATE Feature not regocnized as DATE. HOT 3
- Trivial attack HOT 1
- [email protected] compatibility to [email protected] HOT 1
- java.security.InvalidKeyException: invalid key format HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from license3j.