Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
93
Issues
93
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
7bc74729
Commit
7bc74729
authored
Feb 06, 2015
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: do keep SSL state when reusing a TLS connection.
parent
a18e2540
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
src/client.c
src/client.c
+16
-0
src/connection.c
src/connection.c
+3
-0
No files found.
src/client.c
View file @
7bc74729
...
...
@@ -103,6 +103,22 @@ static inline void client_reuseconnection(client_t *client) {
con
=
connection_create
(
con
->
sock
,
con
->
serversock
,
strdup
(
con
->
ip
));
reuse
=
client
->
reuse
;
client
->
con
->
sock
=
-
1
;
/* TODO: do not use magic */
/* handle to keep the TLS connection */
#ifdef HAVE_OPENSSL
if
(
client
->
con
->
ssl
)
{
/* AHhhggrr.. That pain....
* stealing SSL state...
*/
con
->
ssl
=
client
->
con
->
ssl
;
con
->
read
=
client
->
con
->
read
;
con
->
send
=
client
->
con
->
send
;
client
->
con
->
ssl
=
NULL
;
client
->
con
->
read
=
NULL
;
client
->
con
->
send
=
NULL
;
}
#endif
client
->
reuse
=
ICECAST_REUSE_CLOSE
;
client_destroy
(
client
);
...
...
src/connection.c
View file @
7bc74729
...
...
@@ -410,6 +410,9 @@ connection_t *connection_create (sock_t sock, sock_t serversock, char *ip)
void
connection_uses_ssl
(
connection_t
*
con
)
{
#ifdef HAVE_OPENSSL
if
(
con
->
ssl
)
return
;
con
->
read
=
connection_read_ssl
;
con
->
send
=
connection_send_ssl
;
con
->
ssl
=
SSL_new
(
ssl_ctx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment