-
Notifications
You must be signed in to change notification settings - Fork 117
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
Unable to access Google API after loading ApiWrapper #144
Comments
I found this : Security.removeProvider("BC");
Security.insertProviderAt(new BouncyCastleProvider(), 1); in the SECP256K1.class file, i guess this is where the problem is because it will set the bouncyCastle provider app wide and then it will be picked up by the Google API and will not work. It is really necessary ? How can i work around this ? |
@Vinspi Try to restore the original cryptographic provider configuration before or after the ApiWrapper is created,as below:
This ensures that the global cryptographic provider configuration of the JVM is not affected when creating the ApiWrapper, thus avoiding compatibility issues with the Google API. |
Yes that's exactly what i though after seeing this code so i tried to reverse the provider and it works. So in order to solve that i can still use an aspect with a reentrant lock to be sure that no operations concerning Google API or trident API are performed at the same moment but at the sake of simplicity and performance. But one last question remains, if i reset the "SUN" crypto provider will trident work as expected or does it needs BouncyCastle to be the default provider ? Anyway, thanks for your help this is very appreciated. |
per my understanding, trident needs Bouncycastle as the default provider. |
Hello, my issue is the following :
I'm creating a bean :
and after creating this bean all attempt to access the google API results in
The SSL Handshake fail, so i'm wondering if the trident lib will alter the global crypto configuration of the JVM uppon creating the ApiWrapper instance.
I'm quite sure this is the case because when i comment the '@bean' annotation to the class is not instanciate at startup all my google API calls are good.
Can you help me with that ?
The text was updated successfully, but these errors were encountered: