equal
deleted
inserted
replaced
23 |
23 |
24 local dialback_secret = sha256_hash(module:get_option_string("dialback_secret", uuid_gen()), true); |
24 local dialback_secret = sha256_hash(module:get_option_string("dialback_secret", uuid_gen()), true); |
25 local dwd = module:get_option_boolean("dialback_without_dialback", false); |
25 local dwd = module:get_option_boolean("dialback_without_dialback", false); |
26 |
26 |
27 --- Helper to check that a session peer's certificate is valid |
27 --- Helper to check that a session peer's certificate is valid |
28 function check_cert_status(session) |
28 function check_cert_status(session, host) |
29 local host = session.direction == "outgoing" and session.to_host or session.from_host |
|
30 local conn = session.conn:socket() |
29 local conn = session.conn:socket() |
31 local cert |
30 local cert |
32 if conn.getpeercertificate then |
31 if conn.getpeercertificate then |
33 cert = conn:getpeercertificate() |
32 cert = conn:getpeercertificate() |
34 end |
33 end |