SSL and ServiceStack
Ok now I have my ServiceStack working with Android using the native ServiceStack client (AndroidServiceClient). I have now implemented SSL. I've opted for Self Signed Certs at the moment.My current setup is:
Desktop->Cisco Router->Android
The desktop requires the Self Signed Certificate creating, I'm using SelfSSL.exe for the job.
C:\ssl>selfssl /N:CN=YourSerivceName /V:9999
C:\MMC
Then Add Snap-In Certificate Manager running under Local Machine.
Copy your YourSerivceName cert to the Trusted Root Certification Authorities
C:\netsh http add sslcert ipport=0.0.0.0:xxxx appid={yyyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyy} certhash=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Where:
xxxx is the listening SSL port
{yyyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyy} is the the assembky guid from AssemblyInfo.cs in your ServiceStack application.
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz is the Thumbprint from your YourSerivceName certificate.
In may case the to allow port xxxx through on my desktop firewall.
On my cisco router I have forward the port:
ip nat inside source static tcp desktop.pc.address xxxx my.wan.addreess xxxx extendable
Then allow the port to be accessible on the inbound rule
access-list aaa permit tcp any host my.wan.address eq xxxx
To test the port is open, start your ServiceStack application
new AppHost().Init().Start("https://+:xxxx/");
then use a free online port checking tool to see if all in ok. I use ww.yougetsignal.com/tools/open_ports/
Congratulations you created a ServiceStack SSL service!
No comments:
Post a Comment