Skip to content
New issue

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

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

Already on GitHub? # to your account

Only sign if the root certificate is a CA. #28

Merged
merged 1 commit into from
May 3, 2016

Conversation

alokmenghrajani
Copy link
Contributor

Prevents accidentally creating invalid certificates.

os.Exit(1)
}
if !raw_crt.IsCA {
fmt.Fprintln(os.Stderr, "CA certificate is not allowed to sign certificates.")
Copy link
Contributor

Choose a reason for hiding this comment

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

more like "selected certificate is not a CA certificate"

@csstaub
Copy link
Contributor

csstaub commented May 3, 2016

LGTM

@alokmenghrajani alokmenghrajani merged commit d9a1fc8 into master May 3, 2016
@alokmenghrajani alokmenghrajani deleted the alok/key_usage branch May 3, 2016 20:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants