-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Upgrade to CraSH 1.3.1 #2425
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
hold on a minute. I remember I discussed this with @vietj and he specifically did something regarding bouncycastle in one of the RC. Or am I totally misunderstanding the problem? |
PEMReader is PEMParser in Bouncycastle 1.5. PEMParser extends PemReader (note the different capitalisation) |
well, ok. I can see what I can do on the CRaSH side but it all boils down (like I wrote in the SO issue) to the way the Bouncycastle team manages their backward compatibility. we can upgrade but then someone else on 1.49- will complain that it's broken for him. What can we do, really? |
Indeed. There's no obvious right answer here. |
Hi, The project isn't actively maintained but always alive. Cheers |
@aheritier How about falling back to using reflection when private Object readKey(File keyFile) throws Exception {
try {
PEMReader r = new PEMReader(new FileReader(keyFile));
try {
return r.readObject();
} finally {
r.close();
}
} catch (NoClassDefFoundError e) {
Class<?> pemParserClass = Class.forName("org.bouncycastle.openssl.PEMParser");
Reader reader = new FileReader(keyFile);
Reader pemReader = (Reader) pemParserClass.getConstructor(Reader.class).newInstance(reader);
try {
return pemParserClass.getMethod("readObject").invoke(pemReader);
} finally {
pemReader.close();
}
}
} We do something similar in a few places in Boot where we need to cope with breaking API changes |
@wilkinsona yes for sure it is a good solution, but is it the only incompatible API change? We need to investigate. |
I prefer and agree with the solution of @wilkinsona and I think this problem is only incompatible API changes. We will take a look more and provide the fix next week. |
I applied the fix on crash master codebase. @wilkinsona @snicoll Can we verify together that it solves your issue before releasing a 1.3.1 with this fix ? |
@aheritier Do you publish snapshots anywhere or should I build from source? |
@wilkinsona Can you rebuild it from source please ? |
@aheritier 1.3.1-SNAPSHOT looks good to me with both 1.49 and 1.51 of Bouncycastle. Thanks! |
awesome, bravo @aheritier :-) |
I didn't do anything awesome. All greetings are for @wilkinsona and @nttuyen |
1.3.1 is out @wilkinsona . HTH. |
Sweet. Thanks! |
The Crashub project appears to be dormant. The latest release, 1.3.0, was made in June 2014 and no commits (other than adding Google analytics to their javadoc) have been made since. Some of its dependencies are getting rather old, for example the version of Bouncycastle it uses is no longer supported and is causing problems.
The text was updated successfully, but these errors were encountered: