Skip to content
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

Objects passed by reference should be pinned #5

Open
tcleenewerck opened this issue Nov 3, 2021 · 4 comments
Open

Objects passed by reference should be pinned #5

tcleenewerck opened this issue Nov 3, 2021 · 4 comments

Comments

@tcleenewerck
Copy link
Contributor

Hello Peter

I'm trying to use your library with Pharo 9 to connect to google firebase. When the Firebase class creates a connection in the method createJWTFromCertificate: . At the end of this method, the code jws compactSerialized is executed.

Deeper in the callstack JsonWebSignature>>signatureFor: signs the message send to create the connection.
A call is made to LcLibCrypto. However the object holding the message needs to be pinned. The method PointerUtils>primOopForObject: fails.

How can this be resolved?

@psvensson
Copy link
Owner

Hi Thomas, sorry for the late reply. Actually,there seems to be another immediate problem, which may impact your issue here as well.

This library was developed in Pharo 8 (where I think it still works), but in Pharo 9, some things changed, and in the JSONWebToken library I am dependend on, that uses an OpenSSL-version which calls LibLcCrypto with an old mathodname #moduleName which has been change to something else in Pharo 9. I have opened an issue with JSONWebToken to see if the manager of that project can cahnge the baseline to load a different version of OpenSSL for Pharo 9. In the meantime, could you see if you could use Pharo 8?

@psvensson
Copy link
Owner

OK, doing some more research resulted in me updating the baseline to Pharo 9 and using the correct branch of JSONWebToken (for openssl 1.1), and then I finally get the same error as you :)

It does seem like the objects to be pinned is ones created inside the JSONWebToken library and I am currently talking to the maintainer to see if he can solve the problem (or possible, if there is something I can do from my side).

Will update here as soon as I know more

@psvensson
Copy link
Owner

Hi again Toma, Norbert Hart, the maintainer of JSonWebToken have been so kind to add the needed method inside the class I'm using in the library, so now it works again.

You might need to create a new P9 image to ensure that nothing gets cached in git (which it does sometimes)

@tcleenewerck
Copy link
Contributor Author

Thank you Peter and thank you Norbert. I'll give it a try later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants