packetgen-plugin-ipsec 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/packetgen/plugin/ike/auth.rb +7 -7
- data/lib/packetgen/plugin/ipsec_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 244f32723ca46a0f9c1fda810c9fb74550da9519238b320b9654f282c29a8181
|
4
|
+
data.tar.gz: a9c04281d351b652355dd43796d51044d70e51d4409fb758852987b9df2ff7df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b449087577704813b846807141029e977a623ebc5f652f1d9ba484557cbd6177fa204f00e23f0f479a2b0382c010d5d3a6c7ea87a06f8003e789637979246db9
|
7
|
+
data.tar.gz: d6aeac6eeac0b5c8da7c2a42699c6cdc9e1c7be085d3027e96bee84a75027d507450db6301eead0c5fa32a7dec7e182776593c5ea1e316fbe80e3c77627d5d65
|
@@ -31,7 +31,7 @@ module PacketGen
|
|
31
31
|
#
|
32
32
|
# == Create a KE payload
|
33
33
|
# # create a IKE packet with a Auth payload
|
34
|
-
# pkt = PacketGen.gen('IP').add('UDP').add('IKE').add('IKE::Auth',
|
34
|
+
# pkt = PacketGen.gen('IP').add('UDP').add('IKE').add('IKE::Auth', auth_method: 'SHARED_KEY')
|
35
35
|
# pkt.calc_length
|
36
36
|
# @author Sylvain Daubert
|
37
37
|
class Auth < Payload
|
@@ -50,10 +50,10 @@ module PacketGen
|
|
50
50
|
'DIGITAL_SIGNATURE' => 14
|
51
51
|
}.freeze
|
52
52
|
|
53
|
-
# @attribute [r]
|
53
|
+
# @attribute [r] auth_method
|
54
54
|
# 8-bit Auth Method
|
55
55
|
# @return [Integer]
|
56
|
-
define_field_before :content, :
|
56
|
+
define_field_before :content, :auth_method, PacketGen::Types::Int8Enum, enum: METHODS
|
57
57
|
# @attribute reserved
|
58
58
|
# 24-bit reserved field
|
59
59
|
# @return [Integer]
|
@@ -81,7 +81,7 @@ module PacketGen
|
|
81
81
|
id = packet.ike.flag_i? ? packet.ike_idi : packet.ike_idr
|
82
82
|
signed_octets << prf(prf, sk_p, id.to_s[4, id.length - 4])
|
83
83
|
|
84
|
-
case
|
84
|
+
case auth_method
|
85
85
|
when METHODS['SHARED_KEY']
|
86
86
|
auth = prf(prf(shared_secret, 'Key Pad for IKEv2'), signed_octets)
|
87
87
|
auth == content
|
@@ -118,14 +118,14 @@ module PacketGen
|
|
118
118
|
when METHOD_NULL
|
119
119
|
true
|
120
120
|
else
|
121
|
-
raise NotImplementedError, "unsupported method #{
|
121
|
+
raise NotImplementedError, "unsupported auth method #{human_auth_method}"
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
125
|
# Get authentication method name
|
126
126
|
# @return [String]
|
127
|
-
def
|
128
|
-
self[:
|
127
|
+
def human_auth_method
|
128
|
+
self[:auth_method].to_human
|
129
129
|
end
|
130
130
|
|
131
131
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packetgen-plugin-ipsec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Daubert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: packetgen
|