Skip to content

Commit

Permalink
add probes with tack extension from draft-perrin-tls-tack-02
Browse files Browse the repository at this point in the history
  • Loading branch information
tomato42 committed Aug 27, 2016
1 parent d3b1295 commit 25b86fb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
5 changes: 4 additions & 1 deletion prober.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,10 @@
SessionTicketOverflow12PFS(),
NPNNotNull(),
NPNNotNull12(),
NPNNotNull12PFS()
NPNNotNull12PFS(),
TACKNotNull(),
TACKNotNull12(),
TACKNotNull12PFS()
]

def probe(ipaddress, port, starttls, specified_probe):
Expand Down
25 changes: 25 additions & 0 deletions probes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2765,3 +2765,28 @@ class NPNNotNull12(NPNNotNull, NormalHandshake12):
class NPNNotNull12PFS(NPNNotNull, NormalHandshake12PFS):
'''Send non empty NPN extension in PFS TLSv1.2 hello'''
pass


class TACKNotNull(NormalHandshake):
'''Send not empty TACK extension in hello'''

def make_tack_hello(self, value):
tack_ext = Extension.create(
extension_type=62208,
data=value)
return self.make_hello([tack_ext])

def test(self, sock):
logging.debug('Sending Client Hello...')
# normal extension must be empty
sock.write(self.make_tack_hello(b'\x08'))


class TACKNotNull12(TACKNotNull, NormalHandshake12):
'''Send not empty TACK extension in TLSv1.2 hello'''
pass


class TACKNotNull12PFS(TACKNotNull, NormalHandshake12PFS):
'''Send not empty TACK extension in PFS TLSv1.2 hello'''
pass

0 comments on commit 25b86fb

Please sign in to comment.