hrr_rb_ssh 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/demo/server.rb +10 -2
  3. data/lib/hrr_rb_ssh/authentication/method/none.rb +1 -1
  4. data/lib/hrr_rb_ssh/authentication/method/password.rb +2 -2
  5. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/ecdsa_signature_blob.rb +27 -0
  6. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/public_key_blob.rb +28 -0
  7. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/signature.rb +27 -0
  8. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/signature_blob.rb +33 -0
  9. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256.rb +84 -0
  10. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/ecdsa_signature_blob.rb +27 -0
  11. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/public_key_blob.rb +28 -0
  12. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/signature.rb +27 -0
  13. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/signature_blob.rb +33 -0
  14. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384.rb +84 -0
  15. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/ecdsa_signature_blob.rb +27 -0
  16. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/public_key_blob.rb +28 -0
  17. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/signature.rb +27 -0
  18. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/signature_blob.rb +33 -0
  19. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521.rb +84 -0
  20. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss/public_key_blob.rb +5 -5
  21. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss/signature.rb +2 -2
  22. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss/signature_blob.rb +8 -8
  23. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss.rb +24 -24
  24. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa/public_key_blob.rb +3 -3
  25. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa/signature.rb +2 -2
  26. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa/signature_blob.rb +8 -8
  27. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa.rb +19 -19
  28. data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm.rb +3 -0
  29. data/lib/hrr_rb_ssh/authentication/method/publickey/context.rb +7 -7
  30. data/lib/hrr_rb_ssh/authentication/method/publickey.rb +7 -7
  31. data/lib/hrr_rb_ssh/authentication.rb +6 -6
  32. data/lib/hrr_rb_ssh/codable.rb +7 -2
  33. data/lib/hrr_rb_ssh/connection/channel/channel_type/direct_tcpip.rb +102 -0
  34. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/proc_chain/chain_context.rb +26 -0
  35. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/proc_chain.rb +29 -0
  36. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/env/context.rb +2 -2
  37. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/exec/context.rb +1 -1
  38. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/pty_req/context.rb +6 -6
  39. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/subsystem/context.rb +1 -1
  40. data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/window_change/context.rb +4 -4
  41. data/lib/hrr_rb_ssh/connection/channel/channel_type/session.rb +42 -0
  42. data/lib/hrr_rb_ssh/connection/channel/channel_type.rb +1 -0
  43. data/lib/hrr_rb_ssh/connection/channel.rb +50 -63
  44. data/lib/hrr_rb_ssh/connection/request_handler/reference_shell_request_handler.rb +29 -9
  45. data/lib/hrr_rb_ssh/connection.rb +22 -27
  46. data/lib/hrr_rb_ssh/message/001_ssh_msg_disconnect.rb +4 -4
  47. data/lib/hrr_rb_ssh/message/002_ssh_msg_ignore.rb +2 -2
  48. data/lib/hrr_rb_ssh/message/003_ssh_msg_unimplemented.rb +2 -2
  49. data/lib/hrr_rb_ssh/message/004_ssh_msg_debug.rb +4 -4
  50. data/lib/hrr_rb_ssh/message/005_ssh_msg_service_request.rb +2 -2
  51. data/lib/hrr_rb_ssh/message/006_ssh_msg_service_accept.rb +2 -2
  52. data/lib/hrr_rb_ssh/message/020_ssh_msg_kexinit.rb +29 -29
  53. data/lib/hrr_rb_ssh/message/021_ssh_msg_newkeys.rb +1 -1
  54. data/lib/hrr_rb_ssh/message/030_ssh_msg_kex_dh_gex_request_old.rb +2 -2
  55. data/lib/hrr_rb_ssh/message/030_ssh_msg_kexdh_init.rb +2 -2
  56. data/lib/hrr_rb_ssh/message/030_ssh_msg_kexecdh_init.rb +24 -0
  57. data/lib/hrr_rb_ssh/message/031_ssh_msg_kex_dh_gex_group.rb +3 -3
  58. data/lib/hrr_rb_ssh/message/031_ssh_msg_kexdh_reply.rb +4 -4
  59. data/lib/hrr_rb_ssh/message/031_ssh_msg_kexecdh_reply.rb +26 -0
  60. data/lib/hrr_rb_ssh/message/032_ssh_msg_kex_dh_gex_init.rb +2 -2
  61. data/lib/hrr_rb_ssh/message/033_ssh_msg_kex_dh_gex_reply.rb +4 -4
  62. data/lib/hrr_rb_ssh/message/034_ssh_msg_kex_dh_gex_request.rb +4 -4
  63. data/lib/hrr_rb_ssh/message/050_ssh_msg_userauth_request.rb +17 -17
  64. data/lib/hrr_rb_ssh/message/051_ssh_msg_userauth_failure.rb +3 -3
  65. data/lib/hrr_rb_ssh/message/052_ssh_msg_userauth_success.rb +1 -1
  66. data/lib/hrr_rb_ssh/message/060_ssh_msg_userauth_pk_ok.rb +3 -3
  67. data/lib/hrr_rb_ssh/message/080_ssh_msg_global_request.rb +12 -12
  68. data/lib/hrr_rb_ssh/message/081_ssh_msg_request_success.rb +5 -5
  69. data/lib/hrr_rb_ssh/message/082_ssh_msg_request_failure.rb +1 -1
  70. data/lib/hrr_rb_ssh/message/090_ssh_msg_channel_open.rb +24 -24
  71. data/lib/hrr_rb_ssh/message/091_ssh_msg_channel_open_confirmation.rb +14 -24
  72. data/lib/hrr_rb_ssh/message/092_ssh_msg_channel_open_failure.rb +5 -5
  73. data/lib/hrr_rb_ssh/message/093_ssh_msg_channel_window_adjust.rb +3 -3
  74. data/lib/hrr_rb_ssh/message/094_ssh_msg_channel_data.rb +3 -3
  75. data/lib/hrr_rb_ssh/message/095_ssh_msg_channel_extended_data.rb +4 -4
  76. data/lib/hrr_rb_ssh/message/096_ssh_msg_channel_eof.rb +2 -2
  77. data/lib/hrr_rb_ssh/message/097_ssh_msg_channel_close.rb +2 -2
  78. data/lib/hrr_rb_ssh/message/098_ssh_msg_channel_request.rb +51 -51
  79. data/lib/hrr_rb_ssh/message/099_ssh_msg_channel_success.rb +2 -2
  80. data/lib/hrr_rb_ssh/message/100_ssh_msg_channel_failure.rb +2 -2
  81. data/lib/hrr_rb_ssh/message.rb +2 -0
  82. data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman/h0.rb +8 -8
  83. data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman.rb +13 -13
  84. data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman_group_exchange/h0.rb +13 -13
  85. data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman_group_exchange.rb +24 -24
  86. data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman/h0.rb +29 -0
  87. data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman.rb +132 -0
  88. data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman_sha2_nistp256.rb +18 -0
  89. data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman_sha2_nistp384.rb +18 -0
  90. data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman_sha2_nistp521.rb +18 -0
  91. data/lib/hrr_rb_ssh/transport/kex_algorithm.rb +3 -0
  92. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256/ecdsa_signature_blob.rb +23 -0
  93. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256/public_key_blob.rb +25 -0
  94. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256/signature.rb +23 -0
  95. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256.rb +79 -0
  96. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384/ecdsa_signature_blob.rb +23 -0
  97. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384/public_key_blob.rb +25 -0
  98. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384/signature.rb +23 -0
  99. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384.rb +80 -0
  100. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521/ecdsa_signature_blob.rb +23 -0
  101. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521/public_key_blob.rb +25 -0
  102. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521/signature.rb +23 -0
  103. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521.rb +81 -0
  104. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_dss/public_key_blob.rb +5 -5
  105. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_dss/signature.rb +2 -2
  106. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_dss.rb +9 -9
  107. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_rsa/public_key_blob.rb +3 -3
  108. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_rsa/signature.rb +2 -2
  109. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_rsa.rb +6 -6
  110. data/lib/hrr_rb_ssh/transport/server_host_key_algorithm.rb +3 -0
  111. data/lib/hrr_rb_ssh/transport.rb +30 -30
  112. data/lib/hrr_rb_ssh/version.rb +1 -1
  113. metadata +39 -4
  114. data/lib/hrr_rb_ssh/connection/channel/proc_chain/chain_context.rb +0 -22
  115. data/lib/hrr_rb_ssh/connection/channel/proc_chain.rb +0 -25
