-
Notifications
You must be signed in to change notification settings - Fork 20
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
implement reading comment from openssh private key #23
Conversation
Thanks for the PR. Instead of adding a callback for the comment, could we just add a property for it like we already have for all of the other info parsed from the private key? |
Thanks for your comment. I want to make sure which method you said; I think two options for that:
Also, How about the type of that property? I consider |
Apparently, I didn't think about it enough. 😄 A property that we have to update doesn't seem right since we want the object to be immutable. Instead of a callback in the decrypt function though, it seems like it would be simpler to just have an out paramter (or modify the return value to return a ValueTuple). |
I started with the callback design to keep source-level compatibility for them. |
Fixes running tests in VS2022.
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #23 +/- ##
==========================================
- Coverage 51.83% 51.79% -0.05%
==========================================
Files 37 37
Lines 5533 5553 +20
Branches 503 504 +1
==========================================
+ Hits 2868 2876 +8
- Misses 2482 2493 +11
- Partials 183 184 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Reading key comment from an openssh private key, Because it's encrypted, added callback on
Decrypt
.https://github.com/openssh/openssh-portable/blob/4a1805d532616233dd6072e5cd273b96dd3062e6/PROTOCOL.key#L38-L39
See also: dlech/KeeAgent#375