Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
sjnazeer #1
Member since Apr 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: SSL Socket stream for .Net CF2.0
Hi,
  We are developing application for Windows Mobile 6.0 using C# on .Net CF 2.0.
  Is there any way to support SSL Socket stream on C# for .Net CF?
  Could you please provide some sample examples?

 Thanks for the help.
 -Shk
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
There is with 3rd party components, or you code or the SSL, TLS bits on your own.
agsXMPP supports TLS on CF, we have no SSL support because we don't need old style SSL because all XMPP server have to support TLS.

There are many commercial components, and there is bccrypto which is Open Source. We use bccrypto.

Alex
This post was edited on 2009-08-18, 15:24 by Alex.
Avatar
chobits #3
Member since Jul 2009 · 3 posts
Group memberships: Members
Show profile · Link to this post
according to http://msdn.microsoft.com/en-us/library/bb738067.aspx

SSL with the .NET Compact Framework
The .NET Compact Framework has built-in support for SSL. This support includes the use of "sockets", Web (HTTP) requests, and XML Web service calls. You simply have to change the URL to begin with https:// instead of http:// to enable SSL.

Is there anyone could be kind enough to give me some hints for this matter? Thanks a lot
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
TLS using the Bouncy Castle Crypto library is available in the latest version. See also the other threads about TLS here.

Alex
Avatar
chobits #5
Member since Jul 2009 · 3 posts
Group memberships: Members
Show profile · Link to this post
I mean, I just read a MSDN article http://msdn.microsoft.com/en-us/library/bb738067.aspx, "The .NET Compact Framework has built-in support for SSL. This support includes the use of SOCKETS, Web (HTTP) requests, and XML Web service calls."

I know there is still no SslStream in .net cf 3.5, but it seems MSDN mention "...This support includes the use of SOCKETS..", I am wondering is it possible to use this "built-in SSL support" ? (Google Talk do open 5223 for old SSL). Thanks a lot :)
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by chobits:
I mean, I just read a MSDN article http://msdn.microsoft.com/en-us/library/bb738067.aspx, "The .NET Compact Framework has built-in support for SSL. This support includes the use of SOCKETS, Web (HTTP) requests, and XML Web service calls."

I think the mean is supports sockets internal, but you can't use the SSL sockets from an external app. Only HTTP and Xml Webrequests, but we need Sockets in XMPP.

Quote by chobits:
I know there is still no SslStream in .net cf 3.5, but it seems MSDN mention "...This support includes the use of SOCKETS..", I am wondering is it possible to use this "built-in SSL support" ? (Google Talk do open 5223 for old SSL). Thanks a lot :)

AFAIK its impossible with managed code. You can PInvoke the crypto Api's if you want, but I prefer managed code only. But I am happy to make any changed when you can find an example for SSL Sockets with CF 2.0 - 3.5.

Alex
Avatar
chobits #7
Member since Jul 2009 · 3 posts
Group memberships: Members
Show profile · Link to this post
I got it now, I am sorry to waste you so much time. Really thanks a lot :)
Avatar
carlosgjs #8
Member since Aug 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
I wrote a blog post about how to enable SSL for a managed socket: http://blogs.msdn.com/cgarcia/archive/2009/08/22/getting-a…. Make sure you read the previous post as well, which has the full source.

This was mostly an exploration excercise, but it may get you started.

Carlos
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi Carlos,

thanks for this great post. I was able to add StartTls to your code. I need to test and tweak the code, then I will replace bccrypto in agsXMPP.

Alex
Avatar
cweimer #10
Member since Aug 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Just curious if there has been any progress made on adding SSL sockets and TLS.  Is there any estimated timeframe when we might see this added to agsXMPP?

Thanks,
Chris
Avatar
Alex #11
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
TLS using bccrypto is in the latest release. Bccrypto seems to be incompatible with some servers, eg. Google talk.

I am currently working hard on the release of MatriX for the full framework in early December. Then we will work on MatriX for CF. For MatriX CF SSL support using native sockets without bccrypto is on the TODO list.

Alex
Avatar
markz #12
Member since May 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
Do you have an estimate for when Bccrypto will be replaced for .NET Compact Framework?

Thanks,
Mark
Avatar
Alex #13
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi Mark,

it's already replaced in MatriX Mobile and it's planned for the commercial version of agsXMPP. But .NET 3.5 will be required for this feature. I had no success to use TLS with CF2.0

Alex
This post was edited on 2010-01-12, 20:47 by Alex.
Avatar
markz #14
Member since May 2009 · 11 posts
Group memberships: Members
Show profile · Link to this post
So just to clarify, TLS will work with agsXMPP and .NET CF 3.5? We will be purchasing the commercial version, but I wonder if I would be better off with Matrix instead of agsXMPP. It does not really matter to me if I'm using .NET CF 2.0 or 3.5.

Mark
Avatar
Alex #15
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
at the moment it's only implemented in MatriX and works fine there. If customers need it also in agsXMPP I will also add it to agsXMPP as well.
While I developed TLS I had problems at the beginning in MatriX. I can't remember if they were related to the .NET version 2.0 or Windows Mobile version 5. When I switched to CF 3.5 and WM6 all problems were gone and TLS works fine.
When you are not limited to .NET 2.0 or older suggest to switch to MatriX when possible.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next
Forum: agsXMPP RSS