From 841bc9ea2f79b770d699d06182e4ae30f3402e189051ae7b97c7b1f4480b6814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 6 Mar 2019 12:55:59 +0000 Subject: [PATCH 1/3] =?UTF-8?q?-=20Update=20to=201.16.0:=20=20=20*=20Added?= =?UTF-8?q?=20support=20for=20Ed448=20host/client=20keys=20and=20certifica?= =?UTF-8?q?tes=20and=20rewrote=20Ed25519=20support=20to=20use=20the=20PyCA?= =?UTF-8?q?=20implementation,=20reducing=20the=20dependency=20on=20libnacl?= =?UTF-8?q?=20and=20libsodium=20to=20only=20be=20needed=20to=20support=20t?= =?UTF-8?q?he=20chacha20-poly1305=20cipher.=20=20=20*=20Added=20support=20?= =?UTF-8?q?for=20PKCS#8=20format=20Ed25519=20and=20Ed448=20private=20and?= =?UTF-8?q?=20public=20keys=20(in=20addition=20to=20the=20OpenSSH=20format?= =?UTF-8?q?=20previously=20supported).=20=20=20*=20Added=20support=20for?= =?UTF-8?q?=20multiple=20delimiters=20in=20SSHReader=E2=80=99s=20readuntil?= =?UTF-8?q?()=20function,=20causing=20it=20to=20return=20data=20as=20soon?= =?UTF-8?q?=20as=20any=20of=20the=20specified=20delimiters=20are=20matched?= =?UTF-8?q?.=20=20=20*=20Added=20the=20ability=20to=20register=20custom=20?= =?UTF-8?q?key=20handlers=20in=20the=20line=20editor=20which=20can=20modif?= =?UTF-8?q?y=20the=20input=20line,=20extending=20the=20built-in=20editing?= =?UTF-8?q?=20functionality.=20=20=20*=20Added=20SSHSubprocessProtocol=20a?= =?UTF-8?q?nd=20SSHSubprocessTransport=20classes=20to=20provide=20compatib?= =?UTF-8?q?ility=20with=20asyncio.SubprocessProtocol=20and=20asyncio.Subpr?= =?UTF-8?q?ocessTransport.=20Code=20which=20is=20designed=20to=20call=20Ba?= =?UTF-8?q?seEventLoop.subprocess=5Fshell()=20or=20BaseEventLoop.subproces?= =?UTF-8?q?s=5Fexec()=20can=20be=20easily=20adapted=20to=20work=20against?= =?UTF-8?q?=20a=20remote=20process=20by=20calling=20SSHClientConnection.cr?= =?UTF-8?q?eate=5Fsubprocess().=20=20=20*=20Added=20support=20for=20sendin?= =?UTF-8?q?g=20keepalive=20messages=20when=20the=20SSH=20connection=20is?= =?UTF-8?q?=20idle,=20with=20an=20option=20to=20automatically=20disconnect?= =?UTF-8?q?=20the=20connection=20if=20the=20remote=20system=20doesn?= =?UTF-8?q?=E2=80=99t=20respond=20to=20these=20keepalives.=20=20=20*=20Cha?= =?UTF-8?q?nged=20AsyncSSH=20to=20ignore=20errors=20when=20loading=20unsup?= =?UTF-8?q?ported=20key=20types=20from=20the=20default=20file=20locations.?= =?UTF-8?q?=20=20=20*=20Changed=20the=20reuse=5Fport=20option=20to=20only?= =?UTF-8?q?=20be=20available=20on=20Python=20releases=20which=20support=20?= =?UTF-8?q?it=20(3.4.4=20and=20later).=20=20=20*=20Fixed=20an=20issue=20wh?= =?UTF-8?q?ere=20MSG=5FIGNORE=20packets=20could=20sometimes=20be=20sent=20?= =?UTF-8?q?between=20MSG=5FNEWKEYS=20and=20MSG=5FEXT=5FINFO,=20which=20cau?= =?UTF-8?q?sed=20some=20SSH=20implementations=20to=20fail=20to=20properly?= =?UTF-8?q?=20parse=20the=20MSG=5FEXT=5FINFO.=20=20=20*=20Fixed=20a=20coup?= =?UTF-8?q?le=20of=20errors=20in=20the=20handling=20of=20disconnects=20occ?= =?UTF-8?q?urring=20prior=20to=20authentication=20completing.=20=20=20*=20?= =?UTF-8?q?Renamed=20=E2=80=9Csession=5Fencoding=E2=80=9D=20and=20?= =?UTF-8?q?=E2=80=9Csession=5Ferrors=E2=80=9D=20arguments=20in=20asyncssh.?= =?UTF-8?q?create=5Fserver()=20to=20=E2=80=9Cencoding=E2=80=9D=20and=20?= =?UTF-8?q?=E2=80=9Cerrors=E2=80=9D,=20to=20match=20the=20names=20used=20f?= =?UTF-8?q?or=20these=20arguments=20in=20other=20AsyncSSH=20APIs.=20The=20?= =?UTF-8?q?old=20names=20are=20still=20supported=20for=20now,=20but=20they?= =?UTF-8?q?=20are=20marked=20as=20deprecated=20and=20will=20be=20removed?= =?UTF-8?q?=20in=20a=20future=20release.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asyncssh?expand=0&rev=7 --- asyncssh-1.15.1.tar.gz | 3 --- asyncssh-1.16.0.tar.gz | 3 +++ python-asyncssh.changes | 16 ++++++++++++++++ python-asyncssh.spec | 25 ++++++++++++------------- 4 files changed, 31 insertions(+), 16 deletions(-) delete mode 100644 asyncssh-1.15.1.tar.gz create mode 100644 asyncssh-1.16.0.tar.gz diff --git a/asyncssh-1.15.1.tar.gz b/asyncssh-1.15.1.tar.gz deleted file mode 100644 index 71bb847..0000000 --- a/asyncssh-1.15.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2065a8b3af0c514c8de264e7b01f08df5213b707bacb7e7c080bd46c3e3bc35 -size 310892 diff --git a/asyncssh-1.16.0.tar.gz b/asyncssh-1.16.0.tar.gz new file mode 100644 index 0000000..541f917 --- /dev/null +++ b/asyncssh-1.16.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f3b4da21e415f20dc72aa9189f865833588301e8531641a6a22bf6a336bb63a +size 321999 diff --git a/python-asyncssh.changes b/python-asyncssh.changes index f6840ad..928d524 100644 --- a/python-asyncssh.changes +++ b/python-asyncssh.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Wed Mar 6 12:36:52 UTC 2019 - Tomáš Chvátal + +- Update to 1.16.0: + * Added support for Ed448 host/client keys and certificates and rewrote Ed25519 support to use the PyCA implementation, reducing the dependency on libnacl and libsodium to only be needed to support the chacha20-poly1305 cipher. + * Added support for PKCS#8 format Ed25519 and Ed448 private and public keys (in addition to the OpenSSH format previously supported). + * Added support for multiple delimiters in SSHReader’s readuntil() function, causing it to return data as soon as any of the specified delimiters are matched. + * Added the ability to register custom key handlers in the line editor which can modify the input line, extending the built-in editing functionality. + * Added SSHSubprocessProtocol and SSHSubprocessTransport classes to provide compatibility with asyncio.SubprocessProtocol and asyncio.SubprocessTransport. Code which is designed to call BaseEventLoop.subprocess_shell() or BaseEventLoop.subprocess_exec() can be easily adapted to work against a remote process by calling SSHClientConnection.create_subprocess(). + * Added support for sending keepalive messages when the SSH connection is idle, with an option to automatically disconnect the connection if the remote system doesn’t respond to these keepalives. + * Changed AsyncSSH to ignore errors when loading unsupported key types from the default file locations. + * Changed the reuse_port option to only be available on Python releases which support it (3.4.4 and later). + * Fixed an issue where MSG_IGNORE packets could sometimes be sent between MSG_NEWKEYS and MSG_EXT_INFO, which caused some SSH implementations to fail to properly parse the MSG_EXT_INFO. + * Fixed a couple of errors in the handling of disconnects occurring prior to authentication completing. + * Renamed “session_encoding” and “session_errors” arguments in asyncssh.create_server() to “encoding” and “errors”, to match the names used for these arguments in other AsyncSSH APIs. The old names are still supported for now, but they are marked as deprecated and will be removed in a future release. + ------------------------------------------------------------------- Tue Feb 5 14:34:42 UTC 2019 - Jan Engelhardt diff --git a/python-asyncssh.spec b/python-asyncssh.spec index edb2fbc..b06e7e4 100644 --- a/python-asyncssh.spec +++ b/python-asyncssh.spec @@ -19,30 +19,28 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-asyncssh -Version: 1.15.1 +Version: 1.16.0 Release: 0 Summary: Asynchronous SSHv2 client and server library License: EPL-2.0 OR GPL-2.0-or-later Group: Development/Languages/Python Url: http://asyncssh.timeheart.net Source: https://files.pythonhosted.org/packages/source/a/asyncssh/asyncssh-%{version}.tar.gz -BuildRequires: %{python_module bcrypt} -BuildRequires: %{python_module cryptography >= 1.5} -BuildRequires: %{python_module gssapi} -BuildRequires: %{python_module libnacl} -BuildRequires: %{python_module pyOpenSSL} +BuildRequires: %{python_module bcrypt >= 3.1.3} +BuildRequires: %{python_module cryptography >= 2.6.1} +BuildRequires: %{python_module gssapi >= 1.2.0} +BuildRequires: %{python_module libnacl >= 1.4.2} +BuildRequires: %{python_module pyOpenSSL >= 17.0.0} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module uvloop} BuildRequires: fdupes BuildRequires: openssh BuildRequires: openssl BuildRequires: python-rpm-macros -Requires: python-bcrypt -Requires: python-cryptography >= 1.5 -Requires: python-gssapi -Requires: python-libnacl -Requires: python-pyOpenSSL -Recommends: python-uvloop +Requires: python-bcrypt >= 3.1.3 +Requires: python-cryptography >= 2.6.1 +Requires: python-gssapi >= 1.2.0 +Requires: python-libnacl >= 1.4.2 +Requires: python-pyOpenSSL >= 17.0.0 BuildArch: noarch %python_subpackages @@ -64,6 +62,7 @@ asyncio framework. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +%python_exec -m unittest discover -s tests_py35 %python_exec setup.py test %files %{python_files} From 7007e2c24ceae8af02056600c7f9b68421233b5aef123565d457bf6a06b3f172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 6 Mar 2019 14:56:41 +0000 Subject: [PATCH 2/3] Accepting request 682200 from home:mimi_vx:branches:devel:languages:python - remove python-nacl from builddeps - add 194.patch to fix testsuite OBS-URL: https://build.opensuse.org/request/show/682200 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asyncssh?expand=0&rev=8 --- 194.patch | 61 +++++++++++++++++++++++++++++++++++++++++ python-asyncssh.changes | 7 +++++ python-asyncssh.spec | 4 ++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 194.patch diff --git a/194.patch b/194.patch new file mode 100644 index 0000000..0c5828a --- /dev/null +++ b/194.patch @@ -0,0 +1,61 @@ +From 110a7c22926c067e65cfaa05c19aac12b637eb79 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= +Date: Wed, 6 Mar 2019 15:25:28 +0100 +Subject: [PATCH] Test ed25519 and curve448 only if is available + +--- + tests/test_agent.py | 3 ++- + tests/test_kex.py | 5 +++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/tests/test_agent.py b/tests/test_agent.py +index 6dd30b1..08237c1 100644 +--- a/tests/test_agent.py ++++ b/tests/test_agent.py +@@ -29,6 +29,7 @@ + + import asyncssh + ++from asyncssh.crypto.ed import ed25519_available + from asyncssh.agent import SSH_AGENT_SUCCESS, SSH_AGENT_FAILURE + from asyncssh.packet import Byte, String + +@@ -175,7 +176,7 @@ def test_sign(self, agent): + + algs = ['ssh-dss', 'ssh-rsa', 'ecdsa-sha2-nistp256'] + +- if libnacl_available: # pragma: no branch ++ if ed25519_available: # pragma: no branch + algs.append('ssh-ed25519') + + for alg_name in algs: +diff --git a/tests/test_kex.py b/tests/test_kex.py +index 1512e40..86a75c6 100644 +--- a/tests/test_kex.py ++++ b/tests/test_kex.py +@@ -27,6 +27,7 @@ + + import asyncssh + ++ + from asyncssh.kex_dh import MSG_KEXDH_INIT, MSG_KEXDH_REPLY + from asyncssh.kex_dh import MSG_KEX_DH_GEX_REQUEST, MSG_KEX_DH_GEX_GROUP + from asyncssh.kex_dh import MSG_KEX_DH_GEX_INIT, MSG_KEX_DH_GEX_REPLY, _KexDHGex +@@ -39,6 +40,7 @@ + from asyncssh.kex import register_kex_alg, get_kex_algs, get_kex + from asyncssh.packet import SSHPacket, Boolean, Byte, MPInt, String + from asyncssh.public_key import SSHLocalKeyPair, decode_ssh_public_key ++from asyncssh.crypto.ed import curve448_available + + from .util import asynctest, gss_available, patch_gss + from .util import AsyncTestCase, ConnectionStub +@@ -523,6 +525,9 @@ def test_curve448dh_errors(self): + except ImportError: # pragma: no cover + return + ++ if not curve448_available: # pragma: no cover ++ return ++ + client_conn, server_conn = \ + _KexClientStub.make_pair(b'curve448-sha512') + diff --git a/python-asyncssh.changes b/python-asyncssh.changes index 928d524..2f08737 100644 --- a/python-asyncssh.changes +++ b/python-asyncssh.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 6 14:55:29 UTC 2019 - Ondřej Súkup + +- remove python-nacl from builddeps +- add 194.patch to fix testsuite + + ------------------------------------------------------------------- Wed Mar 6 12:36:52 UTC 2019 - Tomáš Chvátal diff --git a/python-asyncssh.spec b/python-asyncssh.spec index b06e7e4..831f6a7 100644 --- a/python-asyncssh.spec +++ b/python-asyncssh.spec @@ -26,10 +26,10 @@ License: EPL-2.0 OR GPL-2.0-or-later Group: Development/Languages/Python Url: http://asyncssh.timeheart.net Source: https://files.pythonhosted.org/packages/source/a/asyncssh/asyncssh-%{version}.tar.gz +Patch0: 194.patch BuildRequires: %{python_module bcrypt >= 3.1.3} BuildRequires: %{python_module cryptography >= 2.6.1} BuildRequires: %{python_module gssapi >= 1.2.0} -BuildRequires: %{python_module libnacl >= 1.4.2} BuildRequires: %{python_module pyOpenSSL >= 17.0.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -53,6 +53,7 @@ asyncio framework. %prep %setup -q -n asyncssh-%{version} +%autopatch -p1 %build %python_build @@ -62,6 +63,7 @@ asyncio framework. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +ssh-agent %python_exec -m unittest discover -s tests_py35 %python_exec setup.py test From a3b6976db7b23e8500923d6b57f5816cc09dd300e1dc315bd3855c1b88837150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 6 Mar 2019 14:58:37 +0000 Subject: [PATCH 3/3] fix OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asyncssh?expand=0&rev=9 --- python-asyncssh.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-asyncssh.spec b/python-asyncssh.spec index 831f6a7..64f0285 100644 --- a/python-asyncssh.spec +++ b/python-asyncssh.spec @@ -63,7 +63,6 @@ asyncio framework. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -ssh-agent %python_exec -m unittest discover -s tests_py35 %python_exec setup.py test