Issue Summary
The issue involves using the convertPublicKeyToECDSA and verifySignature functions in the SendGrid PHP client library. When executing these functions, deprecated warnings are logged.
Steps to Reproduce
- Call the convertPublicKeyToECDSA function with the SendGrid webhook public key.
- Use the output of the first function as input to the verifySignature function along with the request content and headers.
Code Snippet
$eventWebhook = new EventWebhook();
$ecPublicKey = $eventWebhook->convertPublicKeyToECDSA($_ENV['SENDGRID_WEBHOOK_PUBLIC_KEY']);
return $eventWebhook->verifySignature(
$ecPublicKey,
$request->getContent(),
$request->headers->get(EventWebhookHeader::SIGNATURE),
$request->headers->get(EventWebhookHeader::TIMESTAMP)
);
Exception/Log
Deprecated: Creation of dynamic property EllipticCurve\PublicKey::$pem is deprecated
Deprecated: Creation of dynamic property EllipticCurve\Signature::$der is deprecated
Technical details:
- sendgrid-php version: 8.1.1
- php version: 8.2.19
Issue Summary
The issue involves using the convertPublicKeyToECDSA and verifySignature functions in the SendGrid PHP client library. When executing these functions, deprecated warnings are logged.
Steps to Reproduce
Code Snippet
Exception/Log
Technical details: