Comments (5)
I see, you have users which are on Android 6 and they have this issue.
I did someinvestigation to make this library compatible with Java 7, however alot of classes needs to be rewritten as it haveliy depends on the language features of Java 8 such as Lambda's, Optionals, Streaming Collections and Functional Interfaces. Next to that it will have breaking changes which I don't want to happen. So I won't be making this library compatible with Java 7.
An option for you would be maybe copying code snippets from this library which you are using into your project. In that way you don't depend on the library and can adjust it to your needs, however the downside of this approach is that you won't be getting security patches, bug fixes and new features as you will be maintaining your own version.
Another option would be dropping the support for Android 6 as it is also not actively maintained/supported by Google. It has been released in 2015 and the last security patch is from 2018. I know it is good to support the lowest android level possible to reach the most amount of end-users and it makes it even harder when you already have users on that android version. So if it is not possible to drop the support for your application for Android 6, I would suggest to copy-past what you need from this library. Please make sure to include the original license header if you plan to copy the source code.
from sslcontext-kickstart.
I noticed your file is a bks (bouncy castle keystore) file and the library is using pkcs12 as keystore type by default. So I am guessing it might be related to that.
Can you validate if you have the following library on your classpath: org.bouncycastle:bcpkix-jdk15on:1.70
.
If it is not present can you try to add it.
And can you run your sslfactory with the following code snippet:
SSLFactory sslFactory = SSLFactory.builder()
.withTrustMaterial(bks file, password, "BKS")
.build
If nothing is provided it will use the default which is pkcs12.
Please give it a try and let me know if you have some results
from sslcontext-kickstart.
@Hakky54 Thanks for replying,I add classpath org.bouncycastle:bcpkix-jdk15on:1.70
and add trustStoreType with BKS.
But carsh log is same.
I try android 13、12、11、10、9、8、7 is work, only 6 is crash.
from sslcontext-kickstart.
It seems like Android 6 is not compatible with Java 8. It is however compatible with Java 7, but this library is made compatible for Java version 8 and newer. So Therefor it won't work on android 6 and that explains your error. The exception refers to java.util.function.UnaryOperator
which I use in the KeyStoreUtils which does not exists in Java 7. See here also for the list which Google has listed https://source.android.com/docs/setup/start/older-versions#jdk
By the way, why do you want to make your project compatible with Android 6?
from sslcontext-kickstart.
@Hakky54 Thanks explain the reason. Google Play App almost support 5.0 or 6.0 version up, so my project must be compatible with Android 6, app user report to google play crash, so I must be to fix it. If this library can't compatible with Android 6... I maybe give up this library QAQ
from sslcontext-kickstart.
Related Issues (20)
- Dependency on bcpkix-jdk15on introduces vulnerability CVE-2023-33201 HOT 2
- Disable "Acceptable client certificate CA names" on MTLS client connect.
- Hostname verifier doesn't work with JDK Http Client HOT 4
- No available authentication scheme HOT 8
- Add Support For `withoutProtocols` + `withoutCiphers` HOT 3
- Question about Classic Configuration Migration HOT 18
- When using pem utils v8.2.0 dependency in android, Duplicate class error in org.bouncycastle HOT 3
- Loading the keystore takes a very long time in some rare cases HOT 9
- JDK9+ jdeps error HOT 6
- Implementing Dynamic SSL Pinning Using Base64 Encoded Server Certificate? HOT 6
- PKIX path building failed (client-side) when using certificates from Let's Encyrpt HOT 9
- aarch64 macOS runner support HOT 6
- FTPs - None of the TrustManagers trust this certificate chain HOT 3
- Loading of System-Certificates takes long or forever when USB-Token Software is installed. HOT 8
- Trust Anchor not found on Android HOT 10
- Remove too verbose logs when loading system certificates HOT 7
- LoggingX509ExtendedTrustManager should log CertificateException HOT 3
- Add abiilty to load JDK cacerts file HOT 6
- Is SSLFactory thread safe? HOT 2
- Remove `bouncycastle` deps for `sslcontext-kickstart-for-pem` HOT 3
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 sslcontext-kickstart.