@@ -16,8 +16,8 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'n'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'n'],
21
21
  ]
22
22
  end
23
23
  end
@@ -16,8 +16,8 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Mpint, 'e'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Mpint, :'e'],
21
21
  ]
22
22
  end
23
23
  end
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ # vim: et ts=2 sw=2
3
+
4
+ require 'hrr_rb_ssh/data_type'
5
+ require 'hrr_rb_ssh/codable'
6
+
7
+ module HrrRbSsh
8
+ module Message
9
+ module SSH_MSG_KEXECDH_INIT
10
+ class << self
11
+ include Codable
12
+ end
13
+
14
+ ID = self.name.split('::').last
15
+ VALUE = 30
16
+
17
+ DEFINITION = [
18
+ #[DataType, Field Name]
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Mpint, :'Q_C'],
21
+ ]
22
+ end
23
+ end
24
+ end
@@ -16,9 +16,9 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Mpint, 'p'],
21
- [DataType::Mpint, 'g'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Mpint, :'p'],
21
+ [DataType::Mpint, :'g'],
22
22
  ]
23
23
  end
24
24
  end
@@ -16,10 +16,10 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::String, 'server public host key and certificates (K_S)'],
21
- [DataType::Mpint, 'f'],
22
- [DataType::String, 'signature of H'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'server public host key and certificates (K_S)'],
21
+ [DataType::Mpint, :'f'],
22
+ [DataType::String, :'signature of H'],
23
23
  ]
