473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to resume an SSL-Session with SSLStream

Hi,

I have an SSLStream and i want to resume the SSL-Session for another
connection to this server. How can i do this? I havenīt found any clues
for it in SSLStream, perhaps Negotiatestream could provide me something
but i canīt find any examples for it.
Iīd appreciate any help or clues that would bring me any further.
Thanks in advance.
Azrael
Apr 22 '06 #1
8 5857
I cant remember the specifics of this, but SSL session reuse is enabled by
default in the framework for active or failed SSLStreams - but only if the
remote server supports it and the request for session reuse occurs within
the time boundaries set by the remote server.

On IIS I think you still have to set the servercachetime value for this to
work and it depends on the operating system hosting the webserver, but I
could be very wrong. You'd get a better answert in one of the IIS groups
(assuming your connecting to an IIS server). Perhaps a fish about for
servercachetime on one of the search engines would help you.

--
Regards

John Timney
Microsoft MVP

"Azrael" <Ro******@gmx.de> wrote in message
news:OL**************@TK2MSFTNGP05.phx.gbl...
Hi,

I have an SSLStream and i want to resume the SSL-Session for another
connection to this server. How can i do this? I havenīt found any clues
for it in SSLStream, perhaps Negotiatestream could provide me something
but i canīt find any examples for it.
Iīd appreciate any help or clues that would bring me any further.
Thanks in advance.
Azrael

Apr 22 '06 #2
John Timney ( MVP ) wrote:
I cant remember the specifics of this, but SSL session reuse is enabled by
default in the framework for active or failed SSLStreams - but only if the
remote server supports it and the request for session reuse occurs within
the time boundaries set by the remote server.

On IIS I think you still have to set the servercachetime value for this to
work and it depends on the operating system hosting the webserver, but I
could be very wrong. You'd get a better answert in one of the IIS groups
(assuming your connecting to an IIS server). Perhaps a fish about for
servercachetime on one of the search engines would help you.


I donīt reuse an ssl-session but i connect to an ftp-server and while
being connected to him i have to use the same ssl-session for the
data-connection. Tried now to use that cache by connecting to the same
server with a new instance of the SSLStream but no connection got
established. I will have to explicitly let him reuse the already
established SSLSession.
Apr 22 '06 #3
What I was trying to say is that the framework will always try and reuse an
ssl-session - if your ftp server doesn't support session caching then it
wont allow you to reuse the same session under any circumstances.

Pretty sure you cannot use the cache with a new instance of a stream as the
ssl protocol would see this as a session hijack attempt, and as I said you
could only use an established ssl-session if the remote server is set for
ssl-caching otherwise a new session will be established.

--
Regards

John Timney
Microsoft MVP

"Azrael" <Ro******@gmx.de> wrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
John Timney ( MVP ) wrote:
I cant remember the specifics of this, but SSL session reuse is enabled
by default in the framework for active or failed SSLStreams - but only if
the remote server supports it and the request for session reuse occurs
within the time boundaries set by the remote server.

On IIS I think you still have to set the servercachetime value for this
to work and it depends on the operating system hosting the webserver, but
I could be very wrong. You'd get a better answert in one of the IIS
groups (assuming your connecting to an IIS server). Perhaps a fish about
for servercachetime on one of the search engines would help you.


I donīt reuse an ssl-session but i connect to an ftp-server and while
being connected to him i have to use the same ssl-session for the
data-connection. Tried now to use that cache by connecting to the same
server with a new instance of the SSLStream but no connection got
established. I will have to explicitly let him reuse the already
established SSLSession.

Apr 23 '06 #4
John Timney ( MVP ) wrote:
What I was trying to say is that the framework will always try and reuse an
ssl-session - if your ftp server doesn't support session caching then it
wont allow you to reuse the same session under any circumstances.

Pretty sure you cannot use the cache with a new instance of a stream as the
ssl protocol would see this as a session hijack attempt, and as I said you
could only use an established ssl-session if the remote server is set for
ssl-caching otherwise a new session will be established.

The remote server is not only set for ssl-caching but he requests a
cached ssl-session for the data-connection. Otherwise the connection
doesnīt get established. This is defined in RFC4217 at 10.2.

This is the normal flow:
Connect to ftp server
Send "Auth tls"
set up initial SSL-Session for control-connection
Login
send "Prot p" <--- for requesting encrypted data-connnection
send "pasv"
list/request file or sth else that needs a data-connection
connect to the server and use the SSL-Session of the control-connection.
The server doesnīt accept anything else beside the control-ssl-session.

I donīt think i can rely onto the ssl-cache of my local framework but i
have to explicitly tell him to resume that the control-ssl-session.
Apr 23 '06 #5
Hi,

I was told real-names were desired in the newsgroups here, so i changed
my name now.

Greets
Roland Peters
Apr 23 '06 #6
Why dont you drop an email to someone in the.net remoting team. They will
be able to answer your question for you, if your lucky they just might be
able to tell you where its going wrong assuming you can get someone to
answer you.

http://blogs.msdn.com/dotnetremoting/

http://blogs.msdn.com/mahjayar/contact.aspx

--
Regards

John Timney
Microsoft MVP

"Roland Peters" <Ro******@gmx.de> wrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Hi,

I was told real-names were desired in the newsgroups here, so i changed my
name now.

Greets
Roland Peters

Apr 23 '06 #7
John Timney ( MVP ) wrote:
Why dont you drop an email to someone in the.net remoting team. They will
be able to answer your question for you, if your lucky they just might be
able to tell you where its going wrong assuming you can get someone to
answer you.

http://blogs.msdn.com/dotnetremoting/

http://blogs.msdn.com/mahjayar/contact.aspx

Thank you for the hint. I dropped an email each but till now i didnīt
get any reaction. What is the average time-spawn for an answer or donīt
they respond to every question?

Roland Peters
Apr 25 '06 #8
They MS employees tend to be very busy people,as Microsoft like to get their
moneys worth from them. I would not expect them answer everyone to be
honest but your question might intrigue one of them.

If you get no luck I would try and post your question in the forums at
www.asp.net or try the Managed newsgroups if you have an MSDN subsciption.
http://msdn.microsoft.com/subscripti...s/default.aspx

--
Regards

John Timney
Microsoft MVP
"Roland Peters" <Ro******@gmx.de> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
John Timney ( MVP ) wrote:
Why dont you drop an email to someone in the.net remoting team. They
will be able to answer your question for you, if your lucky they just
might be able to tell you where its going wrong assuming you can get
someone to answer you.

http://blogs.msdn.com/dotnetremoting/

http://blogs.msdn.com/mahjayar/contact.aspx

Thank you for the hint. I dropped an email each but till now i didnīt get
any reaction. What is the average time-spawn for an answer or donīt they
respond to every question?

Roland Peters

Apr 26 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Clinch | last post by:
Has anyone tried the echod-async.py example in m2crypto-0.12/demo/ssl? I am only connecting one client, the echo.py example in the same directory. Although the synchronous and threading examples...
3
by: Phillip | last post by:
Some people tipped me off on some possibilities to tackle my https problem. Those have definitely gotten me further in cornering the problem. Thank you. But: No matter what I do to open a...
1
by: Robert | last post by:
I need to run FTP over SSL from windows (not shitty sftp via ssh etc!) as explained on http://www.ford-hutchinson.com/~fh-1-pfh/ftps-ext.html (good variant 3: FTP_TLS ) I tried to learn from...
0
by: Ktm | last post by:
Hi, the following code (just taken on the example) blocks on recv unless I uncomment the 'send' function. I tested it with stunnel. Select seems to tell that there is something to read whereas...
0
by: Chuck Anderson | last post by:
I am writing a Php script to run on my home PC (Windows) that downloads an Apache access log file and inserts new entries into a database.. The only way I can access these log files is through a...
9
by: Kristijan Marin | last post by:
Hi, I have a project to do, that has to transfer files over SSL/SSH connection.(FTP over SSL or some other method) I searched a lot but didn't find anything usefull :(( Has anyone any clues...
0
by: CW | last post by:
I have run into a lot problems with SSL, and would appreciate some clear explanations: (1) Non-SSL links within SSL pages: In one of my earlier posts, I was having problems with links that...
1
by: Jason Wilson | last post by:
I've been tasked by my boss with configuring a MySQL install that we host for one our partners to support SSL using a commercial certificate. MySQL is installed on Windows 2000 Server. 1st: I...
2
by: campos | last post by:
Hi all, Last time I installed Python 2.5 by default, it didn't support SSL. When I tried to use HTTPS, the following error occured: AttributeError: 'module' object has no attribute 'ssl' In...
5
by: Jonathan Kay | last post by:
Hi, I'd like to my WCF webservice to work both on SSL and without. Unfortunately searching has led to dead ends, references to changes that only work on the old previous beta versions and I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.