--- a/connectors/PYRO/PSK_Adapter.py Wed Mar 13 15:43:45 2019 +0300
+++ b/connectors/PYRO/PSK_Adapter.py Wed Mar 13 15:54:17 2019 +0300
@@ -1,3 +1,33 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2019: Edouard TISSERANT +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +The TLS-PSK adapter that handles SSL connections instead of regular sockets, +but using Pre Shared Keys instead of Certificates from __future__ import absolute_import
from __future__ import print_function
@@ -12,13 +42,13 @@
from Pyro.util import Log
-# The TLS-PSK adapter that handles SSL connections instead of regular sockets,
-# but using Pre Shared Keys instead of Certificates
class PYROPSKAdapter(PYROAdapter):
- # This is essentialy the same as in Pyro/protocol.py
- # only raw_sock wrapping into sock through sslpsk.wrap_socket was added
- # Pyro unfortunately doesn't allow cleaner customization
+ This is essentialy the same as in Pyro/protocol.py + only raw_sock wrapping into sock through sslpsk.wrap_socket was added + Pyro unfortunately doesn't allow cleaner customization def bindToURI(self, URI):
with self.lock: # only 1 thread at a time can bind the URI