Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

SSL help needed
simoneromano
#1 Posted : Monday, July 30, 2012 2:08:09 AM(UTC)
Groups: Member
Joined: 7/27/2012(UTC)
Posts: 5

Was thanked: 1 time(s) in 1 post(s)
I'm experiencing a very frustrating issue with SSL: it works perfectly with Windows 7/Windows Server 2008, but when attempting to use it in Windows XP Pro, it appears not serving correctly the browser requests: in firefox, e.g., I receive a "ssl_error_rx_record_too_long" error from the server. It has to be stated that, when installing on WinXP, the UWSP installer said "Unable to replace xenroll.dll because it's protected by the O.S.". I always ignored such an error, but now it seems to become important! I need a way to go on, because I've a number of production XP machines that needs SSL support now.
P.S.
I don't know if this can help: I fired up IIS 5.1 on one of those Win XP machines and after tricking a while, it works, with IIS 5.1 it works (but still I DO NEED to make it works with UltiDev WSP).

Thank you for your help.
Simone
1 user thanked simoneromano for this useful post.
Ultidev Team on 8/1/2012(UTC)
Ultidev Team
#2 Posted : Monday, July 30, 2012 8:12:41 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

We are aware of the xneroll issue, and are trying to come up with a solution. What you are experiencing could be two separate problems. XEnroll component is used only generate certificates and if you use existing certs, it should not matter.

The "ssl_error_rx_record_too_long" problem has not been reported before. Does it occur when an application serves pages, or when a new certificate is created? Could you please describe steps to reproduce this problem?

Thank you,
Best regards.
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
simoneromano
#3 Posted : Monday, July 30, 2012 9:11:41 AM(UTC)
Groups: Member
Joined: 7/27/2012(UTC)
Posts: 5

Was thanked: 1 time(s) in 1 post(s)
Hi,
please find here http://screencast.com/t/c6xXwODo a screencast showing the steps needed to reproduce error: The certificate imported is a self-signed one, the same that would work imported for IIS. Let me know if you find something wrong in how I'm doing SSL configuration in WSP (bear in mind, I'm not a https ninja).
Thank you
Simonr
Ultidev Team
#4 Posted : Monday, July 30, 2012 12:07:30 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Simone!

Thank you very much for excellent screencast showing how to reproduce the problem. One thing that it really helped us understand is that some requests are going through and some fail.

Would it be possible for you to send us your project so we could test it locally on XP VM? If you could, please attach password-protected ZIP file to your reply and send us password separately.

Another thing we would like to ask you: does this problem occur only with certificates generated by non-UWS/XEnroll? Or did you see the same problem with UWS certs as well?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
simoneromano
#5 Posted : Tuesday, July 31, 2012 4:13:32 AM(UTC)
Groups: Member
Joined: 7/27/2012(UTC)
Posts: 5

Was thanked: 1 time(s) in 1 post(s)
Hi,
thankyou for help.
First the problem occurs both for self signed cert. generated by UWS and non.
I'm not able to send you the "real" project (consider that it is very "environment dependant", so it would be difficult to you to fire up). Your request made me think about which requests are served and which ones are not:
it seems that .axd generated resources (I use combres for js and css minification and compression) are not correctly served: disabling combres made the plain old .js and .css files to be served correctly.
One step forward, now the problem is when the "Account/Logon" action method returns a "RedirectToAction" result: it seems that an exception in UltiDev.WebServer.Core.AspNetRequest.SendResponseFromMemory occurs. Please find attached a log file from the debugger: hope this can help. In the meantime I'll try to make a sample project with the error in place.
Thank you
File Attachment(s):
uwsLogFirefox.txt (4kb) downloaded 232 time(s).
simoneromano
#6 Posted : Tuesday, July 31, 2012 6:56:44 AM(UTC)
Groups: Member
Joined: 7/27/2012(UTC)
Posts: 5

Was thanked: 1 time(s) in 1 post(s)
Here https://dl.dropbox.com/u...UWS/MvcApplication2.zip you can find a simple asp.net mvc 3 project that uses combres for compression and minification and that doesn't work unless you disable compression (compilation debug="true").
This is the first problem.
For the second one, I'm trying to reproduce it on a pet project: by now, trying and trying, I found that the WS behaves differently for different browser requests:
Attached vs2010 debugger

chrome post request (/Account/Logon) --> the debugger enter 2 times (?) in the Action method, steps to the RedirectToAction instruction, but nothing happens (SSL error)

Firefox --> as Chrome, except there is only one enter in the action method

i.e. 8+ --> it definitely works: one entry in the action method, redirect works!

I think I'm going crazy...

bye
Ultidev Team
#7 Posted : Tuesday, July 31, 2012 10:31:22 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Simone.

We were unable to load the solution - our VS 2010 keeps saying that type of project is not supported even though VB is enabled and MVC3 is installed. We'll keep trying.

It's great you kept digging as far as finding exception thrown in AspNetRequest.SendResponseFromMemory(), but this happens routinely when client closes connection on its end. HttpListener class from .NET Framework that we use for serving http requests is notorious for not providing access to the connection state.

Overall, it looks like something strange is going on with connections on the XP systems.

Regarding compression problem. If UWS compression is enabled, then your application should tell UWS not to compress again by setting response "Content-Encoding" header to "gzip". UWS will then not attempt to compress such response even with compression enabled.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
simoneromano
#8 Posted : Wednesday, August 1, 2012 2:32:22 AM(UTC)
Groups: Member
Joined: 7/27/2012(UTC)
Posts: 5

Was thanked: 1 time(s) in 1 post(s)
If you want you may download the "final" product pointing to https://dl.dropbox.com/u...ers/PS100Installer4.zip in the .zip file launching PS100IVServerSetup.exe everything will be installed, the production web app will be registered within UWS on the tcp port 2378 and so you can freely test the behaviour.
If the installer goes ok, you should login to the app with "admin" as both user name and password: the UI is localized in italian, sorry, we are working on globalizing it.
btw I don't think it's a matter of compression enabled or not (why would it works in win7?)

thankyou
regards
Simone
Ultidev Team
#9 Posted : Wednesday, August 1, 2012 11:39:14 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Simone,

We have been able to reproduce this problem on XP, and will investigate. This problem is not specific to your application and is likely to be related to TCP connection management. We will keep you updated regarding the progress of this issue.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Ultidev Team
#10 Posted : Saturday, August 11, 2012 6:06:14 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Could you please try using IE and letting us know what kind of result you are getting. For us Internet Explorer worked while Chrome was giving the error.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#11 Posted : Sunday, August 12, 2012 6:48:25 AM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Yes, with ie8+ it works, with Firefox and chrome it doesn't work as I stated in a previous post. Very odd. Have you found why? Let me know, thanks.
Simone
Ultidev Team
#12 Posted : Sunday, August 12, 2012 3:05:23 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Simone.

Thank you for clarification.
No, we haven't yet found what is causing it. We are working on it though.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Ultidev Team
#13 Posted : Monday, August 13, 2012 6:58:25 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Simone.

We are still working on the issue. It appears to be the same as or related to http://support.microsoft.com/default.aspx?scid=kb;EN-US;933430

We saw server started working with Chrome and others after we deleted certain number of certificates from trusted root storage. We realize that this is not a solution, but it's a clue guiding our research further. This problem may also be related to the fact that http.sys SSL when configured with flags=0 still seems to request client certs, which in turn leads to the breakdown as described in the support article.

We'll keep you posted.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Ultidev Team
#14 Posted : Wednesday, August 22, 2012 11:11:56 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Simone.

At this point we are quite confident that this problem is a manifestation of two Microsoft bugs working together:

1. On Windows XP http.sys always negotiates client certs even when instructed not to. Since hardly anyone uses http.sys on XP, especially with SSL, and even more so with client certificates, nobody seems to have noticed this problem. Microsoft is clearly aware of the problem as this is not happening on Windows 7, for example.

2. When client cert is negotiated with the client (usually a browser), as always happens on XP with http.sys configured for SSL (see problem 1), server tries to help the client with presenting eligible client certs by sending it server's list of trusted root certs, which on XP contains about 370 certs (compare to barely 40 on Windows 7). This huge number of certs is above what SSL protocol allows, so most clients deem it SSL error and quit - thus the error you have reported. On Windows 2003 this can be worked around by changing registry settings, and we'll test and try to fix it. On Windows XP, unfortunately, registry fix does not work, so the only way to make this problem go away is to remove some trusted root certificates on Windows XP, which UWS installer can't be tasked with, as this can easily be considered as malicious.

Fixing either of these problem would be a big help, although for SSL to work well with client certs, both would have to be fixed. But if client certs are not involved, fixing either would do. Unfortunately, our experience of working with Microsoft tells us that these issues are very unlikely to be fixed, especially given that XP is circa 2001, and three generations removed from the latest version: Windows 8. We will file this problem with Microsoft support, but realistically, SSL support on XP out of the box is unlikely.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#15 Posted : Thursday, August 23, 2012 3:40:00 AM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

It would be ok just delete the extra server certs: have you a list of them, a tool to remove them in just one step or something similar?
For my app this would be' acceptable.
Thanks
Simone
Ultidev Team
#16 Posted : Wednesday, August 29, 2012 8:13:44 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Simone,

It's not server certificates that need to be deleted, it's trusted root certificates. Unfortunately, different users may need different set of trusted root certs, and any software replacing or removing significant portion of trusted root certificates is virtually guaranteed to be deemed malicious. You could consider creating a whitepaper for your users that will suggest combining trusted root certs required by Windows XP itself with all root certificates of Windows 7 - this would drastically reduce number of root certs and allow SSL authentication to work as well as at Windows 7. However, UWS installer cannot be required to do this automatically due to problems described above. If users decided to do it, they should do it on their own risk.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
siroman
#17 Posted : Monday, September 17, 2012 4:17:59 AM(UTC)
Groups: Member
Joined: 4/5/2011(UTC)
Posts: 8

Was thanked: 2 time(s) in 2 post(s)
Hi there,
just to inform you that it definitely works, not a clean solution, but in this case the quick and dirty one goes well.
Thank you
bye

Simone
Ultidev Team
#18 Posted : Monday, September 17, 2012 9:38:08 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Thank you, Simone. We are glad this workaround makes life easier for you.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#19 Posted : Monday, January 8, 2018 9:29:40 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest (7)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.