Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
68348461
Unverified
Commit
68348461
authored
6 years ago
by
Daniel Gustafsson
Committed by
Daniel Stenberg
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
openssl: make 'done' a proper boolean
Closes #3176
parent
ebfe02f7
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
lib/vtls/openssl.c
+6
-6
6 additions, 6 deletions
lib/vtls/openssl.c
with
6 additions
and
6 deletions
lib/vtls/openssl.c
+
6
−
6
View file @
68348461
...
...
@@ -1262,7 +1262,7 @@ static int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
ssize_t
nread
;
int
buffsize
;
int
err
;
int
done
=
0
;
bool
done
=
FALSE
;
/* This has only been tested on the proftpd server, and the mod_tls code
sends a close notify alert without waiting for a close notify alert in
...
...
@@ -1290,7 +1290,7 @@ static int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
case
SSL_ERROR_ZERO_RETURN
:
/* no more data */
/* This is the expected response. There was no data but only
the close notify alert */
done
=
1
;
done
=
TRUE
;
break
;
case
SSL_ERROR_WANT_READ
:
/* there's data pending, re-invoke SSL_read() */
...
...
@@ -1299,7 +1299,7 @@ static int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
case
SSL_ERROR_WANT_WRITE
:
/* SSL wants a write. Really odd. Let's bail out. */
infof
(
data
,
"SSL_ERROR_WANT_WRITE
\n
"
);
done
=
1
;
done
=
TRUE
;
break
;
default:
/* openssl/ssl.h says "look at error stack/return value/errno" */
...
...
@@ -1309,20 +1309,20 @@ static int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
ossl_strerror
(
sslerror
,
buf
,
sizeof
(
buf
))
:
SSL_ERROR_to_str
(
err
)),
SOCKERRNO
);
done
=
1
;
done
=
TRUE
;
break
;
}
}
else
if
(
0
==
what
)
{
/* timeout */
failf
(
data
,
"SSL shutdown timeout"
);
done
=
1
;
done
=
TRUE
;
}
else
{
/* anything that gets here is fatally bad */
failf
(
data
,
"select/poll on SSL socket, errno: %d"
,
SOCKERRNO
);
retval
=
-
1
;
done
=
1
;
done
=
TRUE
;
}
}
/* while()-loop for the select() */
...
...
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