Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate larger, compliant serial numbers #500

Merged
merged 1 commit into from
Apr 2, 2022

Conversation

haydentherapper
Copy link
Contributor

@haydentherapper haydentherapper commented Apr 1, 2022

UUIDs generate 16 byte serial numbers. Serial numbers can be no larger
than 20 bytes. They also must be positive, giving us 159 bits to
generate a serial number.

This does not affect prod currently, since CA Service generates its own serial numbers. This will affect prod once we switch to using an intermediate CA.

Signed-off-by: Hayden Blauzvern [email protected]

Summary

Ticket Link

Fixes

Release Note

Generate 20 byte positive serial numbers for certificates

Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small spelling typo but LGTM

pkg/ca/x509ca/common.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #500 (49f50f9) into main (56c15d6) will decrease coverage by 5.62%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main     #500      +/-   ##
==========================================
- Coverage   47.97%   42.35%   -5.63%     
==========================================
  Files          14       16       +2     
  Lines        1063     1216     +153     
==========================================
+ Hits          510      515       +5     
- Misses        480      626     +146     
- Partials       73       75       +2     
Impacted Files Coverage Δ
pkg/ca/x509ca/common.go 3.53% <33.33%> (ø)
pkg/api/client.go 75.22% <0.00%> (-1.92%) ⬇️
pkg/ca/x509ca/x509ca.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56c15d6...49f50f9. Read the comment docs.

UUIDs generate 16 byte serial numbers. Serial numbers can be no larger
than 20 bytes. They also must be positive, giving us 159 bits to
generate a serial number.

Signed-off-by: Hayden Blauzvern <[email protected]>
@dlorenc dlorenc merged commit 0b972e8 into sigstore:main Apr 2, 2022
haydentherapper added a commit to haydentherapper/fulcio that referenced this pull request Apr 6, 2022
UUIDs generate 16 byte serial numbers. Serial numbers can be no larger
than 20 bytes. They also must be positive, giving us 159 bits to
generate a serial number.

Signed-off-by: Hayden Blauzvern <[email protected]>
haydentherapper added a commit to haydentherapper/fulcio that referenced this pull request Apr 9, 2022
UUIDs generate 16 byte serial numbers. Serial numbers can be no larger
than 20 bytes. They also must be positive, giving us 159 bits to
generate a serial number.

Signed-off-by: Hayden Blauzvern <[email protected]>
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.

None yet

4 participants