NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
bkova987
Joined: 20 Apr 2011 Posts: 1
|
Posted: Wed Apr 20, 2011 11:51 am Post subject: secure web service using mutual certificate security |
|
|
hello,i need help making secure web service using MCS. i cant find any good tutorial about it. I want to use mine self-sign certificate ,not default glassfish certificates. So i created server and client keystore and truststore using keytool:
| Code: |
keytool -genkeypair -alias kljuc_server -keyalg RSA -validity 7 -keystore keystoreS.jks
keytool -genkeypair -alias kljuc_klijent -keyalg RSA -validity 7 -keystore keystoreC.jks
keytool -export -alias kljuc_server -keystore keystoreS.jks -rfc -file if_certifikat.cer
keytool -export -alias kljuc_klijent -keystore keystoreC.jks -rfc -file ic_certifikat.cer
keytool -import -alias kljuc_server -file if_certifikat.cer -keystore truststoreC.jks
keytool -import -alias kljuc_klijent -file ic_certifikat.cer -keystore truststoreS.jks
|
then i created web service on one computer, and web service client on other computer. Both computer use glassfish 3.0.1 server. I set MCS to point to keystore and truststore i created. on server keystoreS.jks and truststoreS.jks,on client keystoreC.jks and truststoreC.jks. i also tried setting glassfish jvm option to point to new keystore and truststore (they are on glassfish domain config directory on both computers. I also try a lot of things changing properties but i still cant make it. One of errors i get is Validation of self signed certificate failed.
I am not shure how to set all properties for MCS. There is some algoritm suite options (default is basic256bit). keytool made certificates: SHA1withRSA. What to choose?(i dont see that option in algoritm suite) there are also Security Header Layout and other stuff.
I dont know what else to do! If you need some files,i will post them.
Thx in advance for answer!! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|