Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SSL context support and minor fixes #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

WelterRocks
Copy link

Added support for SSL context to bypass verify_peer and verify_host and allow self signed certificates.
Added support for realms on supporting servers.
Fixed timestamps in logger.

@Norgul
Copy link
Collaborator

Norgul commented Oct 12, 2020

Thank you for the PR, I have few questions.

  1. What is the purpose of realm? The way I see it, it is same as host. String which can be set through options, and is used for connecting. So basically the same thing.
  2. Do credentials still work if you don't provide authzid?
  3. In Socket you are setting context options to your new methods, but they don't seem to have any defaults. What if you don't set them?

Thanks

@WelterRocks
Copy link
Author

Authzid is used for many xmpp installations and ldap based auth mechanisms. Yes, credentials still work without authzid, i have tested this against some servers with different configurations, yesterday.

Also, there are many servers out there, which have a specified hostname to connect to (with there corresponding SRV entries in DNS), but need other domains AFTER connect. Ecovacs API server for example is such a candidate for example, but there are many others (like iot combox) working the same way. Therefore a split of connection hostname and auth domain ist required, which is done by setting a "realm".

My project EcoPhacs makes use of these implementations for example, which are required to connect to their xmpp servers. If you would like to see, how this works, feel free to look at the code.

Last, the socket defaults. The defaults are defined in PHP, therefore a seperate specification is not needed. The default behaviour is the same, like before the modification is done. So, if you do not use or set authzid or socket context, xmpp-php behaves the same way, like before the modifications were placed in the code. So if you dont use the modifications, you will not notice that there are changes in the code.

@Norgul
Copy link
Collaborator

Norgul commented Oct 24, 2020

Regarding sockets and authzid, great!

Regarding realm...I still see no point because the way I see it from code, it looks as if it is different from host only with naming. It is used in same places as host and it is used the same way as host.

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

Successfully merging this pull request may close these issues.

2 participants