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

Uncaught RuntimeException thrown when the publicKey(p256dh) has - at the end. e.g BGzoP5QD6aKTKGhmQ9pwIl0pLYNdxMHP3MmWaukujsXtweN9BQuIPVihjpf- #205

Closed
leonnduati opened this issue Jan 25, 2019 · 2 comments

Comments

@leonnduati
Copy link

When the p256dh key has a dash(-) at the end, the library throws an error. An example p256dh: BGzoP5QD6aKTKGhmQ9pwIl0pLYNdxMHP3MmWaukujsXtweN9BQuIPVihjpf-

The library works for all other p256dh keys.

@leonnduati
Copy link
Author

The detailed error is: Fatal error: Uncaught RuntimeException: Curve curve(115792089210356248762697446949407573530086143415290314195533631308867097853948, 41058363725152142129326129780047268409114441015993725554835256314039467401291, 115792089210356248762697446949407573530086143415290314195533631308867097853951) does not contain point (40747028616055263392251367296946612409732463385756865, 77770575987221971440859916007439511959237697213470718) in /home/spordzvf/public_html/push/vendor/web-token/jwt-util-ecc/Curve.php:82 Stack trace: #0 /home/spordzvf/public_html/push/vendor/web-token/jwt-util-ecc/Curve.php(101): Jose\Component\Core\Util\Ecc\Curve->getPoint(Object(GMP), Object(GMP)) #1 /home/spordzvf/public_html/push/vendor/minishlink/web-push/src/Encryption.php(95): Jose\Component\Core\Util\Ecc\Curve->getPublicKeyFrom(Object(GMP), Object(GMP)) #2 /home/spordzvf/public_html/push/vendor/minishlink/web-push/src/Encryption.php(65): Minishlink\WebPush\Encryption::deterministicEncrypt('\v\xA2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...', ' in /home/spordzvf/public_html/push/vendor/web-token/jwt-util-ecc/Curve.php on line 82

@Minishlink
Copy link
Member

Do you have some example of subscription+vapid?

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