Skip to content

Commit 80e6494

Browse files
committed
Security warning for API-SSL connect without SSL certificate (anonymous Diffie-Hellman)
1 parent d37eda6 commit 80e6494

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ The default configuration file comes with a sample configuration, making it easy
7373
7474
use_ssl = False # enables connection via API-SSL servis
7575
no_ssl_certificate = False # enables API_SSL connect without router SSL certificate
76-
ssl_certificate_verify = False # turns SSL certificate verification on / off
76+
ssl_certificate_verify = False # turns SSL certificate verification on / off
77+
ssl_check_hostname = True # check if the hostname matches the peer cert’s hostname
7778
ssl_ca_file = "" # path to the certificate authority file to validate against, leave empty to use system store
7879
plaintext_login = True # for legacy RouterOS versions below 6.43 use False
7980

deploy/kubernetes/secret.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ stringData:
7171
7272
use_ssl = False # enables connection via API-SSL servis
7373
no_ssl_certificate = False # enables API_SSL connect without router SSL certificate
74-
ssl_certificate_verify = False # turns SSL certificate verification on / off
74+
ssl_certificate_verify = False # turns SSL certificate verification on / off
75+
ssl_check_hostname = True # check if the hostname matches the peer cert’s hostname
7576
ssl_ca_file = "" # path to the certificate authority file to validate against, leave empty to use system store
7677
plaintext_login = True # for legacy RouterOS versions below 6.43 use False
7778

mktxp/flow/router_connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def connect(self):
111111
return
112112
try:
113113
print(f'Connecting to router {self.router_name}@{self.config_entry.hostname}')
114+
if self.config_entry.use_ssl and self.config_entry.no_ssl_certificate:
115+
print(f'Warning: API_SSL connect without router SSL certificate is insecure and should not be used in production environments!')
114116
self.connection.plaintext_login = self.config_entry.plaintext_login
115117
self.api = self.connection.get_api()
116118
self._set_connect_state(success = True, connect_time = connect_time)

0 commit comments

Comments
 (0)