codtls 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +12 -0
- data/.yardopts +4 -0
- data/Gemfile +12 -0
- data/LICENSE +21 -0
- data/README.md +78 -0
- data/Rakefile +29 -0
- data/lib/codtls.rb +186 -0
- data/lib/codtls/abstract_session.rb +179 -0
- data/lib/codtls/alert.rb +64 -0
- data/lib/codtls/decrypt.rb +72 -0
- data/lib/codtls/ecc.rb +26 -0
- data/lib/codtls/encrypt.rb +29 -0
- data/lib/codtls/h_changecipherspec.rb +25 -0
- data/lib/codtls/h_chello.rb +79 -0
- data/lib/codtls/h_content.rb +57 -0
- data/lib/codtls/h_finished.rb +30 -0
- data/lib/codtls/h_keyexchange.rb +131 -0
- data/lib/codtls/h_shello.rb +51 -0
- data/lib/codtls/h_shellodone.rb +22 -0
- data/lib/codtls/h_type.rb +22 -0
- data/lib/codtls/h_verify.rb +30 -0
- data/lib/codtls/handshake.rb +173 -0
- data/lib/codtls/models/codtls_connection.rb +3 -0
- data/lib/codtls/models/codtls_device.rb +3 -0
- data/lib/codtls/prf.rb +40 -0
- data/lib/codtls/pskdb.rb +104 -0
- data/lib/codtls/ram_session.rb +214 -0
- data/lib/codtls/rampskdb.rb +87 -0
- data/lib/codtls/record.rb +202 -0
- data/lib/codtls/session.rb +284 -0
- data/lib/codtls/version.rb +3 -0
- data/lib/generators/codtls/codtls_generator.rb +56 -0
- data/lib/generators/codtls/templates/create_codtls_connections.rb +15 -0
- data/lib/generators/codtls/templates/create_codtls_devices.rb +11 -0
- data/test/test_codtls.rb +75 -0
- data/test/test_ecc.rb +44 -0
- data/test/test_h_chello.rb +40 -0
- data/test/test_h_content.rb +59 -0
- data/test/test_h_keyexchange.rb +36 -0
- data/test/test_helper.rb +3 -0
- data/test/test_pskdb.rb +37 -0
- data/test/test_ram_session.rb +131 -0
- data/test/test_rampskdb.rb +26 -0
- data/test/test_record.rb +128 -0
- data/test/test_send_recv.rb +178 -0
- data/test/test_session.rb +164 -0
- metadata +303 -0
@@ -0,0 +1,178 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'codtls'
|
3
|
+
|
4
|
+
# Testclass
|
5
|
+
class CoDTLSSendRecvTest < Minitest::Test
|
6
|
+
DB_FILE = 'sendrecvtest.sqlite'
|
7
|
+
KEY = 'ABCDEFGHIJKLMNOP'
|
8
|
+
IV = 'ABCD'
|
9
|
+
|
10
|
+
def setup
|
11
|
+
create_sqlite_db(DB_FILE)
|
12
|
+
SQLite3::Database.new(DB_FILE)
|
13
|
+
ActiveRecord::Base.establish_connection(
|
14
|
+
adapter: 'sqlite3',
|
15
|
+
database: DB_FILE)
|
16
|
+
ActiveRecord::Base.connection
|
17
|
+
ActiveRecord::Migration.verbose = false
|
18
|
+
ActiveRecord::Migrator.migrate('db/migrate')
|
19
|
+
end
|
20
|
+
|
21
|
+
def teardown
|
22
|
+
#CoDTLS::Session.clear_all
|
23
|
+
ActiveRecord::Base.remove_connection
|
24
|
+
FileUtils.rm(DB_FILE)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_send
|
28
|
+
# Setup - begin
|
29
|
+
session = CoDTLS::Session.new('127.0.0.1')
|
30
|
+
|
31
|
+
r = UDPSocket.new
|
32
|
+
r.bind('127.0.0.1', 5684)
|
33
|
+
|
34
|
+
s = CoDTLS::SecureSocket.new
|
35
|
+
s.connect('127.0.0.1', 5684)
|
36
|
+
# Setup - end
|
37
|
+
|
38
|
+
# assert_raises(CoDTLS::SecureSocketError) { s.send('Hallo Welt!', 0) }
|
39
|
+
|
40
|
+
session.enable_handshake
|
41
|
+
|
42
|
+
s.send('Hallo Welt!', 0)
|
43
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
44
|
+
check_header('Send 1', h, :handshake, 0, 1)
|
45
|
+
assert_equal('Hallo Welt!', d)
|
46
|
+
|
47
|
+
session.disable_handshake
|
48
|
+
|
49
|
+
# assert_raises(CoDTLS::SecureSocketError) { s.send('Hallo Welt!', 0) }
|
50
|
+
|
51
|
+
session.enable_handshake
|
52
|
+
|
53
|
+
s.send('Hallo Welt!', 0)
|
54
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
55
|
+
check_header('Send 2', h, :handshake, 0, 2)
|
56
|
+
assert_equal('Hallo Welt!', d)
|
57
|
+
|
58
|
+
s.send('Hallo Welt!', 0)
|
59
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
60
|
+
check_header('Send 3', h, :handshake, 0, 3)
|
61
|
+
assert_equal('Hallo Welt!', d)
|
62
|
+
|
63
|
+
session.key_block = KEY * 2 + IV * 2
|
64
|
+
|
65
|
+
s.send('Hallo Welt!', 0)
|
66
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
67
|
+
check_header('Send 4', h, :handshake, 0, 4)
|
68
|
+
assert_equal('Hallo Welt!', d)
|
69
|
+
|
70
|
+
ccm = OpenSSL::CCM.new('AES', KEY, 8)
|
71
|
+
session.increase_epoch
|
72
|
+
|
73
|
+
session.disable_handshake
|
74
|
+
|
75
|
+
s.send('Hallo Welt!', 0)
|
76
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
77
|
+
check_header('Send 5', h, :appdata, 1, 1)
|
78
|
+
c = ccm.encrypt('Hallo Welt!', IV + "\x00\x01\x00\x00\x00\x00\x00\x01")
|
79
|
+
assert_equal(c.unpack('H*')[0], d.unpack('H*')[0])
|
80
|
+
|
81
|
+
s.send('Hallo Welt!', 0)
|
82
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
83
|
+
check_header('Send 6', h, :appdata, 1, 2)
|
84
|
+
c = ccm.encrypt('Hallo Welt!', IV + "\x00\x01\x00\x00\x00\x00\x00\x02")
|
85
|
+
assert_equal(c.unpack('H*')[0], d.unpack('H*')[0])
|
86
|
+
|
87
|
+
session.enable_handshake
|
88
|
+
|
89
|
+
s.send('Hallo Welt!', 0)
|
90
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
91
|
+
check_header('Send 7', h, :handshake, 1, 3)
|
92
|
+
c = ccm.encrypt('Hallo Welt!', IV + "\x00\x01\x00\x00\x00\x00\x00\x03")
|
93
|
+
assert_equal(c.unpack('H*')[0], d.unpack('H*')[0])
|
94
|
+
|
95
|
+
s.send('Hallo Welt!', 0)
|
96
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
97
|
+
check_header('Send 8', h, :handshake, 1, 4)
|
98
|
+
c = ccm.encrypt('Hallo Welt!', IV + "\x00\x01\x00\x00\x00\x00\x00\x04")
|
99
|
+
assert_equal(c.unpack('H*')[0], d.unpack('H*')[0])
|
100
|
+
|
101
|
+
session.disable_handshake
|
102
|
+
|
103
|
+
s.send('Hallo Welt!', 0)
|
104
|
+
h, d = CoDTLS::Record.parse(r.recvfrom(50)[0])
|
105
|
+
check_header('Send 9', h, :appdata, 1, 5)
|
106
|
+
c = ccm.encrypt('Hallo Welt!', IV + "\x00\x01\x00\x00\x00\x00\x00\x05")
|
107
|
+
assert_equal(c.unpack('H*')[0], d.unpack('H*')[0])
|
108
|
+
|
109
|
+
s.close
|
110
|
+
r.close
|
111
|
+
end
|
112
|
+
|
113
|
+
=begin
|
114
|
+
def test_receive
|
115
|
+
# Setup - begin
|
116
|
+
session = CoDTLS::Session.new('127.0.0.1')
|
117
|
+
session.enable_handshake
|
118
|
+
|
119
|
+
r = CoDTLS::SecureSocket.new
|
120
|
+
r.bind('127.0.0.1', 0)
|
121
|
+
r.connect('127.0.0.1', 5684)
|
122
|
+
|
123
|
+
s = UDPSocket.new
|
124
|
+
s.bind('127.0.0.1', 5684)
|
125
|
+
|
126
|
+
r.send('find Port', 0)
|
127
|
+
port = s.recvfrom(12)[1][1]
|
128
|
+
# s.connect('127.0.0.1', s.recvfrom(12)[1][1])
|
129
|
+
|
130
|
+
session.disable_handshake
|
131
|
+
# Setup - end
|
132
|
+
|
133
|
+
h = CoDTLS::Record.new(:appdata, 0, 1)
|
134
|
+
s.send(h.to_wire + 'Hallo Welt!', 0, '127.0.0.1', port)
|
135
|
+
# ---
|
136
|
+
d, = r.recvfrom(5)
|
137
|
+
assert_equal('', d)
|
138
|
+
# ---
|
139
|
+
h, d = CoDTLS::Record.parse(s.recvfrom(20)[0])
|
140
|
+
check_header('Receive 1', h, :alert, 0, 2)
|
141
|
+
assert_equal("\x02\x0a", d) # fatal (2), unexpected_message (10)
|
142
|
+
|
143
|
+
h = CoDTLS::Record.new(:handshake, 0, 1)
|
144
|
+
s.send(h.to_wire + 'Hallo Welt!', 0, '127.0.0.1', port)
|
145
|
+
d, = r.recvfrom(5)
|
146
|
+
assert_equal('Hallo', d)
|
147
|
+
|
148
|
+
h = CoDTLS::Record.new(:handshake, 0, 2)
|
149
|
+
s.send(h.to_wire + 'Hallo Welt!', 0, '127.0.0.1', port)
|
150
|
+
d, = r.recvfrom(20)
|
151
|
+
assert_equal('Hallo Welt!', d)
|
152
|
+
|
153
|
+
h = CoDTLS::Record.new(:handshake, 0, 104)
|
154
|
+
s.send(h.to_wire + 'Hallo Welt!', 0, '127.0.0.1', port)
|
155
|
+
# ---
|
156
|
+
d, = r.recvfrom(5)
|
157
|
+
assert_equal('', d)
|
158
|
+
# ---
|
159
|
+
h, d = CoDTLS::Record.parse(s.recvfrom(20)[0])
|
160
|
+
check_header('Receive 2', h, :alert, 0, 3)
|
161
|
+
assert_equal("\x02\x32", d) # fatal (2), decode_error (50)
|
162
|
+
|
163
|
+
h = CoDTLS::Record.new(:handshake, 0, 103)
|
164
|
+
s.send(h.to_wire + 'Hallo Welt!', 0, '127.0.0.1', port)
|
165
|
+
d, = r.recvfrom(11)
|
166
|
+
assert_equal('Hallo Welt!', d)
|
167
|
+
|
168
|
+
s.close
|
169
|
+
r.close
|
170
|
+
end
|
171
|
+
=end
|
172
|
+
|
173
|
+
def check_header(fail_msg, header, type, epoch, seq_num = nil)
|
174
|
+
assert_equal(type, header.type, fail_msg)
|
175
|
+
assert_equal(epoch, header.epoch, fail_msg)
|
176
|
+
assert_equal(seq_num, header.seq_num, fail_msg) unless seq_num.nil?
|
177
|
+
end
|
178
|
+
end
|
@@ -0,0 +1,164 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'codtls/abstract_session'
|
3
|
+
require 'codtls/session'
|
4
|
+
|
5
|
+
# Testclass
|
6
|
+
class CoDTLSSessionTest < Minitest::Test
|
7
|
+
def setup
|
8
|
+
fail CoDTLS::SessionError 'testdatabase already exists' if File.exist?(
|
9
|
+
'testdatabase.sqlite')
|
10
|
+
SQLite3::Database.new('testdatabase.sqlite')
|
11
|
+
ActiveRecord::Base.establish_connection(
|
12
|
+
adapter: 'sqlite3',
|
13
|
+
database: 'testdatabase.sqlite')
|
14
|
+
ActiveRecord::Base.connection
|
15
|
+
ActiveRecord::Migration.verbose = false # debug messages
|
16
|
+
ActiveRecord::Migrator.migrate 'db/migrate'
|
17
|
+
CoDTLS::Session.clear_all # only needed here, it is not normal that the
|
18
|
+
# database gets changed while the program is
|
19
|
+
# still running
|
20
|
+
@session = CoDTLS::Session.new('127.0.0.1')
|
21
|
+
end
|
22
|
+
|
23
|
+
def teardown
|
24
|
+
@session.clear
|
25
|
+
ActiveRecord::Base.remove_connection
|
26
|
+
FileUtils.rm('testdatabase.sqlite') if File.exist?('testdatabase.sqlite')
|
27
|
+
end
|
28
|
+
|
29
|
+
# check values, set everything, check values, clear, check values,
|
30
|
+
# create new session, check values
|
31
|
+
def test_clear
|
32
|
+
assert_equal(nil, @session.id)
|
33
|
+
assert_equal(0, @session.epoch)
|
34
|
+
assert_equal(true, @session.check_seq(1))
|
35
|
+
assert_equal(1, @session.seq)
|
36
|
+
assert_equal(nil, @session.key_block)
|
37
|
+
assert_equal(false, @session.handshake?)
|
38
|
+
|
39
|
+
@session.id = 'ABCDEFGH'
|
40
|
+
@session.key_block = 'ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDABCD'
|
41
|
+
@session.increase_epoch
|
42
|
+
@session.seq = 5
|
43
|
+
@session.enable_handshake
|
44
|
+
|
45
|
+
assert_equal('ABCDEFGH', @session.id)
|
46
|
+
assert_equal(1, @session.epoch)
|
47
|
+
assert_equal(true, @session.check_seq(6))
|
48
|
+
assert_equal(1, @session.seq)
|
49
|
+
assert_equal('ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDABCD',
|
50
|
+
@session.key_block)
|
51
|
+
assert_equal(true, @session.handshake?)
|
52
|
+
|
53
|
+
@session.clear
|
54
|
+
entry = nil
|
55
|
+
ActiveRecord::Base.connection_pool.with_connection do
|
56
|
+
entry = CODTLSConnection.find_by_ip('127.0.0.1')
|
57
|
+
end
|
58
|
+
assert_equal(nil, entry)
|
59
|
+
assert_equal([], CoDTLS::Session.ip_list)
|
60
|
+
|
61
|
+
assert_equal(nil, @session.id)
|
62
|
+
assert_equal(0, @session.epoch)
|
63
|
+
assert_equal(true, @session.check_seq(1))
|
64
|
+
assert_equal(1, @session.seq)
|
65
|
+
assert_equal(nil, @session.key_block)
|
66
|
+
assert_equal(false, @session.handshake?)
|
67
|
+
end
|
68
|
+
|
69
|
+
# get_epoch and increase_epoch test
|
70
|
+
def test_epoch
|
71
|
+
assert_equal(nil, @session.id)
|
72
|
+
assert_equal(0, @session.epoch)
|
73
|
+
assert_equal(true, @session.check_seq(1))
|
74
|
+
assert_equal(1, @session.seq)
|
75
|
+
assert_equal(nil, @session.key_block)
|
76
|
+
assert_equal(false, @session.handshake?)
|
77
|
+
|
78
|
+
@session.seq
|
79
|
+
@session.seq
|
80
|
+
@session.seq = 50
|
81
|
+
assert_raises(CoDTLS::SessionError) { @session.increase_epoch }
|
82
|
+
|
83
|
+
@session.key_block = 'ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDABCD'
|
84
|
+
assert_equal(nil, @session.key_block)
|
85
|
+
|
86
|
+
@session.increase_epoch
|
87
|
+
assert_equal(1, @session.epoch)
|
88
|
+
assert_equal(true, @session.check_seq(1))
|
89
|
+
assert_equal(1, @session.seq)
|
90
|
+
assert_equal('ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDABCD',
|
91
|
+
@session.key_block)
|
92
|
+
end
|
93
|
+
|
94
|
+
# get_key_block and add_key_block tests, testing the overwriting off
|
95
|
+
# new keyblocks and switching keyblocks when the epoch is increased
|
96
|
+
def test_key_block
|
97
|
+
assert_equal(nil, @session.key_block)
|
98
|
+
exception = assert_raises(CoDTLS::SessionError) do
|
99
|
+
@session.key_block = 'this_key_block_is_too_small'
|
100
|
+
end
|
101
|
+
assert_equal('key blocks have to be 40 byte long', exception.message)
|
102
|
+
@session.key_block = 'key_block_with_fourty_bytes_number_00001'
|
103
|
+
assert_equal(nil, @session.key_block)
|
104
|
+
@session.increase_epoch
|
105
|
+
assert_equal('key_block_with_fourt' \
|
106
|
+
'y_bytes_number_00001', @session.key_block)
|
107
|
+
@session.key_block = 'key_block_with_fourty_bytes_number_00002'
|
108
|
+
@session.key_block = 'key_block_with_fourty_bytes_number_00003'
|
109
|
+
assert_equal('key_block_with_fourt' \
|
110
|
+
'y_bytes_number_00001', @session.key_block)
|
111
|
+
@session.increase_epoch
|
112
|
+
assert_equal('key_block_with_fourt' \
|
113
|
+
'y_bytes_number_00003', @session.key_block)
|
114
|
+
end
|
115
|
+
|
116
|
+
# enable_handshake and dissable_handshake tests.
|
117
|
+
def test_handshake
|
118
|
+
assert_equal(false, @session.handshake?)
|
119
|
+
@session.enable_handshake
|
120
|
+
assert_equal(true, @session.handshake?)
|
121
|
+
@session.enable_handshake
|
122
|
+
assert_equal(true, @session.handshake?)
|
123
|
+
@session.disable_handshake
|
124
|
+
assert_equal(false, @session.handshake?)
|
125
|
+
end
|
126
|
+
|
127
|
+
# get_seq and check_seq tests, testing the check_seq ranges and the
|
128
|
+
# incrementing of get_seq.
|
129
|
+
def test_seq
|
130
|
+
assert_equal(1, @session.seq)
|
131
|
+
assert_equal(2, @session.seq)
|
132
|
+
assert_equal(3, @session.seq)
|
133
|
+
|
134
|
+
# 1 is expected, so -9 ... 101 are valid values
|
135
|
+
assert_equal(false, @session.check_seq(-10))
|
136
|
+
assert_equal(false, @session.check_seq(102))
|
137
|
+
assert_equal(true, @session.check_seq(-9))
|
138
|
+
assert_equal(true, @session.check_seq(-1))
|
139
|
+
assert_equal(true, @session.check_seq(0))
|
140
|
+
assert_equal(true, @session.check_seq(1))
|
141
|
+
assert_equal(true, @session.check_seq(101))
|
142
|
+
|
143
|
+
@session.seq = 1
|
144
|
+
(2..100).each do |n|
|
145
|
+
assert_equal(true, @session.check_seq(n))
|
146
|
+
@session.seq = n
|
147
|
+
end
|
148
|
+
# 101 is expected, so max allowed value is 201
|
149
|
+
assert_equal(true, @session.check_seq(201))
|
150
|
+
assert_equal(false, @session.check_seq(202))
|
151
|
+
end
|
152
|
+
|
153
|
+
def test_multiple_sessions
|
154
|
+
new_session = CoDTLS::Session.new('127.0.0.1')
|
155
|
+
assert_equal(1, CoDTLS::Session.ip_list.size)
|
156
|
+
assert_equal(false, new_session.handshake?)
|
157
|
+
assert_equal(false, @session.handshake?)
|
158
|
+
new_session.enable_handshake
|
159
|
+
assert_equal(true, new_session.handshake?)
|
160
|
+
assert_equal(true, @session.handshake?)
|
161
|
+
new_session.clear
|
162
|
+
assert_equal(false, @session.handshake?)
|
163
|
+
end
|
164
|
+
end
|
metadata
ADDED
@@ -0,0 +1,303 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: codtls
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.alpha
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lars Schmertmann
|
8
|
+
- Jens Trillmann
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: coap
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: openssl-ccm
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.1'
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.1.1
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - "~>"
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '1.1'
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.1.1
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: openssl-cmac
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 2.0.0
|
58
|
+
type: :runtime
|
59
|
+
prerelease: false
|
60
|
+
version_requirements: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - "~>"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '2.0'
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 2.0.0
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: sqlite3
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.3'
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.3.9
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - "~>"
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '1.3'
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 1.3.9
|
88
|
+
- !ruby/object:Gem::Dependency
|
89
|
+
name: activerecord
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '4.0'
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 4.0.0
|
98
|
+
type: :runtime
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '4.0'
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: 4.0.0
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: rake
|
110
|
+
requirement: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - "~>"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '10.2'
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 10.2.2
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '10.2'
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 10.2.2
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: rdoc
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - "~>"
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '4.1'
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 4.1.1
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '4.1'
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 4.1.1
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: yard
|
150
|
+
requirement: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0.8'
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 0.8.7.3
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - "~>"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0.8'
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 0.8.7.3
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: rubocop
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - "~>"
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0.18'
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: 0.18.1
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - "~>"
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0.18'
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 0.18.1
|
188
|
+
- !ruby/object:Gem::Dependency
|
189
|
+
name: coveralls
|
190
|
+
requirement: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.7'
|
195
|
+
- - ">="
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: 0.7.0
|
198
|
+
type: :development
|
199
|
+
prerelease: false
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - "~>"
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0.7'
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: 0.7.0
|
208
|
+
description: DTLS with stateless header compression and CoAP based handshake.
|
209
|
+
email:
|
210
|
+
- SmallLars@t-online.de
|
211
|
+
- jtrillma@informatik.uni-bremen.de
|
212
|
+
executables: []
|
213
|
+
extensions: []
|
214
|
+
extra_rdoc_files:
|
215
|
+
- README.md
|
216
|
+
- LICENSE
|
217
|
+
files:
|
218
|
+
- ".rubocop.yml"
|
219
|
+
- ".yardopts"
|
220
|
+
- Gemfile
|
221
|
+
- LICENSE
|
222
|
+
- README.md
|
223
|
+
- Rakefile
|
224
|
+
- lib/codtls.rb
|
225
|
+
- lib/codtls/abstract_session.rb
|
226
|
+
- lib/codtls/alert.rb
|
227
|
+
- lib/codtls/decrypt.rb
|
228
|
+
- lib/codtls/ecc.rb
|
229
|
+
- lib/codtls/encrypt.rb
|
230
|
+
- lib/codtls/h_changecipherspec.rb
|
231
|
+
- lib/codtls/h_chello.rb
|
232
|
+
- lib/codtls/h_content.rb
|
233
|
+
- lib/codtls/h_finished.rb
|
234
|
+
- lib/codtls/h_keyexchange.rb
|
235
|
+
- lib/codtls/h_shello.rb
|
236
|
+
- lib/codtls/h_shellodone.rb
|
237
|
+
- lib/codtls/h_type.rb
|
238
|
+
- lib/codtls/h_verify.rb
|
239
|
+
- lib/codtls/handshake.rb
|
240
|
+
- lib/codtls/models/codtls_connection.rb
|
241
|
+
- lib/codtls/models/codtls_device.rb
|
242
|
+
- lib/codtls/prf.rb
|
243
|
+
- lib/codtls/pskdb.rb
|
244
|
+
- lib/codtls/ram_session.rb
|
245
|
+
- lib/codtls/rampskdb.rb
|
246
|
+
- lib/codtls/record.rb
|
247
|
+
- lib/codtls/session.rb
|
248
|
+
- lib/codtls/version.rb
|
249
|
+
- lib/generators/codtls/codtls_generator.rb
|
250
|
+
- lib/generators/codtls/templates/create_codtls_connections.rb
|
251
|
+
- lib/generators/codtls/templates/create_codtls_devices.rb
|
252
|
+
- test/test_codtls.rb
|
253
|
+
- test/test_ecc.rb
|
254
|
+
- test/test_h_chello.rb
|
255
|
+
- test/test_h_content.rb
|
256
|
+
- test/test_h_keyexchange.rb
|
257
|
+
- test/test_helper.rb
|
258
|
+
- test/test_pskdb.rb
|
259
|
+
- test/test_ram_session.rb
|
260
|
+
- test/test_rampskdb.rb
|
261
|
+
- test/test_record.rb
|
262
|
+
- test/test_send_recv.rb
|
263
|
+
- test/test_session.rb
|
264
|
+
homepage: https://github.com/SmallLars/codtls
|
265
|
+
licenses:
|
266
|
+
- MIT
|
267
|
+
metadata: {}
|
268
|
+
post_install_message: Thanks for installing!
|
269
|
+
rdoc_options:
|
270
|
+
- "-x"
|
271
|
+
- test/data_*
|
272
|
+
require_paths:
|
273
|
+
- lib
|
274
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 2.1.0
|
279
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
|
+
requirements:
|
281
|
+
- - ">"
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: 1.3.1
|
284
|
+
requirements: []
|
285
|
+
rubyforge_project:
|
286
|
+
rubygems_version: 2.2.2
|
287
|
+
signing_key:
|
288
|
+
specification_version: 4
|
289
|
+
summary: DTLS with CoAP based handshake.
|
290
|
+
test_files:
|
291
|
+
- test/test_codtls.rb
|
292
|
+
- test/test_ecc.rb
|
293
|
+
- test/test_h_content.rb
|
294
|
+
- test/test_h_keyexchange.rb
|
295
|
+
- test/test_send_recv.rb
|
296
|
+
- test/test_pskdb.rb
|
297
|
+
- test/test_ram_session.rb
|
298
|
+
- test/test_session.rb
|
299
|
+
- test/test_helper.rb
|
300
|
+
- test/test_h_chello.rb
|
301
|
+
- test/test_rampskdb.rb
|
302
|
+
- test/test_record.rb
|
303
|
+
has_rdoc:
|