←︎ scroll :: b9197ba


1
commit b9197bae7a9027c90d458fdaa94ddd2f09ed56b3
2
Author: acidvegas <acid.vegas@acid.vegas>
3
Date:   Sun Mar 22 03:49:45 2020 -0400
4
5
    fixed a few ssl bugs
6
---
7
 scroll/core/config.py | 16 ++++++++--------
8
 scroll/core/irc.py    |  2 ++
9
 2 files changed, 10 insertions(+), 8 deletions(-)
10
11
diff --git a/scroll/core/config.py b/scroll/core/config.py
12
index 93f274e..8b86d3e 100644
13
--- a/scroll/core/config.py
14
+++ b/scroll/core/config.py
15
@@ -3,16 +3,16 @@
16
 # config.py
17
 
18
 class connection:
19
-	server     = 'irc.server.com'
20
-	port       = 6667
21
-	ipv6       = False
22
-	ssl        = False
23
-	vhost      = None
24
-	channel    = '#chats'
25
-	key        = None
26
+	server  = 'irc.server.com'
27
+	port    = 6667
28
+	ipv6    = False
29
+	ssl     = False
30
+	vhost   = None
31
+	channel = '#chats'
32
+	key     = None
33
 
34
 class cert:
35
-	key      = None
36
+	file     = None
37
 	password = None
38
 
39
 class ident:
40
diff --git a/scroll/core/irc.py b/scroll/core/irc.py
41
index 2769b2d..c69e602 100644
42
--- a/scroll/core/irc.py
43
+++ b/scroll/core/irc.py
44
@@ -53,6 +53,8 @@ class IRC(object):
45
 				self.sock.bind((config.connection.vhost, 0))
46
 			if config.connection.ssl:
47
 				ctx = ssl.create_default_context()
48
+				ctx.check_hostname = False
49
+				ctx.verify_mode = ssl.CERT_NONE
50
 				if config.cert.file:
51
 					ctx.load_cert_chain(config.cert.file, password=config.cert.password)
52
 				self.sock = ctx.wrap_socket(self.sock)