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

Use GetDigestOIDForSignatureAlgorithm to set the digest algorithm OID #18

Merged
merged 5 commits into from
Aug 21, 2023

Conversation

malancas
Copy link
Contributor

@malancas malancas commented Jul 14, 2023

Small follow up PR to digitorus/pkcs7#11. This pull request uses pkcs7.GetDigestOIDForSignatureAlgorithm to set the digest algorithm used in the signing process. Currently the digest algorithm is hardcoded to SHA-256. This PR also fixes a few small typos.

* set digest alg oid based off incoming timestamp hash alg

Signed-off-by: Meredith Lancaster <malancas@github.com>

* typo

Signed-off-by: Meredith Lancaster <malancas@github.com>

* temporarily replace dep

Signed-off-by: Meredith Lancaster <malancas@github.com>

* remove accidentally committed changes

Signed-off-by: Meredith Lancaster <malancas@github.com>

* spaces

Signed-off-by: Meredith Lancaster <malancas@github.com>

* update replace statement

Signed-off-by: Meredith Lancaster <malancas@github.com>

---------

Signed-off-by: Meredith Lancaster <malancas@github.com>
Signed-off-by: Meredith Lancaster <malancas@github.com>
@malancas malancas changed the title Use newly exported PKCS7 function to set OID Use pkcs7.GetDigestOIDForSignatureAlgorithm to set the digest algorithm OID Jul 14, 2023
@malancas malancas changed the title Use pkcs7.GetDigestOIDForSignatureAlgorithm to set the digest algorithm OID Use GetDigestOIDForSignatureAlgorithm to set the digest algorithm OID Jul 14, 2023
@malancas malancas marked this pull request as ready for review July 14, 2023 16:20
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Patch coverage: 42.85% and project coverage change: -0.31% ⚠️

Comparison is base (0faba6f) 66.45% compared to head (a0d362a) 66.15%.
Report is 1 commits behind head on master.

❗ Current head a0d362a differs from pull request most recent head e686ea5. Consider uploading reports for the commit e686ea5 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   66.45%   66.15%   -0.31%     
==========================================
  Files           3        3              
  Lines         322      325       +3     
==========================================
+ Hits          214      215       +1     
- Misses         70       71       +1     
- Partials       38       39       +1     
Flag Coverage Δ
unittests 66.15% <42.85%> (-0.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
rfc3161_struct.go 80.00% <0.00%> (ø)
timestamp.go 65.58% <50.00%> (-0.32%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vanbroup
Copy link
Member

Can you check the lint errors and test coverage?

@malancas
Copy link
Contributor Author

Sure, I'll take a look

@malancas
Copy link
Contributor Author

Reviewing the linter failure, it looks like it could be due to the linter GitHub Action being out of date. Updating to golangci/golangci-lint-action@v3 may help.

Reviewing the codecov failures, it looks like most of them are responding to code changes that fix typos. Do you know if the codecov warnings can be disabled for these lines?

Signed-off-by: Meredith Lancaster <malancas@github.com>
Signed-off-by: Meredith Lancaster <malancas@github.com>
@malancas
Copy link
Contributor Author

malancas commented Jul 31, 2023

I updated the golangci-lint Action to the latest version, I think an older version was causing the linting failure. I also pushed a codecov config that disables alerts for patching. The alerts seem a bit noisy since they were mostly around line changes related to typo corrections.

@malancas
Copy link
Contributor Author

@vanbroup just wanted to follow up around the linter and codecov updates as resolution to the workflow failures.

codecov.yml Outdated Show resolved Hide resolved
@vanbroup vanbroup merged commit d1ad5ca into digitorus:master Aug 21, 2023
2 checks passed
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.

2 participants