Agent auth and Keygen - #794
Conversation
be269df to
ce48377
Compare
d1a1cd5 to
f7fad26
Compare
|
Hey @drieseng, Would be awesome if you could take a look here. A merge and release of SSH.NET would allow me to finalize my planned SSH.NET Extensions.
Thanks in advance |
|
Apart from minor conditionals change (see above) this code looks great to me. Edit: |
Can't see any conflict.
This extension uses the same interface: https://github.com/darinkes/SshNet.Agent (Includes SSH-Agent und Pageant) |
|
Great! Can you please change the |
I actually think it should be an extra issue and PR. Or is there a reason we need it now? |
|
With the current condition, the implementation of |
|
@drieseng can you please have a look at this PR? It provides a great extensibility point and would either close or support closing many issues. |
|
@IgorMilavec I'll try to find time for this sometime this week. Sorry for the lag. |
| /// </para> | ||
| /// </remarks> | ||
| public class PrivateKeyFile : IDisposable | ||
| public class PrivateKeyFile : IPrivateKeyFile, IDisposable |
There was a problem hiding this comment.
Do we want to make this one sealed to allow the JIT to devirtualize calls?
Not a big deal.
| /// <summary> | ||
| /// Represents private key file interface. | ||
| /// </summary> | ||
| public interface IPrivateKeyFile |
There was a problem hiding this comment.
There's nothing file-related in this interface. Do we want to extend it with file related properties or methods, or change the name of the interface?
There was a problem hiding this comment.
maybe IPrivateKeySource?
So you can add your own Key-Classes to SSH.NET Add ED25519 ctor for just pub key part.
You cant export imported CngKeys. To be able to export them to agent or Key-Files make the private bits also accessible.
So Extension can add own PrivateKeyFiles, e.g. PuttyKeyFile.
|
@darinkes Thanks! |
|
@drieseng also thanks! I will update my extensions ASAP :) |
* Allow to set PrivateKeyFile Key directly So you can add your own Key-Classes to SSH.NET * Add ED25519 ctor for just pub key part. * Make ECDSA Key Bits accessible You cant export imported CngKeys. To be able to export them to agent or Key-Files make the private bits also accessible. * Better NETFRAMEWORK vs NETSTANDARD handling * Add Comment Property to Key * Add IPrivateKeySource So Extension can add own PrivateKeyFiles, e.g. PuttyKeyFile.
Its based on the openssh_format_rsa branch, so ignore the first three commits.
"Allow to set PrivateKeyFile Key directly" and "Make ECDSA Key Bits accessible" Commits are needed for the WIP SSH.NET Extensions https://github.com/darinkes/SshNet.Keygen and https://github.com/darinkes/SshNet.Agent.
"Enable netstandard2.1 build" is a build fix, which respect netstandard versions newer than 2.0 for ECDSA Keys