KeyExchangeInitMessageTest.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Messages.Transport;
  3. using Renci.SshNet.Tests.Common;
  4. using System.Linq;
  5. namespace Renci.SshNet.Tests.Classes.Messages.Transport
  6. {
  7. /// <summary>
  8. /// Represents SSH_MSG_KEXINIT message.
  9. /// </summary>
  10. [TestClass]
  11. public class KeyExchangeInitMessageTest : TestBase
  12. {
  13. [TestMethod]
  14. [TestCategory("KeyExchangeInitMessage")]
  15. [Owner("olegkap")]
  16. [Description("Validates KeyExchangeInitMessage message deserialization.")]
  17. public void Test_KeyExchangeInitMessage_Load()
  18. {
  19. var m = new KeyExchangeInitMessage();
  20. var input = new byte[] { 0x14, 0xc9, 0x58, 0x3f, 0x44, 0x54, 0xb4, 0x58, 0x48, 0x5f, 0xf8, 0x7d, 0xb8, 0x2d, 0x54, 0x11, 0xbf, 0x00, 0x00, 0x00, 0xb7, 0x65, 0x63, 0x64, 0x68, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x6e, 0x69, 0x73, 0x74, 0x70, 0x32, 0x35, 0x36, 0x2c, 0x65, 0x63, 0x64, 0x68, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x6e, 0x69, 0x73, 0x74, 0x70, 0x33, 0x38, 0x34, 0x2c, 0x65, 0x63, 0x64, 0x68, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x6e, 0x69, 0x73, 0x74, 0x70, 0x35, 0x32, 0x31, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x31, 0x34, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x31, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x00, 0x00, 0x00, 0x23, 0x73, 0x73, 0x68, 0x2d, 0x72, 0x73, 0x61, 0x2c, 0x73, 0x73, 0x68, 0x2d, 0x64, 0x73, 0x73, 0x2c, 0x65, 0x63, 0x64, 0x73, 0x61, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x6e, 0x69, 0x73, 0x74, 0x70, 0x32, 0x35, 0x36, 0x00, 0x00, 0x00, 0x9d, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x32, 0x35, 0x36, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x31, 0x32, 0x38, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x33, 0x64, 0x65, 0x73, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x62, 0x6c, 0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x63, 0x61, 0x73, 0x74, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x2c, 0x72, 0x69, 0x6a, 0x6e, 0x64, 0x61, 0x65, 0x6c, 0x2d, 0x63, 0x62, 0x63, 0x40, 0x6c, 0x79, 0x73, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x6c, 0x69, 0x75, 0x2e, 0x73, 0x65, 0x00, 0x00, 0x00, 0x9d, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x32, 0x35, 0x36, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x31, 0x32, 0x38, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x33, 0x64, 0x65, 0x73, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x62, 0x6c, 0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x63, 0x61, 0x73, 0x74, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x2c, 0x72, 0x69, 0x6a, 0x6e, 0x64, 0x61, 0x65, 0x6c, 0x2d, 0x63, 0x62, 0x63, 0x40, 0x6c, 0x79, 0x73, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x6c, 0x69, 0x75, 0x2e, 0x73, 0x65, 0x00, 0x00, 0x00, 0xa7, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x75, 0x6d, 0x61, 0x63, 0x2d, 0x36, 0x34, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x32, 0x35, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x32, 0x35, 0x36, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x35, 0x31, 0x32, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x35, 0x31, 0x32, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x72, 0x69, 0x70, 0x65, 0x6d, 0x64, 0x31, 0x36, 0x30, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x72, 0x69, 0x70, 0x65, 0x6d, 0x64, 0x31, 0x36, 0x30, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35, 0x2d, 0x39, 0x36, 0x00, 0x00, 0x00, 0xa7, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x75, 0x6d, 0x61, 0x63, 0x2d, 0x36, 0x34, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x32, 0x35, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x32, 0x35, 0x36, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x35, 0x31, 0x32, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x2d, 0x35, 0x31, 0x32, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x72, 0x69, 0x70, 0x65, 0x6d, 0x64, 0x31, 0x36, 0x30, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x72, 0x69, 0x70, 0x65, 0x6d, 0x64, 0x31, 0x36, 0x30, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35, 0x2d, 0x39, 0x36, 0x00, 0x00, 0x00, 0x15, 0x6e, 0x6f, 0x6e, 0x65, 0x2c, 0x7a, 0x6c, 0x69, 0x62, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x15, 0x6e, 0x6f, 0x6e, 0x65, 0x2c, 0x7a, 0x6c, 0x69, 0x62, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
  21. m.Load(input);
  22. Assert.IsFalse(m.FirstKexPacketFollows);
  23. Assert.IsTrue(m.Reserved == 0);
  24. Assert.IsTrue(m.CompressionAlgorithmsClientToServer.SequenceEqual(new string[] { "none", "zlib@openssh.com" }));
  25. Assert.IsTrue(m.CompressionAlgorithmsServerToClient.SequenceEqual(new string[] { "none", "zlib@openssh.com" }));
  26. Assert.IsTrue(m.EncryptionAlgorithmsClientToServer.SequenceEqual(new string[] { "aes128-ctr", "aes192-ctr", "aes256-ctr", "arcfour256", "arcfour128", "aes128-cbc", "3des-cbc", "blowfish-cbc", "cast128-cbc", "aes192-cbc", "aes256-cbc", "arcfour", "rijndael-cbc@lysator.liu.se" }));
  27. Assert.IsTrue(m.EncryptionAlgorithmsServerToClient.SequenceEqual(new string[] { "aes128-ctr", "aes192-ctr", "aes256-ctr", "arcfour256", "arcfour128", "aes128-cbc", "3des-cbc", "blowfish-cbc", "cast128-cbc", "aes192-cbc", "aes256-cbc", "arcfour", "rijndael-cbc@lysator.liu.se" }));
  28. Assert.IsTrue(m.KeyExchangeAlgorithms.SequenceEqual(new string[] { "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "diffie-hellman-group-exchange-sha256", "diffie-hellman-group-exchange-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group1-sha1" }));
  29. Assert.IsTrue(m.LanguagesClientToServer.SequenceEqual(new string[] { "" }));
  30. Assert.IsTrue(m.LanguagesServerToClient.SequenceEqual(new string[] { "" }));
  31. Assert.IsTrue(m.MacAlgorithmsClientToServer.SequenceEqual(new string[] { "hmac-md5", "hmac-sha1", "umac-64@openssh.com", "hmac-sha2-256", "hmac-sha2-256-96", "hmac-sha2-512", "hmac-sha2-512-96", "hmac-ripemd160", "hmac-ripemd160@openssh.com", "hmac-sha1-96", "hmac-md5-96" }));
  32. Assert.IsTrue(m.MacAlgorithmsServerToClient.SequenceEqual(new string[] { "hmac-md5", "hmac-sha1", "umac-64@openssh.com", "hmac-sha2-256", "hmac-sha2-256-96", "hmac-sha2-512", "hmac-sha2-512-96", "hmac-ripemd160", "hmac-ripemd160@openssh.com", "hmac-sha1-96", "hmac-md5-96" }));
  33. Assert.IsTrue(m.ServerHostKeyAlgorithms.SequenceEqual(new string[] { "ssh-rsa", "ssh-dss", "ecdsa-sha2-nistp256" }));
  34. }
  35. [TestMethod]
  36. [TestCategory("KeyExchangeInitMessage")]
  37. [Owner("olegkap")]
  38. [Description("Validates KeyExchangeInitMessage message serialization.")]
  39. public void Test_KeyExchangeInitMessage_GetBytes()
  40. {
  41. var m = new KeyExchangeInitMessage()
  42. {
  43. KeyExchangeAlgorithms = new string[] { "diffie-hellman-group-exchange-sha256", "diffie-hellman-group-exchange-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group1-sha1" },
  44. ServerHostKeyAlgorithms = new string[] { "ssh-rsa", "ssh-dss" },
  45. EncryptionAlgorithmsClientToServer = new string[] { "aes256-ctr", "3des-cbc", "aes128-cbc", "aes192-cbc", "aes256-cbc", "blowfish-cbc", "cast128-cbc", "aes128-ctr", "aes192-ctr" },
  46. EncryptionAlgorithmsServerToClient = new string[] { "aes256-ctr", "3des-cbc", "aes128-cbc", "aes192-cbc", "aes256-cbc", "blowfish-cbc", "cast128-cbc", "aes128-ctr", "aes192-ctr" },
  47. MacAlgorithmsClientToServer = new string[] { "hmac-md5", "hmac-sha1", },
  48. MacAlgorithmsServerToClient = new string[] { "hmac-md5", "hmac-sha1", },
  49. CompressionAlgorithmsClientToServer = new string[] { "none" },
  50. CompressionAlgorithmsServerToClient = new string[] { "none" },
  51. LanguagesClientToServer = new string[] { string.Empty },
  52. LanguagesServerToClient = new string[] { string.Empty },
  53. FirstKexPacketFollows = false,
  54. Reserved = 0,
  55. };
  56. var input = new byte[] { 0x14, 0xf3, 0x3b, 0xf9, 0x5e, 0x70, 0x18, 0x6a, 0x43, 0x3d, 0x93, 0x9e, 0x1c, 0x50, 0x4a, 0x8a, 0x33, 0x00, 0x00, 0x00, 0x7e, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x31, 0x34, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x31, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x00, 0x00, 0x00, 0x0f, 0x73, 0x73, 0x68, 0x2d, 0x72, 0x73, 0x61, 0x2c, 0x73, 0x73, 0x68, 0x2d, 0x64, 0x73, 0x73, 0x00, 0x00, 0x00, 0x63, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x33, 0x64, 0x65, 0x73, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x62, 0x6c, 0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x63, 0x61, 0x73, 0x74, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x74, 0x72, 0x00, 0x00, 0x00, 0x63, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x33, 0x64, 0x65, 0x73, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x62, 0x6c, 0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x63, 0x61, 0x73, 0x74, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63, 0x74, 0x72, 0x00, 0x00, 0x00, 0x12, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x00, 0x00, 0x00, 0x12, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x00, 0x00, 0x00, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
  57. var output = m.GetBytes();
  58. // Skip first 17 bytes since 16 bytes are randomly generated
  59. Assert.IsTrue(input.Skip(17).SequenceEqual(output.Skip(17)));
  60. }
  61. /// <summary>
  62. ///A test for KeyExchangeInitMessage Constructor
  63. ///</summary>
  64. [TestMethod]
  65. [Ignore] // placeholder
  66. public void KeyExchangeInitMessageConstructorTest()
  67. {
  68. KeyExchangeInitMessage target = new KeyExchangeInitMessage();
  69. Assert.Inconclusive("TODO: Implement code to verify target");
  70. }
  71. /// <summary>
  72. ///A test for CompressionAlgorithmsClientToServer
  73. ///</summary>
  74. [TestMethod]
  75. [Ignore] // placeholder
  76. public void CompressionAlgorithmsClientToServerTest()
  77. {
  78. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  79. string[] expected = null; // TODO: Initialize to an appropriate value
  80. target.CompressionAlgorithmsClientToServer = expected;
  81. var actual = target.CompressionAlgorithmsClientToServer;
  82. Assert.AreEqual(expected, actual);
  83. Assert.Inconclusive("Verify the correctness of this test method.");
  84. }
  85. /// <summary>
  86. ///A test for CompressionAlgorithmsServerToClient
  87. ///</summary>
  88. [TestMethod]
  89. [Ignore] // placeholder
  90. public void CompressionAlgorithmsServerToClientTest()
  91. {
  92. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  93. string[] expected = null; // TODO: Initialize to an appropriate value
  94. target.CompressionAlgorithmsServerToClient = expected;
  95. var actual = target.CompressionAlgorithmsServerToClient;
  96. Assert.AreEqual(expected, actual);
  97. Assert.Inconclusive("Verify the correctness of this test method.");
  98. }
  99. /// <summary>
  100. ///A test for EncryptionAlgorithmsClientToServer
  101. ///</summary>
  102. [TestMethod]
  103. [Ignore] // placeholder
  104. public void EncryptionAlgorithmsClientToServerTest()
  105. {
  106. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  107. string[] expected = null; // TODO: Initialize to an appropriate value
  108. target.EncryptionAlgorithmsClientToServer = expected;
  109. var actual = target.EncryptionAlgorithmsClientToServer;
  110. Assert.AreEqual(expected, actual);
  111. Assert.Inconclusive("Verify the correctness of this test method.");
  112. }
  113. /// <summary>
  114. ///A test for EncryptionAlgorithmsServerToClient
  115. ///</summary>
  116. [TestMethod]
  117. [Ignore] // placeholder
  118. public void EncryptionAlgorithmsServerToClientTest()
  119. {
  120. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  121. string[] expected = null; // TODO: Initialize to an appropriate value
  122. target.EncryptionAlgorithmsServerToClient = expected;
  123. var actual = target.EncryptionAlgorithmsServerToClient;
  124. Assert.AreEqual(expected, actual);
  125. Assert.Inconclusive("Verify the correctness of this test method.");
  126. }
  127. /// <summary>
  128. ///A test for FirstKexPacketFollows
  129. ///</summary>
  130. [TestMethod]
  131. [Ignore] // placeholder
  132. public void FirstKexPacketFollowsTest()
  133. {
  134. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  135. bool expected = false; // TODO: Initialize to an appropriate value
  136. target.FirstKexPacketFollows = expected;
  137. var actual = target.FirstKexPacketFollows;
  138. Assert.AreEqual(expected, actual);
  139. Assert.Inconclusive("Verify the correctness of this test method.");
  140. }
  141. /// <summary>
  142. ///A test for KeyExchangeAlgorithms
  143. ///</summary>
  144. [TestMethod]
  145. [Ignore] // placeholder
  146. public void KeyExchangeAlgorithmsTest()
  147. {
  148. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  149. string[] expected = null; // TODO: Initialize to an appropriate value
  150. target.KeyExchangeAlgorithms = expected;
  151. var actual = target.KeyExchangeAlgorithms;
  152. Assert.AreEqual(expected, actual);
  153. Assert.Inconclusive("Verify the correctness of this test method.");
  154. }
  155. /// <summary>
  156. ///A test for LanguagesClientToServer
  157. ///</summary>
  158. [TestMethod]
  159. [Ignore] // placeholder
  160. public void LanguagesClientToServerTest()
  161. {
  162. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  163. string[] expected = null; // TODO: Initialize to an appropriate value
  164. target.LanguagesClientToServer = expected;
  165. var actual = target.LanguagesClientToServer;
  166. Assert.AreEqual(expected, actual);
  167. Assert.Inconclusive("Verify the correctness of this test method.");
  168. }
  169. /// <summary>
  170. ///A test for LanguagesServerToClient
  171. ///</summary>
  172. [TestMethod]
  173. [Ignore] // placeholder
  174. public void LanguagesServerToClientTest()
  175. {
  176. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  177. string[] expected = null; // TODO: Initialize to an appropriate value
  178. target.LanguagesServerToClient = expected;
  179. var actual = target.LanguagesServerToClient;
  180. Assert.AreEqual(expected, actual);
  181. Assert.Inconclusive("Verify the correctness of this test method.");
  182. }
  183. /// <summary>
  184. ///A test for MacAlgorithmsClientToServer
  185. ///</summary>
  186. [TestMethod]
  187. [Ignore] // placeholder
  188. public void MacAlgorithmsClientToServerTest()
  189. {
  190. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  191. string[] expected = null; // TODO: Initialize to an appropriate value
  192. target.MacAlgorithmsClientToServer = expected;
  193. var actual = target.MacAlgorithmsClientToServer;
  194. Assert.AreEqual(expected, actual);
  195. Assert.Inconclusive("Verify the correctness of this test method.");
  196. }
  197. /// <summary>
  198. ///A test for MacAlgorithmsServerToClient
  199. ///</summary>
  200. [TestMethod]
  201. [Ignore] // placeholder
  202. public void MacAlgorithmsServerToClientTest()
  203. {
  204. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  205. string[] expected = null; // TODO: Initialize to an appropriate value
  206. target.MacAlgorithmsServerToClient = expected;
  207. var actual = target.MacAlgorithmsServerToClient;
  208. Assert.AreEqual(expected, actual);
  209. Assert.Inconclusive("Verify the correctness of this test method.");
  210. }
  211. /// <summary>
  212. ///A test for Reserved
  213. ///</summary>
  214. [TestMethod]
  215. [Ignore] // placeholder
  216. public void ReservedTest()
  217. {
  218. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  219. uint expected = 0; // TODO: Initialize to an appropriate value
  220. target.Reserved = expected;
  221. var actual = target.Reserved;
  222. Assert.AreEqual(expected, actual);
  223. Assert.Inconclusive("Verify the correctness of this test method.");
  224. }
  225. /// <summary>
  226. ///A test for ServerHostKeyAlgorithms
  227. ///</summary>
  228. [TestMethod]
  229. [Ignore] // placeholder
  230. public void ServerHostKeyAlgorithmsTest()
  231. {
  232. KeyExchangeInitMessage target = new KeyExchangeInitMessage(); // TODO: Initialize to an appropriate value
  233. string[] expected = null; // TODO: Initialize to an appropriate value
  234. target.ServerHostKeyAlgorithms = expected;
  235. var actual = target.ServerHostKeyAlgorithms;
  236. Assert.AreEqual(expected, actual);
  237. Assert.Inconclusive("Verify the correctness of this test method.");
  238. }
  239. }
  240. }