24
24
  end
25
25
  end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ # vim: et ts=2 sw=2
3
+
4
+ require 'hrr_rb_ssh/data_type'
5
+ require 'hrr_rb_ssh/codable'
6
+
7
+ module HrrRbSsh
8
+ module Message
9
+ module SSH_MSG_KEXECDH_REPLY
10
+ class << self
11
+ include Codable
12
+ end
13
+
14
+ ID = self.name.split('::').last
15
+ VALUE = 31
16
+
17
+ DEFINITION = [
18
+ #[DataType, Field Name]
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'K_S'],
21
+ [DataType::Mpint, :'Q_S'],
22
+ [DataType::String, :'signature of H'],
23
+ ]
24
+ end
25
+ end
26
+ end
@@ -16,8 +16,8 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Mpint, 'e'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Mpint, :'e'],
21
21
  ]
22
22
  end
23
23
  end
@@ -16,10 +16,10 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::String, 'server public host key and certificates (K_S)'],
21
- [DataType::Mpint, 'f'],
22
- [DataType::String, 'signature of H'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'server public host key and certificates (K_S)'],
21
+ [DataType::Mpint, :'f'],
22
+ [DataType::String, :'signature of H'],
23
23
  ]
24
24
  end
25
25
  end
@@ -16,10 +16,10 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'min'],
21
- [DataType::Uint32, 'n'],
22
- [DataType::Uint32, 'max'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'min'],
21
+ [DataType::Uint32, :'n'],
22
+ [DataType::Uint32, :'max'],
23
23
  ]
24
24
  end
25
25
  end
@@ -16,40 +16,40 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::String, 'user name'],
21
- [DataType::String, 'service name'],
22
- [DataType::String, 'method name'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'user name'],
21
+ [DataType::String, :'service name'],
22
+ [DataType::String, :'method name'],
23
23
  ]
24
24
 
25
25
  PUBLICKEY_DEFINITION = [
26
26
  #[DataType, Field Name]
27
- #[DataType::String, 'method name' : "publickey"],
28
- [DataType::Boolean, 'with signature'],
29
- [DataType::String, 'public key algorithm name'],
30
- [DataType::String, 'public key blob'],
27
+ #[DataType::String, :'method name' : "publickey"],
28
+ [DataType::Boolean, :'with signature'],
29
+ [DataType::String, :'public key algorithm name'],
30
+ [DataType::String, :'public key blob'],
31
31
  ]
32
32
 
33
33
  PUBLICKEY_SIGNATURE_DEFINITION = [
34
34
  #[DataType, Field Name]
35
- #[DataType::String, 'with signature' : "TRUE"],
36
- [DataType::String, 'signature'],
35
+ #[DataType::String, :'with signature' : "TRUE"],
36
+ [DataType::String, :'signature'],
37
37
  ]
38
38
 
39
39
  PASSWORD_DEFINITION = [
40
40
  #[DataType, Field Name]
41
- #[DataType::String, 'method name' : "password"],
42
- [DataType::Boolean, 'FALSE'],
43
- [DataType::String, 'plaintext password'],
41
+ #[DataType::String, :'method name' : "password"],
42
+ [DataType::Boolean, :'FALSE'],
43
+ [DataType::String, :'plaintext password'],
44
44
  ]
45
45
 
46
46
  CONDITIONAL_DEFINITION = {
47
47
  # Field Name => {Field Value => Conditional Definition}
48
- 'method name' => {
49
- 'publickey' => PUBLICKEY_DEFINITION,
50
- 'password' => PASSWORD_DEFINITION,
48
+ :'method name' => {
49
+ "publickey" => PUBLICKEY_DEFINITION,
50
+ "password" => PASSWORD_DEFINITION,
51
51
  },
52
- 'with signature' => {
52
+ :'with signature' => {
53
53
  true => PUBLICKEY_SIGNATURE_DEFINITION,
54
54
  },
55
55
  }
@@ -16,9 +16,9 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::NameList, 'authentications that can continue'],
21
- [DataType::Boolean, 'partial success'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::NameList, :'authentications that can continue'],
21
+ [DataType::Boolean, :'partial success'],
22
22
  ]
23
23
  end
24
24
  end
@@ -16,7 +16,7 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
19
+ [DataType::Byte, :'message number'],
20
20
  ]
21
21
  end
22
22
  end
@@ -16,9 +16,9 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::String, 'public key algorithm name from the request'],
21
- [DataType::String, 'public key blob from the request'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'public key algorithm name from the request'],
21
+ [DataType::String, :'public key blob from the request'],
22
22
  ]
23
23
  end
24
24
  end
@@ -16,30 +16,30 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::String, 'request name'],
21
- [DataType::Boolean, 'want reply'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'request name'],
21
+ [DataType::Boolean, :'want reply'],
22
22
  ]
23
23
 
24
24
  TCPIP_FORWARD_DEFINITION = [
25
25
  #[DataType, Field Name]
26
- #[DataType::String, 'request name' : "tcpip-forward"],
27
- [DataType::String, 'address to bind'],
28
- [DataType::Uint32, 'port number to bind'],
26
+ #[DataType::String, :'request name' : "tcpip-forward"],
27
+ [DataType::String, :'address to bind'],
28
+ [DataType::Uint32, :'port number to bind'],
29
29
  ]
30
30
 
31
31
  CANCEL_TCPIP_FORWARD_DEFINITION = [
32
32
  #[DataType, Field Name]
33
- #[DataType::String, 'request name' : "cancel-tcpip-forward"],
34
- [DataType::String, 'address to bind'],
35
- [DataType::Uint32, 'port number to bind'],
33
+ #[DataType::String, :'request name' : "cancel-tcpip-forward"],
34
+ [DataType::String, :'address to bind'],
35
+ [DataType::Uint32, :'port number to bind'],
36
36
  ]
37
37
 
38
38
  CONDITIONAL_DEFINITION = {
39
39
  # Field Name => {Field Value => Conditional Definition}
40
- 'request name' => {
41
- 'tcpip-forward' => TCPIP_FORWARD_DEFINITION,
42
- 'cancel-tcpip-forward' => CANCEL_TCPIP_FORWARD_DEFINITION,
40
+ :'request name' => {
41
+ "tcpip-forward" => TCPIP_FORWARD_DEFINITION,
42
+ "cancel-tcpip-forward" => CANCEL_TCPIP_FORWARD_DEFINITION,
43
43
  },
44
44
  }
45
45
  end
@@ -16,19 +16,19 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
19
+ [DataType::Byte, :'message number'],
20
20
  ]
21
21
 
22
22
  TCPIP_FORWARD_DEFINITION = [
23
23
  #[DataType, Field Name]
24
- #[DataType::String, 'request name' : "tcpip-forward"],
25
- [DataType::Uint32, 'port that was bound on the server'],
24
+ #[DataType::String, :'request name' : "tcpip-forward"],
25
+ [DataType::Uint32, :'port that was bound on the server'],
26
26
  ]
27
27
 
28
28
  CONDITIONAL_DEFINITION = {
29
29
  # Field Name => {Field Value => Conditional Definition}
30
- 'request name' => {
31
- 'tcpip-forward' => TCPIP_FORWARD_DEFINITION,
30
+ :'request name' => {
31
+ "tcpip-forward" => TCPIP_FORWARD_DEFINITION,
32
32
  }
33
33
  }
34
34
  end
@@ -16,7 +16,7 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
19
+ [DataType::Byte, :'message number'],
20
20
  ]
21
21
  end
22
22
  end
@@ -16,50 +16,50 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::String, 'channel type'],
21
- [DataType::Uint32, 'sender channel'],
22
- [DataType::Uint32, 'initial window size'],
23
- [DataType::Uint32, 'maximum packet size'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::String, :'channel type'],
21
+ [DataType::Uint32, :'sender channel'],
22
+ [DataType::Uint32, :'initial window size'],
23
+ [DataType::Uint32, :'maximum packet size'],
24
24
  ]
25
25
 
26
26
  SESSION_DEFINITION = [
27
27
  #[DataType, Field Name]
28
- #[DataType::String, 'channel type' : "session"],
28
+ #[DataType::String, :'channel type' : "session"],
29
29
  ]
30
30
 
31
31
  X11_DEFINITION = [
32
32
  #[DataType, Field Name]
33
- #[DataType::String, 'channel type' : "x11"],
34
- [DataType::String, 'originator address'],
35
- [DataType::Uint32, 'originator port'],
33
+ #[DataType::String, :'channel type' : "x11"],
34
+ [DataType::String, :'originator address'],
35
+ [DataType::Uint32, :'originator port'],
36
36
  ]
37
37
 
38
38
  FORWARDED_TCPIP_DEFINITION = [
39
39
  #[DataType, Field Name]
40
- #[DataType::String, 'channel type' : "forwarded-tcpip"],
41
- [DataType::String, 'address that was connected'],
42
- [DataType::Uint32, 'port that was connected'],
43
- [DataType::String, 'originator IP address'],
44
- [DataType::Uint32, 'originator port'],
40
+ #[DataType::String, :'channel type' : "forwarded-tcpip"],
41
+ [DataType::String, :'address that was connected'],
42
+ [DataType::Uint32, :'port that was connected'],
43
+ [DataType::String, :'originator IP address'],
44
+ [DataType::Uint32, :'originator port'],
45
45
  ]
46
46
 
47
47
  DIRECT_TCPIP_DEFINITION = [
48
48
  #[DataType, Field Name]
49
- #[DataType::String, 'channel type' : "direct-tcpip"],
50
- [DataType::String, 'host to connect'],
51
- [DataType::Uint32, 'port to connect'],
52
- [DataType::String, 'originator IP address'],
53
- [DataType::Uint32, 'originator port'],
49
+ #[DataType::String, :'channel type' : "direct-tcpip"],
50
+ [DataType::String, :'host to connect'],
51
+ [DataType::Uint32, :'port to connect'],
52
+ [DataType::String, :'originator IP address'],
53
+ [DataType::Uint32, :'originator port'],
54
54
  ]
55
55
 
56
56
  CONDITIONAL_DEFINITION = {
57
57
  # Field Name => {Field Value => Conditional Definition}
58
- 'channel type' => {
59
- 'session' => SESSION_DEFINITION,
60
- 'x11' => X11_DEFINITION,
61
- 'forwarded-tcpip' => FORWARDED_TCPIP_DEFINITION,
62
- 'direct-tcpip' => DIRECT_TCPIP_DEFINITION,
58
+ :'channel type' => {
59
+ "session" => SESSION_DEFINITION,
60
+ "x11" => X11_DEFINITION,
61
+ "forwarded-tcpip" => FORWARDED_TCPIP_DEFINITION,
62
+ "direct-tcpip" => DIRECT_TCPIP_DEFINITION,
63
63
  },
64
64
  }
65
65
  end
@@ -16,50 +16,40 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'recipient channel'],
21
- [DataType::Uint32, 'sender channel'],
22
- [DataType::Uint32, 'initial window size'],
23
- [DataType::Uint32, 'maximum packet size'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'recipient channel'],
21
+ [DataType::Uint32, :'sender channel'],
22
+ [DataType::Uint32, :'initial window size'],
23
+ [DataType::Uint32, :'maximum packet size'],
24
24
  ]
25
25
 
26
26
  SESSION_DEFINITION = [
27
27
  #[DataType, Field Name]
28
- #[DataType::String, 'channel type' : "session"],
28
+ #[DataType::String, :'channel type' : "session"],
29
29
  ]
30
30
 
