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

NonRepudiation keyUsage can be used for signing #119

Closed
anaselhajjaji opened this issue Mar 26, 2015 · 5 comments
Closed

NonRepudiation keyUsage can be used for signing #119

anaselhajjaji opened this issue Mar 26, 2015 · 5 comments
Labels
bug Something isn't working

Comments

@anaselhajjaji
Copy link

Actually, in CmsSigner class we have the following check:

if (flags != X509KeyUsageFlags.None && (flags & X509KeyUsageFlags.DigitalSignature) == 0)
throw new ArgumentException ("The certificate cannot be used for signing.");

Which is refuses NonRepudiation certificate keyUsage. Non repudiation key usage can be used for signature and the code must be changed to:
if ((flags != X509KeyUsageFlags.None && flags != X509KeyUsageFlags.NonRepudiation) && (flags & X509KeyUsageFlags.DigitalSignature) == 0)
throw new ArgumentException ("The certificate cannot be used for signing.");

@jstedfast
Copy link
Owner

Thanks! This should be fixed now.

@anaselhajjaji
Copy link
Author

Thanks for the correction. When do you plan to release a version containing this correction ?

@jstedfast
Copy link
Owner

I'll probably release it this weekend. I prefer to collect as many bug fixes as I can before I release. The problem is I always seem to get the bug reports on the day after I make a release. :-(

@anaselhajjaji
Copy link
Author

OK thanks for your reactivity, we actually need the correction for our project.

@jstedfast
Copy link
Owner

FWIW, I typically make a release every weekend for any week in which I've fixed at least 1 bug.

@jstedfast jstedfast added the bug Something isn't working label Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants