Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

MacOS RSA DER / OpenSSL 3.4.0 RSA256 EncodingKey::from_rsa_der broken

Aperta
#426 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
cryptography

Direzione di ricerca

Start with the linked minimal repro and EncodingKey::from_rsa_der using the generated private.der and public.der under OpenSSL 3.4. Compare this with the working from_rsa_pem path and verify parsing on macOS. Done means standard 2048- and 3072-bit RSA DER keys load successfully while PEM loading remains working.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Seen also #55

Description:
Using OpenSSL 3.4.0 on MacOS, EncodingKey::from_rsa_der fails to parse standard RSA DER keys.

Steps to Reproduce:
Minimal repro here: der_broken
jsonwebtoken = "9.3.1"

Shell script to generate the key:

#!/bin/zsh

if [ -z "$1" ]; then
    num_bits=3072
else
    num_bits=$1
fi

# Generate 3072-bit RSA private key directly in PEM
openssl genrsa -out private.pem $num_bits

openssl rsa -outform DER -in private.pem -out private.der
openssl rsa -RSAPublicKey_out -outform DER -in private.pem -out public.der

# Base64 encode the DER files (without newlines)
base64 < private.der | tr -d '\n' > private.der.b64
base64 < public.der | tr -d '\n' > public.der.b64

# Write to .env cleanly without extra newlines
{
  printf "JWT_PRIVATE=%s\n" "$(cat private.der.b64)"
  printf "JWT_PUBLIC=%s\n" "$(cat public.der.b64)"
} > .env

Notes:

  • The DER produced is valid (can be parsed by OpenSSL and other libraries).
  • Likely regression related to stricter ASN.1 parsing.
  • Happens on both 2048 and 3072-bit keys.
  • PEM-based loading (from_rsa_pem) still works fine.
Lingua principale
Rust
Stelle
2.1k
Fork
367
Merge medio
5g 12h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Keats/jsonwebtoken

Tutte le issue di Keats/jsonwebtoken

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.