Skip to content

Update docs and remove a leftover DSA certificate algorithm #1632

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

Merged
merged 2 commits into from
May 4, 2025

Conversation

Rob-Hague
Copy link
Collaborator

No description provided.

@@ -398,7 +398,6 @@ public ConnectionInfo(string host, int port, string username, ProxyTypes proxyTy
hostAlgs.Add("rsa-sha2-512-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("rsa-sha2-512-cert-v01@openssh.com", cert, new RsaDigitalSignature((RsaKey)cert.Key, HashAlgorithmName.SHA512), hostAlgs); });
hostAlgs.Add("rsa-sha2-256-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("rsa-sha2-256-cert-v01@openssh.com", cert, new RsaDigitalSignature((RsaKey)cert.Key, HashAlgorithmName.SHA256), hostAlgs); });
hostAlgs.Add("ssh-rsa-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("ssh-rsa-cert-v01@openssh.com", cert, hostAlgs); });
hostAlgs.Add("ssh-dss-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("ssh-dss-cert-v01@openssh.com", cert, hostAlgs); });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

2025.0.0 will break with servers which offer ssh-dss-cert-v01@openssh.com because I missed this line in #1558. Hopefully that is not very many... the workaround is to remove it:

client.ConnectionInfo.HostKeyAlgorithms.Remove("ssh-dss-cert-v01@openssh.com");

@@ -321,7 +321,6 @@ private void Open(Stream privateKey, string? passPhrase)
switch (keyName)
{
case "RSA PRIVATE KEY":
case "DSA PRIVATE KEY":
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this removal makes no difference, it throws NotSupportedException either way

@Rob-Hague Rob-Hague merged commit 98982a9 into sshnet:develop May 4, 2025
4 checks passed
@Rob-Hague Rob-Hague deleted the docs branch May 4, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants