mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-08 19:41:00 +00:00
fippo redo: make tls available on default psyc port (in addition to psycs port)
This commit is contained in:
parent
6fcc4c7225
commit
6072304ff1
@ -70,19 +70,22 @@ object connect(int uid, int port, string service) {
|
||||
// we dont want the telnet machine most of the time
|
||||
// but disabling and re-enabling it for telnet doesn't work
|
||||
switch(port || query_mud_port()) {
|
||||
|
||||
#if HAS_PORT(PSYCS_PORT, PSYC_PATH)
|
||||
case PSYCS_PORT: // inofficial & temporary
|
||||
# if __EFUN_DEFINED__(tls_want_peer_certificate)
|
||||
tls_want_peer_certificate(ME);
|
||||
# endif
|
||||
t = tls_init_connection(this_object());
|
||||
if (t < 0 && t != ERR_TLS_NOT_DETECTED) PP(( "TLS on %O: %O\n",
|
||||
query_mud_port(), tls_error(t) ));
|
||||
#endif // fall thru
|
||||
#if HAS_PORT(PSYC_PORT, PSYC_PATH)
|
||||
case PSYC_PORT:
|
||||
#endif
|
||||
#if HAS_PORT(PSYCS_PORT, PSYC_PATH)
|
||||
case PSYCS_PORT: // inofficial & temporary
|
||||
// make TLS available even on the default psyc port using the autodetection feature
|
||||
if (tls_available()) {
|
||||
# if __EFUN_DEFINED__(tls_want_peer_certificate)
|
||||
tls_want_peer_certificate(ME);
|
||||
# endif
|
||||
t = tls_init_connection(this_object());
|
||||
if (t < 0 && t != ERR_TLS_NOT_DETECTED) {
|
||||
PP(( "TLS on %O: %O\n", query_mud_port(), tls_error(t) ));
|
||||
}
|
||||
}
|
||||
#endif // fall thru
|
||||
#if HAS_PORT(PSYC_PORT, PSYC_PATH) || HAS_PORT(PSYCS_PORT, PSYC_PATH)
|
||||
# ifdef DRIVER_HAS_CALL_BY_REFERENCE
|
||||
arg = ME;
|
||||
|
Loading…
Reference in New Issue
Block a user