-
Notifications
You must be signed in to change notification settings - Fork 65
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
WIP: Default to STARTTLS #140
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, thanks for your PR!
though I'm not sure if I understand it correctly: see my comments in the review...
if ($this->sslmode === 'tls') { | ||
curl_setopt($ch, CURLOPT_USE_SSL, CURLUSESSL_ALL); | ||
|
||
if ($this->sslmode !== 'tls') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't people with tls
set use STARTTLS by default? - this would exclude them, right?
curl_setopt($ch, CURLOPT_USE_SSL, CURLUSESSL_ALL); | ||
} | ||
} else { | ||
$protocol = 'imaps'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you set the $protocol
two times to imaps
but for starttls (and insecure connections) we would need imap
, right?
$ch = curl_init(); | ||
if ($this->sslmode === 'tls') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a simpler solution: how about just changing this line to include everything expect:
- explicit
ssl
(and also TRUE), - explicit
nossl
,notls
, maybe "empty string" (and also FALSE)
so everything else (includingtls
) would be handled as STARTTLS...
what do you think?
Quickly looked at the new code and noted that setting
sslmode
to something liketrue
disables encryption, if I'm right? This PR is not tested at all, but I don't wanted to sketch what might be a better solution.