Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
b9d6122c
Commit
b9d6122c
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Add comments
parent
35b79818
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/class/smtps.class.php
+21
-0
21 additions, 0 deletions
htdocs/core/class/smtps.class.php
with
21 additions
and
0 deletions
htdocs/core/class/smtps.class.php
+
21
−
0
View file @
b9d6122c
...
...
@@ -427,6 +427,25 @@ class SMTPs
{
if
(
!
empty
(
$conf
->
global
->
MAIN_MAIL_EMAIL_STARTTLS
))
{
/*
The following dialog illustrates how a client and server can start a TLS STARTTLS session
S: <waits for connection on TCP port 25>
C: <opens connection>
S: 220 mail.imc.org SMTP service ready
C: EHLO mail.ietf.org
S: 250-mail.imc.org offers a warm hug of welcome
S: 250 STARTTLS
C: STARTTLS
S: 220 Go ahead
C: <starts TLS negotiation>
C & S: <negotiate a TLS session>
C & S: <check result of negotiation>
// Second pass EHLO
C: EHLO client-domain.com
S: 250-server-domain.com
S: 250 AUTH LOGIN
C: <continues by sending an SMTP command
*/
if
(
!
$_retVal
=
$this
->
socket_send_str
(
'STARTTLS'
,
220
))
{
$this
->
_setErr
(
131
,
'STARTTLS connection is not supported.'
);
...
...
@@ -437,6 +456,8 @@ class SMTPs
$this
->
_setErr
(
132
,
'STARTTLS connection failed.'
);
return
$_retVal
;
}
// Most server servers expect a 2nd pass of EHLO after TLS is established to get another time
// the answer with list of supported AUTH methods. They may differs between non STARTTLS and with STARTTLS.
if
(
!
$_retVal
=
$this
->
socket_send_str
(
'EHLO '
.
$host
,
'250'
))
{
$this
->
_setErr
(
126
,
'"'
.
$host
.
'" does not support authenticated connections.'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment