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

SSL hostname matching JID and alternate connection method #506

@deaddreger

Description

@deaddreger

I happen to be trying to connect to a server that uses a user's email address in the JID instead of that server's domain. Using the xmpp.connect(('alternatedomain.com', 5222)) method of connecting the SSL verify still tries to verify against the domain in the JID.

I realize this might not be the standard way of connecting to XMPP, but considering that it's possible that a subdomain might use a separate cert that's not a wildcard if a subdomain is required for the connection.. Consider:
jid = '[email protected]'
pass = 'somepass'
xmpp = sleekxmpp.ClientXMPP(jid, password)
xmpp.connect(('sub.domain.com', 5222))

In this case I feel the SSL verify should work if the cert matches either domain.com, sub.domain.com, or *.domain.com
or at least the ability to override the expected name, and even the stream to= field in xml with either a custom value or the connect() domain name when not an IP address.

Thanks for any attention to this, and thank you @kelvinkwong for fixes/patches concerning SSL it's helped me in my project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions