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

Lazily create certificates #91

Merged
merged 1 commit into from
Nov 7, 2022
Merged

Conversation

priteshbandi
Copy link
Contributor

Signed-off-by: Pritesh Bandi pritesb@amazon.com

Issue: notaryproject/notation#429


Time after fix:

➜  notation git:(main) ✗ time ./notation version  
Notation: Notary v2, A tool to sign, store, and verify artifacts.

Version:     v0.12.0-beta.1+unreleased
Go version:  go1.19.3
./notation version  0.00s user 0.01s system 30% cpu 0.042 total
➜  notation git:(main) ✗ time ./notation cert list
2022/11/04 18:34:49 Start took 355.927µs
/Users/pritesb/Library/Application Support/notation/truststore/x509/ca/digi-root.pem
/Users/pritesb/Library/Application Support/notation/truststore/x509/ca/temp/digi-root.pem
/Users/pritesb/Library/Application Support/notation/truststore/x509/signingAuthority/temps/digi-root.pem
./notation cert list  0.00s user 0.01s system 62% cpu 0.018 total


// This will be flagged by the static code analyzer as 'Use of a weak cryptographic key' but its intentional
// and is used only for testing.
k, _ := rsa.GenerateKey(rand.Reader, 1024)

Check failure

Code scanning / CodeQL

Use of a weak cryptographic key

The size of this RSA key should be at least 2048 bits.
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Merging #91 (9ac5869) into main (3033a42) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #91   +/-   ##
=======================================
  Coverage   78.76%   78.76%           
=======================================
  Files          28       28           
  Lines        2067     2067           
=======================================
  Hits         1628     1628           
  Misses        336      336           
  Partials      103      103           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

testhelper/certificatetest.go Outdated Show resolved Hide resolved
testhelper/certificatetest.go Outdated Show resolved Hide resolved
Signed-off-by: Pritesh Bandi <pritesb@amazon.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT merged commit 99c1cc3 into notaryproject:main Nov 7, 2022
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.

4 participants