Minor fixes and "hopefully" compatible to Ubuntu 16.04
* dtls/__init__.py: Removed wrapper import * dtls/openssl.py: Fixed line endings to LF * dtls/patch.py: Removed PROTOCOL_SSLv3 import and fixed line endings to LF * dtls/sslconnection.py: Fixed line endings to LF * dtls/test/certs/*_ec.pem: Fixed line endings to LF * dtls/test/echo_seq.py: Fixed line endings to LF * dtls/test/simple_client.py: Fixed line endings to LF * dtls/test/unit.py: Fixed line endings to LF * dtls/test/unit_wrapper.py: Corrected wrapper import and fixed line endings to LF * dtls/util.py: Fixed line endings to LF * dtls/wrapper.py: Corrected function naming to wrap_client() and wrap_server(); Fixed line endings to LF * dtls/x509.py: Fixed line endings to LFincoming
parent
dade3b8213
commit
083554e9e0
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
||||||
|
2017-03-28 Björn Freise <mcfreis@gmx.net>
|
||||||
|
|
||||||
|
Minor fixes and "hopefully" compatible to Ubuntu 16.04
|
||||||
|
|
||||||
|
* dtls/__init__.py: Removed wrapper import
|
||||||
|
* dtls/openssl.py: Fixed line endings to LF
|
||||||
|
* dtls/patch.py: Removed PROTOCOL_SSLv3 import and fixed line endings to LF
|
||||||
|
* dtls/sslconnection.py: Fixed line endings to LF
|
||||||
|
* dtls/test/certs/*_ec.pem: Fixed line endings to LF
|
||||||
|
* dtls/test/echo_seq.py: Fixed line endings to LF
|
||||||
|
* dtls/test/simple_client.py: Fixed line endings to LF
|
||||||
|
* dtls/test/unit.py: Fixed line endings to LF
|
||||||
|
* dtls/test/unit_wrapper.py: Corrected wrapper import and fixed line endings to LF
|
||||||
|
* dtls/util.py: Fixed line endings to LF
|
||||||
|
* dtls/wrapper.py: Corrected function naming to wrap_client() and wrap_server(); Fixed line endings to LF
|
||||||
|
* dtls/x509.py: Fixed line endings to LF
|
||||||
|
|
||||||
2017-03-23 Björn Freise <mcfreis@gmx.net>
|
2017-03-23 Björn Freise <mcfreis@gmx.net>
|
||||||
|
|
||||||
Patched ssl-Module with SSL_BUILD_*- and ERR_*- constants and added aliases for wrap_server() and wrap_client()
|
Patched ssl-Module with SSL_BUILD_*- and ERR_*- constants and added aliases for wrap_server() and wrap_client()
|
||||||
|
|
|
@ -61,4 +61,3 @@ _prep_bins() # prepare before module imports
|
||||||
from patch import do_patch
|
from patch import do_patch
|
||||||
from sslconnection import SSLContext, SSL, SSLConnection
|
from sslconnection import SSLContext, SSL, SSLConnection
|
||||||
from demux import force_routing_demux, reset_default_demux
|
from demux import force_routing_demux, reset_default_demux
|
||||||
from wrapper import DtlsSocket, client as wrap_client, server as wrap_server
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ has the following effects:
|
||||||
|
|
||||||
from socket import socket, getaddrinfo, _delegate_methods, error as socket_error
|
from socket import socket, getaddrinfo, _delegate_methods, error as socket_error
|
||||||
from socket import AF_INET, SOCK_STREAM, SOCK_DGRAM
|
from socket import AF_INET, SOCK_STREAM, SOCK_DGRAM
|
||||||
from ssl import PROTOCOL_SSLv3, PROTOCOL_SSLv23, CERT_NONE
|
from ssl import PROTOCOL_SSLv23, CERT_NONE
|
||||||
from types import MethodType
|
from types import MethodType
|
||||||
from weakref import proxy
|
from weakref import proxy
|
||||||
import errno
|
import errno
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Test the support for DTLS through the SSL module. Adapted from the Python
|
# Test the support for DTLS through the SSL module. Adapted from the Python
|
||||||
# standard library's test_ssl.py regression test module by Björn Freise.
|
# standard library's test_ssl.py regression test module by Björn Freise.
|
||||||
|
@ -15,7 +15,7 @@ from logging import basicConfig, DEBUG, getLogger
|
||||||
_logger = getLogger(__name__)
|
_logger = getLogger(__name__)
|
||||||
|
|
||||||
import ssl
|
import ssl
|
||||||
from dtls import DtlsSocket
|
from dtls.wrapper import DtlsSocket
|
||||||
|
|
||||||
|
|
||||||
HOST = "localhost"
|
HOST = "localhost"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# DTLS Socket: A wrapper for a server and client using a DTLS connection.
|
# DTLS Socket: A wrapper for a server and client using a DTLS connection.
|
||||||
|
|
||||||
|
@ -43,10 +43,10 @@ import err as err_codes
|
||||||
_logger = getLogger(__name__)
|
_logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def client(sock, keyfile=None, certfile=None,
|
def wrap_client(sock, keyfile=None, certfile=None,
|
||||||
cert_reqs=ssl.CERT_NONE, ssl_version=ssl.PROTOCOL_DTLSv1_2, ca_certs=None,
|
cert_reqs=ssl.CERT_NONE, ssl_version=ssl.PROTOCOL_DTLSv1_2, ca_certs=None,
|
||||||
do_handshake_on_connect=True, suppress_ragged_eofs=True,
|
do_handshake_on_connect=True, suppress_ragged_eofs=True,
|
||||||
ciphers=None, curves=None, sigalgs=None, user_mtu=None):
|
ciphers=None, curves=None, sigalgs=None, user_mtu=None):
|
||||||
|
|
||||||
return DtlsSocket(sock=sock, keyfile=keyfile, certfile=certfile, server_side=False,
|
return DtlsSocket(sock=sock, keyfile=keyfile, certfile=certfile, server_side=False,
|
||||||
cert_reqs=cert_reqs, ssl_version=ssl_version, ca_certs=ca_certs,
|
cert_reqs=cert_reqs, ssl_version=ssl_version, ca_certs=ca_certs,
|
||||||
|
@ -55,11 +55,11 @@ def client(sock, keyfile=None, certfile=None,
|
||||||
server_key_exchange_curve=None, server_cert_options=ssl.SSL_BUILD_CHAIN_FLAG_NONE)
|
server_key_exchange_curve=None, server_cert_options=ssl.SSL_BUILD_CHAIN_FLAG_NONE)
|
||||||
|
|
||||||
|
|
||||||
def server(sock, keyfile=None, certfile=None,
|
def wrap_server(sock, keyfile=None, certfile=None,
|
||||||
cert_reqs=ssl.CERT_NONE, ssl_version=ssl.PROTOCOL_DTLS, ca_certs=None,
|
cert_reqs=ssl.CERT_NONE, ssl_version=ssl.PROTOCOL_DTLS, ca_certs=None,
|
||||||
do_handshake_on_connect=False, suppress_ragged_eofs=True,
|
do_handshake_on_connect=False, suppress_ragged_eofs=True,
|
||||||
ciphers=None, curves=None, sigalgs=None, user_mtu=None,
|
ciphers=None, curves=None, sigalgs=None, user_mtu=None,
|
||||||
server_key_exchange_curve=None, server_cert_options=ssl.SSL_BUILD_CHAIN_FLAG_NONE):
|
server_key_exchange_curve=None, server_cert_options=ssl.SSL_BUILD_CHAIN_FLAG_NONE):
|
||||||
|
|
||||||
return DtlsSocket(sock=sock, keyfile=keyfile, certfile=certfile, server_side=True,
|
return DtlsSocket(sock=sock, keyfile=keyfile, certfile=certfile, server_side=True,
|
||||||
cert_reqs=cert_reqs, ssl_version=ssl_version, ca_certs=ca_certs,
|
cert_reqs=cert_reqs, ssl_version=ssl_version, ca_certs=ca_certs,
|
||||||
|
|
Loading…
Reference in New Issue