mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4915] [Feature Request] Random serial number in certificate template #3879
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3879
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @XlabAITeam on GitHub (Aug 7, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4915
Describe the feature request
The
newRandomTLSKeyPairfunction inpkg/transport/tls.go generatesTLS certificates with a hardcoded serial number of1instead of using cryptographically random values. This violates TLS PKI best practices where certificate serial numbers must be unique and unpredictable with at least 64-bit entropy.This fixed certificate field lay the foundation of further exploitation on certificate forgery. It has been proven that the overall overhead of finding certificate collision is acceptable under certain chosen prefix conditions. It is recommended generating the serial number by a cryptographically secure random number generator as the CA/B forum requested. Constructing the template with at least a subject (CN) and validity period is also appreciated in practice.
Describe alternatives you've considered
No response
Affected area