You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I want to sign binary data in payload.
Payload is detached and headers are:
['b64' => false, 'crit' => ['b64']].
$jwsBuilder = new JWSBuilder([new PS256]);
$jwsBuilder = $jwsBuilder->create()->withPayload($binaryPayload, true);
This causes new InvalidArgumentException('The payload must be encoded in UTF-8');
When i get rid of that exception by manually deleting it signing and verifying just works fine.
Thank you for reporting this issue. Indeed, UTF8 is only required for unencoded non-detached payload. This exception should not be thrown.
I will fix it ASAP.
Hi! I want to sign binary data in payload.
Payload is detached and headers are:
['b64' => false, 'crit' => ['b64']].
$jwsBuilder = new JWSBuilder([new PS256]);
$jwsBuilder = $jwsBuilder->create()->withPayload($binaryPayload, true);
This causes new InvalidArgumentException('The payload must be encoded in UTF-8');
When i get rid of that exception by manually deleting it signing and verifying just works fine.
rfc7797 should allow binary detached payload.
https://datatracker.ietf.org/doc/html/rfc7797#section-5.1
A detached payload can contain any octet sequence representable by the application.
Am I doing something wrong or should the UTF-8 check only be done with nondetached payloads?
Best Regards
The text was updated successfully, but these errors were encountered: