Current location - Quotes Website - Personality signature - How android calls SSl(https) encrypted webservice written by C#
How android calls SSl(https) encrypted webservice written by C#
0. Preparation and environmental description

0. 1 Check whether the environment variables of JDK are correct (omitted). I used JDK 1.6.

0.2 to prepare the web server, here choose TOMCAT 6.0.

0.3 Prepare the web service server and client (omitted, if you can't write, you can use eclipse tool to generate it).

1. Generate certificate

The files used here are stored in the D:/SSL/ folder, where the files in D:/SSL/server/ are used for the server and the files in D:/SSL/client/ are used for the client.

1. 1 Generate a server certificate.

Start-Run -CMD- Execute the command under dos window execution:

keytool-genkey-v-alias Tomcat-keyalg RSA-keystore D:/SSL/server/Tomcat . keystore-dname " CN = 127 . 0 . 0 . 1,OU=zlj,O=zlj,L=Peking, ST=Peking,C = CN "-validity 3650-store pass zljzlj-key pass zljzlj

2. So the library protection/makes the code security at C/C++ level also protected. In addition, the dynamic and static security of the App can be basically guaranteed through measures such as resource file protection (preventing viewing and modifying files such as pictures and audio), xml main file protection (secondary signature of main file) and memory protection.