Forum Discussion

joanna_zhang_11's avatar
joanna_zhang_11
Icon for Nimbostratus rankNimbostratus
Sep 07, 2005

How to run installCert in the sdk examples

Hi there,

 

 

I am quite new for this area, but I would like to run some sdk examples in Java language, I did run.bat samplename host port username password, but I got some error message,"faultString:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException: No trusted certificate found".

 

 

I suppose that I should run the installCert, but there is no guideline to tell me how to run installCert. Would you please tell me how to run installCert in the tools. And what is the keystore_password and keystore_alias.

 

 

Thank you very much!

 

Joanna
  • I would suggest you use the XTrustProvider class highlighted in one of my old blog posts:

     

    http://devcentral.f5.com/weblogs/joe/archive/2005/07/06/1345.aspx

     

    Click here

     

     

    Basically it hooks into the client side certficate validation process to allow self signed server certs so that you don't have to install the cert locally.

     

     

    If this isn't an option for you, here is the usage for installCert.

     

     

    $ java installCert server_address keystore_password keystore_alias

     

     

    This will look in your home directory for a file called .keystore and store the certificate from the webserver at address "server_address".

     

     

    Hope this helps...

     

     

    -Joe
  • I guess I didnt' really answer your question about keystore_password and keystore_alias.

     

     

    The keystore is a secured file that contains all the server keys that you trust. This file is password protected and that is what you are specifying with the keystore_password. When adding an entry to this file you need to supply it with an alias that will identify the new entry added. This is what keystore_alias is for.

     

     

    You can check out the documentation for java's keytool for all the info you ever wanted on truststores.

     

     

    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

     

    Click here

     

     

    -Joe
  • Hi Joe,

     

     

    Thanks a lot for your answer and great XTrustProvider code, it works.

     

     

    But I just wonder is there any document or description about the XTrustProvider.java and LocalLBNodeAddress.java file, I think I didn't understand the whole code of both two files completely.

     

     

    BRs/Joanna
  • I am new to devcentral, I cannot access https://devcentral.f5.com/Default.aspx?TabID=29&newsType=ArticleView&articleId=22

     

    Interested in this article, what do i need to do?