-
Notifications
You must be signed in to change notification settings - Fork 300
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
Fix elliptic curve certs and add a unit test #243
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual code looks fine! ...but I have cosmetic nitpicks with all the other files...
/// <param name="context"></param> | ||
[Theory] | ||
[InlineData("craftsman-context")] | ||
public void ContextElpiticKey(string context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
public void ContextElpiticKey(string context) | |
public void ContextEllipticKey(string context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -51,3 +56,7 @@ users: | |||
user: | |||
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURrVENDQW5tZ0F3SUJBZ0lVTzlVTkdpbHhmSHpMbVJXcWU2dVMyRVZ1NVhVd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1FURUxNQWtHQTFVRUJoTUNWVk14RURBT0JnTlZCQWdUQjFKbFpHMXZibVF4Q3pBSkJnTlZCQWNUQWxkQgpNUk13RVFZRFZRUURFd3ByZFdKbGNtNWxkR1Z6TUNBWERURTRNVEl3T0RBNU5URXdNRm9ZRHpJeE1UZ3hNVEUwCk1EazFNVEF3V2pCQk1Rc3dDUVlEVlFRR0V3SlZVekVRTUE0R0ExVUVDQk1IVW1Wa2JXOXVaREVMTUFrR0ExVUUKQnhNQ1YwRXhFekFSQmdOVkJBTVRDbXQxWW1WeWJtVjBaWE13Z2dFaU1BMEdDU3FHU0liM0RRRU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hZVViNTQvNFNYcUdPNU4rUEdPOVZFMnBGNGFlCnlVTnpBb0dCQUptMU1vcFQ4N0llelBmQ010ck51cXVqQjFpdStvb1lIYm9IbGJXZUNxS3RSRnNYMWhXOWpTY1UKQ0ZRanhSVCtPcENVWndjbDdkY2xsTUlxQTRWQ1NmUUFRMW9CMU41WENRWE8xVFlXOHU1K1BRTUdUcFEvQlVEawp6WmRJZzZqQkFXd3R6YkNzKzRjVkFoclN3cDRBSXFvcndTZU1qRmdsTmNoNzgxMEF6emNJCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg== | |||
- name: purple-user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope I'm not being humourless (the sure sign that I am being humourless), but I think we should aim to name test data etc. after its role in the test e.g. elliptic-key-user
rather than purple
- this makes it much easier to understand the difference between e.g. purple-user
and red-user
without having to search through the tests to see where they are used and reverse-engineer what their significance is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done (I was sticking to the pre-established theme, which I didn't start :)
@@ -0,0 +1,29 @@ | |||
-----BEGIN EC PARAMETERS----- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider renaming this file e.g. elliptic-client.key
so that it is easier to know what it's for from the filename without having to look at how it is used or search up the Git commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -54,6 +54,20 @@ public void ContextCertificate(string context, string clientCert, string clientC | |||
Assert.Equal(cfg.ClientKeyFilePath, clientCertKey); | |||
} | |||
|
|||
/// <summary> | |||
/// Checks for loading of eliptical curve keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
/// Checks for loading of eliptical curve keys | |
/// Checks for loading of elliptical curve keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@itowlson comments addressed (and test fixed for CI) please re-check. Thanks! |
/lgtm |
CI has picked up what may be a portability issue:
Is it expected/acceptable that elliptic keys would not work on Mac? If so could just turn off the test in Mac environments? |
Maybe it's this specific EC key? I'll try to generate one on a mac and see if it works... |
@itowlson I managed to create an elliptic key that made both the mac and linux happy... |
@itowlson friendly ping on this one (and the dotnet version update PR too :) thanks! |
/lgtm |
Fixes #242