Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Make Encryption Algorithm's ssh2_id Property Accessible in .NET Assembly

Thanks for your feedback.

I'll make the GUI change, if more people ask for this. Thanks for your understanding.
TheCliGuy

Re: Make Encryption Algorithm's ssh2_id Property Accessible in .NET Assembly

Hello Martin,

Thank you for providing the development version with my suggestion implemented and for doing it so quickly.

I did reply to your email to let you know that I had tested it and it worked perfectly - but I'm not sure if you saw this.

I made one more suggestion which was to also make the ssh2_id value visible from the UI under 'Session' > 'Server/Protocol Information'.
martin

Re: Make Encryption Algorithm's ssh2_id Property Accessible in .NET Assembly

Thanks for your suggestion.

This request has been added to the tracker:
https://winscp.net/tracker/1886

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
TheCliGuy

Make Encryption Algorithm's ssh2_id Property Accessible in .NET Assembly

When a session is opened to an SSH/SFTP server, the WinSCP log includes details of the encryption algorithm that's used.

The PuTTY code responsible for recording the encryption algorithm uses a human readable description. This description has no significance outside of PuTTY, consequently this makes it impossible to cross-reference it against the IANA's Secure Shell Encryption Algorithm Name registry (https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-17).

Here's the code that's responsible for writing to the log:

https://git.tartarus.org/?p=simon/putty.git;a=blob;f=ssh2bpp.c;hb=2762a2025f094bf8ccb75c0bdd7c655bc953f2f1#l132

 132         bpp_logevent("Initialised %s outbound encryption",

 133                      ssh_cipher_alg(s->out.cipher)->text_name);
 134     } else {


 190         bpp_logevent("Initialised %s inbound encryption",

 191                      ssh_cipher_alg(s->in.cipher)->text_name);
 192     } else {


The description is held in the text_name property of an initialised ssh_cipheralg struct. The initialised ssh_cipheralg also contains the encryption algorithm's official IANA name
in the ssh2_id property.
* ssh_cipheralg definition: https://git.tartarus.org/?p=simon/putty.git;a=blob;f=ssh.h;hb=2762a2025f094bf8ccb75c0bdd7c655bc953f2f1#l627
* ssh_cipheralg initialisation: https://git.tartarus.org/?p=simon/putty.git;a=blob;f=sshaes.c;hb=2762a2025f094bf8ccb75c0bdd7c655bc953f2f1#l108

Would it be possible to expose the ssh2_id so it's accessible in the WinSCP .Net assembly (WinSCPnet.dll)?