31
31
  X11_DEFINITION = [
32
32
  #[DataType, Field Name]
33
- #[DataType::String, 'channel type' : "x11"],
34
- [DataType::String, 'originator address'],
35
- [DataType::Uint32, 'originator port'],
33
+ #[DataType::String, :'channel type' : "x11"],
36
34
  ]
37
35
 
38
36
  FORWARDED_TCPIP_DEFINITION = [
39
37
  #[DataType, Field Name]
40
- #[DataType::String, 'channel type' : "forwarded-tcpip"],
41
- [DataType::String, 'address that was connected'],
42
- [DataType::Uint32, 'port that was connected'],
43
- [DataType::String, 'originator IP address'],
44
- [DataType::Uint32, 'originator port'],
38
+ #[DataType::String, :'channel type' : "forwarded-tcpip"],
45
39
  ]
46
40
 
47
41
  DIRECT_TCPIP_DEFINITION = [
48
42
  #[DataType, Field Name]
49
- #[DataType::String, 'channel type' : "direct-tcpip"],
50
- [DataType::String, 'host to connect'],
51
- [DataType::Uint32, 'port to connect'],
52
- [DataType::String, 'originator IP address'],
53
- [DataType::Uint32, 'originator port'],
43
+ #[DataType::String, :'channel type' : "direct-tcpip"],
54
44
  ]
55
45
 
56
46
  CONDITIONAL_DEFINITION = {
57
47
  # Field Name => {Field Value => Conditional Definition}
58
- 'channel type' => {
59
- 'session' => SESSION_DEFINITION,
60
- 'x11' => X11_DEFINITION,
61
- 'forwarded-tcpip' => FORWARDED_TCPIP_DEFINITION,
62
- 'direct-tcpip' => DIRECT_TCPIP_DEFINITION,
48
+ :'channel type' => {
49
+ "session" => SESSION_DEFINITION,
50
+ "x11" => X11_DEFINITION,
51
+ "forwarded-tcpip" => FORWARDED_TCPIP_DEFINITION,
52
+ "direct-tcpip" => DIRECT_TCPIP_DEFINITION,
63
53
  },
64
54
  }
65
55
  end
@@ -23,11 +23,11 @@ module HrrRbSsh
23
23
 
24
24
  DEFINITION = [
25
25
  #[DataType, Field Name]
26
- [DataType::Byte, 'message number'],
27
- [DataType::Uint32, 'recipient channel'],
28
- [DataType::Uint32, 'reason code'],
29
- [DataType::String, 'description'],
30
- [DataType::String, 'language tag'],
26
+ [DataType::Byte, :'message number'],
27
+ [DataType::Uint32, :'recipient channel'],
28
+ [DataType::Uint32, :'reason code'],
29
+ [DataType::String, :'description'],
30
+ [DataType::String, :'language tag'],
31
31
  ]
32
32
  end
33
33
  end
@@ -16,9 +16,9 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'recipient channel'],
21
- [DataType::Uint32, 'bytes to add'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'recipient channel'],
21
+ [DataType::Uint32, :'bytes to add'],
22
22
  ]
23
23
  end
24
24
  end
@@ -16,9 +16,9 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'recipient channel'],
21
- [DataType::String, 'data'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'recipient channel'],
21
+ [DataType::String, :'data'],
22
22
  ]
23
23
  end
24
24
  end
@@ -20,10 +20,10 @@ module HrrRbSsh
20
20
 
21
21
  DEFINITION = [
22
22
  #[DataType, Field Name]
23
- [DataType::Byte, 'message number'],
24
- [DataType::Uint32, 'recipient channel'],
25
- [DataType::Uint32, 'data type code'],
26
- [DataType::String, 'data'],
23
+ [DataType::Byte, :'message number'],
24
+ [DataType::Uint32, :'recipient channel'],
25
+ [DataType::Uint32, :'data type code'],
26
+ [DataType::String, :'data'],
27
27
  ]
28
28
  end
29
29
  end
@@ -16,8 +16,8 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'recipient channel'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'recipient channel'],
21
21
  ]
22
22
  end
23
23
  end
@@ -16,8 +16,8 @@ module HrrRbSsh
16
16
 
17
17
  DEFINITION = [
18
18
  #[DataType, Field Name]
19
- [DataType::Byte, 'message number'],
20
- [DataType::Uint32, 'recipient channel'],
19
+ [DataType::Byte, :'message number'],
20
+ [DataType::Uint32, :'recipient channel'],
21
21
  ]
22
22
  end
23
23
  end