Issued leaf keys are hard-coded to RSA 1024, and certificates are valid for 10 years #5

Closed
opened 2026-10-26 20:23:16 +00:00 by mikluko · 0 comments
Owner

SelfSignedCA.Issue in pkg/issuer/issuer.go calls rsa.GenerateKey(ca.Rand, 1024), ignoring the BitSize field, whose default DefaultIssuerBitSize is 1024 as well. NotAfter is set ten years ahead.

Platform verifiers reject such certificates: Apple requires RSA keys of at least 2048 bits and a validity of at most 825 days for TLS server certificates, and Go on macOS verifies through the platform.

  • honour BitSize, default 2048
  • offer ECDSA P-256 leaf keys, cheaper to generate per host
  • a short default validity for leaves, configurable
`SelfSignedCA.Issue` in `pkg/issuer/issuer.go` calls `rsa.GenerateKey(ca.Rand, 1024)`, ignoring the `BitSize` field, whose default `DefaultIssuerBitSize` is 1024 as well. `NotAfter` is set ten years ahead. Platform verifiers reject such certificates: Apple requires RSA keys of at least 2048 bits and a validity of at most 825 days for TLS server certificates, and Go on macOS verifies through the platform. - honour `BitSize`, default 2048 - offer ECDSA P-256 leaf keys, cheaper to generate per host - a short default validity for leaves, configurable
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/multiproxy#5
No description provided.