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

Add time constraint between signature and verification #96

Merged
merged 4 commits into from
Mar 22, 2023

Conversation

eraffel-MDSol
Copy link
Contributor

No description provided.

@eraffel-MDSol eraffel-MDSol force-pushed the feature/VerifySignatureTime branch from 88d14ae to 25c8b89 Compare March 21, 2023 19:45
Comment on lines +117 to +120
if (!IsSignatureTimeValid(authInfo.SignedTime))
{
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

In my Go implementation I put this check before the public key lookup given it's a cheap check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@johnduhart
Copy link
Member

@mdsol/enablement-dotnet


if (!IsSignatureTimeValid(authInfo.SignedTime))
{
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to throw TimeOutException and log error similar to other cases ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we throw an exception if verification of the signature fails, so I'm not sure why we would throw an exception here either.

Choose a reason for hiding this comment

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

How about a log though? If I had to debug why? Not sure how logging is throughout this library.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah at least a logger would be beneficial too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed on logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eraffel-MDSol eraffel-MDSol force-pushed the feature/VerifySignatureTime branch from 5709e13 to bf7b848 Compare March 22, 2023 23:28

if (!IsSignatureTimeValid(authInfo.SignedTime))
{
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed on logging.

@Jman420 Jman420 merged commit ba0c7bf into develop Mar 22, 2023
@awiesendangermdsol awiesendangermdsol deleted the feature/VerifySignatureTime branch March 23, 2023 12:32
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.

5 participants