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

PublicKey::fromString not working after upgrade to v2 #23

Open
vincent-lu opened this issue Dec 1, 2023 · 7 comments
Open

PublicKey::fromString not working after upgrade to v2 #23

vincent-lu opened this issue Dec 1, 2023 · 7 comments

Comments

@vincent-lu
Copy link

vincent-lu commented Dec 1, 2023

Hi first thanks for the library.

I use this library to work with SendGrid's Event Webhooks:
Docs: https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features
Demo: https://github.com/sendgrid/sendgrid-php/tree/main/lib/eventwebhook

The demo uses starkbank/ecdsa:0.05 which works just fine when calling \EllipticCurve\PublicKey::fromString($myPubKeyString). However after upgrade to starkbank/ecdsa:2.0.2 it gives an error message saying gmp_init(): Argument #1 ($num) is not an integer string.

Would love to use the latest version of this library but for now I have to downgrade it back to 0.0.5.

Can you advise what I should do to make the latest version work? Thanks.

@simoheinonen
Copy link

sendgrid/sendgrid-php#1111 should fix it

@vincent-lu
Copy link
Author

Thanks @simoheinonen hopefully it gets accepted

@vincent-lu
Copy link
Author

vincent-lu commented Oct 30, 2024

@simoheinonen tried to bumb that PR. Would be nice someone get around it... Some of the tests seem to not be passing though.

@simoheinonen
Copy link

Some of the tests seem to not be passing though.

Which ones? In the PR the tests haven't ran because someone else needs to start them

@vincent-lu
Copy link
Author

@simoheinonen ah ok I didn't look at the exact reasons only saw it got a few things pending. Let's hope someone sees my bump and at least take a look at it.

@jonasborges-stark
Copy link

Hi @vincent-lu,

the method \EllipticCurve\PublicKey::fromString($myPubKeyString) is internal, so it cannot be used. We recommend using the initial methods described in the documentation.

Thanks.

@vincent-lu
Copy link
Author

@jonasborges-stark That call EllipticCurve \PublicKey::fromString() is lifted directly from https://github.com/sendgrid/sendgrid-php/blob/main/lib/eventwebhook/EventWebhook.php Line 25

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

3 participants