OLD | NEW |
1 """Classes representing TLS messages.""" | 1 """Classes representing TLS messages.""" |
2 | 2 |
3 from utils.compat import * | 3 from utils.compat import * |
4 from utils.cryptomath import * | 4 from utils.cryptomath import * |
5 from errors import * | 5 from errors import * |
6 from utils.codec import * | 6 from utils.codec import * |
7 from constants import * | 7 from constants import * |
8 from X509 import X509 | 8 from x509 import X509 |
9 from X509CertChain import X509CertChain | 9 from x509certchain import X509CertChain |
10 | 10 |
11 # The sha module is deprecated in Python 2.6 | 11 # The sha module is deprecated in Python 2.6 |
12 try: | 12 try: |
13 import sha | 13 import sha |
14 except ImportError: | 14 except ImportError: |
15 from hashlib import sha1 as sha | 15 from hashlib import sha1 as sha |
16 | 16 |
17 # The md5 module is deprecated in Python 2.6 | 17 # The md5 module is deprecated in Python 2.6 |
18 try: | 18 try: |
19 import md5 | 19 import md5 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 def create(self, bytes): | 674 def create(self, bytes): |
675 self.bytes = bytes | 675 self.bytes = bytes |
676 return self | 676 return self |
677 | 677 |
678 def parse(self, p): | 678 def parse(self, p): |
679 self.bytes = p.bytes | 679 self.bytes = p.bytes |
680 return self | 680 return self |
681 | 681 |
682 def write(self): | 682 def write(self): |
683 return self.bytes | 683 return self.bytes |
OLD | NEW |