About the XMPP protocol to send messages, login authentication SSL Error problem

Source: Internet
Author: User

Q: The error description is as follows
  1. Traceback (most recent): File '/tails-share/features/scripts/otr-bot.py ', line 197,in<module>otr_bot.serve_ Forever () file "/usr/lib/python2.7/dist-packages/jabberbot.py", line 715,in Serve_foreverconn = self.connect () file "/ tails-share/features/scripts/otr-bot.py ", line 82,in connectconres = Conn.connect ((conn_server, int (conn_port))) File "/usr/lib/python2.7/dist-packages/xmpp/client.py", line 205,in connectwhile isn't self. Tls.starttls and self. Process (1): Passfile "/usr/lib/python2.7/dist-packages/xmpp/dispatcher.py", line 303,in dispatchhandler[' func '] ( Session,stanza) File "/usr/lib/python2.7/dist-packages/xmpp/transports.py", line 330,instarttlshandlerself._ Startssl () File "/usr/lib/python2.7/dist-packages/xmpp/transports.py", line 309,in _startssltcpsock._sslissuer = Tcpsock._sslobj.issuer () Attributeerror: ' _ssl._sslsocket ' object has no attribute ' issuer ' 

This issue is a bug that exists in the new version of XMPP Python. You can modify the transports.py file to fix it:
Modify the following: (-row identity delete + row ID add)

  1. -ImportSocket,select,base64,dispatcher,sys+ImportSocket,ssl,select,base64,dispatcher,sys fromSimpleXMLImportUSTR fromClient Importplugin fromProtocolImport*@@-312,9+312,[email protected]@classTLS (PlugIn):"""immidiatedly switch socket to TLS mode. Used internally.""""""Here we should switch pending_data to hint mode."""Tcpsock=Self._owner. Connection-Tcpsock._sslobj =Socket.ssl (Tcpsock._sock,none,none)-Tcpsock._sslissuer =Tcpsock._sslobj.issuer ()-Tcpsock._sslserver =Tcpsock._sslobj.server ()+ Tcpsock._sslobj =Ssl.wrap_socket (Tcpsock._sock,none,none)+ Tcpsock._sslissuer = Tcpsock._sslobj.getpeercert (). Get ('Issuer')+ Tcpsock._sslserver = Tcpsock._sslobj.getpeercert (). Get ('Server') Tcpsock._recv=Tcpsock._sslobj.readtcpsock._send= Tcpsock._sslobj.write

About the XMPP protocol to send messages, login authentication SSL Error problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.