Skip to content

Conversation

@Ac-Kevin
Copy link

PR Description: Fix critical encoding/writer issues

  1. GZIP footer loss: Fixed by explicitly closing gzip.Writer before reading the buffer to ensure footer (checksum/length) is written.
  2. Base64 padding: Replaced base64.URLEncoding with RawURLEncoding to omit padding (=) for standards-compliant URL-safe strings (e.g., JWT tokens).
  3. PSS salt length: Set rsa.PSSSaltLengthEqualsHash to enforce salt length matching hash size (RFC 8017 compliance), avoiding cross-implementation inconsistencies from PSSSaltLengthAuto.

Each fix aligns with spec requirements and prevents data corruption/parsing errors.

Verified JWE Data Generation: After implementing the fixes.

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

Successfully merging this pull request may close these issues.

1 participant