Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Problem after upgrading pyasn1 from 0.3.6 => 0.4.2 and pyasn1-modules from 0.1.5 => 0.2.1 #477

Open
iegubkin opened this issue Nov 29, 2017 · 3 comments

Comments

@iegubkin
Copy link

sleekxmpp 1.3.2
An upgrade of pyasn1 from 0.3.6 => 0.4.2 and pyasn1-modules from 0.1.5 => 0.2.1 on Arch Linux seems to break sleekxmpp with the following error.

ERROR    Connection error.
ERROR    <TagSet object at 0x7f021a4c6eb8 tags 0:32:16> not in asn1Spec: <OctetString schema object at 0x7f0218c678d0 tagSet <TagSet object at 0x7f021a845dd8 tags 0:0:4> encoding iso-8859-1>
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1492, in _process
    if not self.__read_xml():
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1564, in __read_xml
    self.__spawn_event(xml)
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1632, in __spawn_event
    handler.prerun(stanza_copy)
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/handler/callback.py", line 64, in prerun
    self.run(payload, True)
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/handler/callback.py", line 76, in run
    self._pointer(payload)
  File "/usr/lib/python3.6/site-packages/sleekxmpp/features/feature_starttls/starttls.py", line 64, in _handle_starttls_proceed
    if self.xmpp.start_tls():
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 889, in start_tls
    cert.verify(self._expected_server_name, self._der_cert)
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/cert.py", line 142, in verify
    cert_names = extract_names(raw_cert)
  File "/usr/lib/python3.6/site-packages/sleekxmpp/xmlstream/cert.py", line 73, in extract_names
    asn1Spec=OctetString())[0]
  File "/usr/lib/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 1318, in __call__
    '%s not in asn1Spec: %r' % (tagSet, asn1Spec)
pyasn1.error.PyAsn1Error: <TagSet object at 0x7f021a4c6eb8 tags 0:32:16> not in asn1Spec: <OctetString schema object at 0x7f0218c678d0 tagSet <TagSet object at 0x7f021a845dd8 tags 0:0:4> encoding iso-8859-1>
DEBUG    reconnecting...

After downgrading back to pyasn1 0.3.6 and pyasn1-modules 0.1.5 sleekxmpp works fine.

@fabaff
Copy link

fabaff commented Dec 3, 2017

etingof/pyasn1#112

@fenchu
Copy link

fenchu commented Dec 6, 2017

Thanks

pyasn1==0.3.6
pyasn1-modules==0.1.5
sleekxmpp==1.3.3

@immanuelfodor
Copy link

The above version fix workaround doesn't work for me with a valid Let's Encrypt certificate:

DEBUG:sleekxmpp.features.feature_starttls.starttls:Starting TLS
INFO:sleekxmpp.xmlstream.xmlstream:Negotiating TLS
INFO:sleekxmpp.xmlstream.xmlstream:Using SSL version: TLSv1_2
DEBUG:sleekxmpp.xmlstream.xmlstream:CERT: -----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

DEBUG:sleekxmpp.xmlstream.xmlstream:Event triggered: ssl_cert
ERROR:sleekxmpp.xmlstream.xmlstream:Certificate has expired.
DEBUG:sleekxmpp.xmlstream.xmlstream:Event triggered: session_end
DEBUG:sleekxmpp.xmlstream.xmlstream:Event triggered: disconnected
DEBUG:sleekxmpp.thirdparty.statemachine: ==== TRANSITION connected -> disconnected

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants