473,803 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5926
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.d e> wrote in message
news:OL******** ******@TK2MSFTN GP05.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.d e> wrote in message
news:Oi******** ******@TK2MSFTN GP03.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.d e> wrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
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.d e> wrote in message
news:%2******** ********@TK2MSF TNGP05.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
1758
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 work ok, the async server goes into an infinite loop:- LOOP: SSL accept: before/accept initialization LOOP: SSL accept: SSLv3 read client hello A LOOP: SSL accept: SSLv3 write server hello A LOOP: SSL accept: SSLv3 write certificate A LOOP: SSL...
3
2603
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 webconnection with httpS I always get something in this Area: urllib2.URLError: <urlopen error unknown url type: https>
1
4633
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 M2Crypto's ftpslib.py (uses OpenSSL - not Pythons SSL) and made a wrapper for ftplib.FTP using Pythons SSL. I wrap the cmd socket like:
0
1649
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 there is nothing. Moreover why does it block since I am in non blocking mode ? -----
0
3045
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 cPanel URL that delivers a gzipped copy of the log file with all entires for the current month (up to the current date and time). I want to run this script once a day (at night) and would like to download the gzipped file by resuming from where...
9
5288
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 how to do that ?? Thank you. Kris
0
1144
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 should not have https schemes when links are embedded in an SSL enforced page. One way was to use absolute URL - which is a deployment nightmare. The other alternative is to use SSL within the whole site structure - which I understand would...
1
11213
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 know nothing about MySQL. 2nd: What little documentation I was able to find was very cryptic and seems written for LINUX. 3rd: I have found reference to the fact that MySQL needs to be recompiled to support SSL. I have been told that this has...
2
2300
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 README file: ---------------------------------------------------------------------------------------------- (a) the band-aid fix is to link the _socket module statically rather than dynamically (which is the default).
5
2941
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 admit I am rather confused and frustrated. That being said, I'd like some direction in how exactly I'm supposed to accomplish this. Thanks very much, JK
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.