NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

secure web service using mutual certificate security

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
bkova987



Joined: 20 Apr 2011
Posts: 1

PostPosted: Wed Apr 20, 2011 11:51 am    Post subject: secure web service using mutual certificate security Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo