简体   繁体   中英

Does Windows Phone 7.1 support SSL sockets?

I can't find a definitive answer on this, but a the moment I'm guessing not. If not, is there any possible workaround other than proxying via a server?

By way of interest, I'm just trying to connect to Gmail imap for a small test application...

No, WP7.1 does not support SSL sockets.

Edit
Typically you would use SslStream to implement SSL over TCP. Unfortunately, SslStream is not available in Silverlight or WP7. You have to roll your own (which is a bad idea, but possible), or use a third party library.

As mentioned by Eugene, there's SecureBlackbox , but that's more than a thousand dollars (minimum, depending on your many license choices) to use in a commercial product. If you're doing this on your own, that's probably too big an upfront cost. If you're doing this for your company, it might be a route to consider.

Another option might be to try to use BouncyCastle in WP7, however BouncyCastle doesn't currently release WP7 compatible binaries and may rely on framework items not available in WP7. This blog entry implies it might be possible, but will require some tweaking.

If you're a solo dev, I'd recommend at least trying BouncyCastle before considering SecureBlackbox. If you're doing your company's WP7 app offering, start with SecureBlackbox.

Our SecureBlackbox offers SSL support: you can use SSL engine with any transport (including sockets and pigeon mail) or you can use socket-based client component. There's a WP7-specific problem with certificate validation though - as WP7 doesn't let us access system certificates, you would need to have trusted certificates list in your application. Not a big problem with our components (SecureBlackbox includes complete certificate management as well), but you need to be aware about this extra step.

As far as I know, IPWorks by /n Software is offered for Windows Phone Mango, but I don't know exactly what they offer in SSL aspect.

I did get Bouncy Castle compiling for CF 3.5 - it's probably not a stretch to use that work for Windows Phone.

Internally we've been using an internal port of OpenSSL for Compact Framework apps for ages, and it wasn't a difficult port. I suspect getting that working under Phone also wouldn't be overly difficult.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM