-
Notifications
You must be signed in to change notification settings - Fork 35
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
Does not work on Python 2.7 with javaobj-py3==0.3.0 #47
Comments
Hey @danpker! This is Interesting. How far did you have to downgrade to get it working? Shall we open an issue over on javaobj? I see 0.3.0 just came out a couple days ago. I guess one fix in the meantime would be to change the |
@mahmoud I have got it working on 0.2.4, and fixing it at that version has worked for me. I'm not sure where the root cause of the issue is (whether it is in pyjks or javaobj) |
I believe I tracked the source of the problem down to a change they made in 0.3.0: This causes a comparison failure here: |
Wow, thank you @cory-parr! That makes perfect sense, very cogent. Kind of a big change for a minor release, but it's wild times in 0ver-land. But at least we have a potential second option (other than pinning Any volunteers to test/PR that approach? |
In python 2.7.x many issues have occured where comparison between 'JavaString' & 'str' have failed. kurtbrose#60, kurtbrose#47 type cast sealed_obj.sealAlg which is of type <class 'javaobj.v1.beans.JavaString'> to <type 'str'> So, that 'String' to 'String' comparison is performed and not 'JavaString' to 'String'
I'm not sure why this issue is happening but you can replicate it by running the tests on Python 2 with
javaobj-py3==0.3.0
.You get the following exception:
UnexpectedAlgorithmException: Unexpected algorithm used for encrypting SealedObject: sealAlg=PBEWithMD5AndTripleDES
.Using
javaobj-py3==0.2.4
works correctly. This is hard to see because the requirements file in this repo pins that dependancy to0.2.1
, whereas the setup.py file makes no specification.The text was updated successfully, but these errors were encountered: