File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes SSL between two Webserver triggered by  a client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "SSL between two Webserver triggered by  a client" Watch "SSL between two Webserver triggered by  a client" New topic
Author

SSL between two Webserver triggered by a client

Joe Schaffer
Greenhorn

Joined: Mar 24, 2004
Posts: 29
Hi everybody,
I have a problem by configuring my web-server to accept a SSL certification.
The small example I want to program is a Internet Explorer-client connects to a Webserver(1). This Webserver(1) executes a function, triggered by the client on a second Webserver(2). Both Webserver are using Tomcat 3.3.2 for Windows. The result will then be displayed in the IE-client. Without using encryption this example works and the function "sayHello(name)" returns the correct String.
The example also works if I connect to the Webserver(1)with an HTTPS socket. I can read my self generated certification after I accepted it as a trusted one for this session.
I'm running in Problems if my Webserver(1) should connect to Webserver(2) and also use a SSL connection (HTTPS). By doing this I have no possibility to accept this certificate and so I get the error "sun.security.validator.ValidatorException: No trusted certificate found".
Though my whole examples are only for testing I don't want to register VeriSign or any other organisation. Is there a possibility how I can let my server now, that he can trust this certification?
I would be glad if anyone could help me. Thanks in advance,
best regards
Joe
Joe Schaffer
Greenhorn

Joined: Mar 24, 2004
Posts: 29
Hi everybody,
I solved the problem. I had one problem by exporting and importing my certificate. It works if the name of the computer (not localhost) is entered in the CN-field of the keytool generation. After that the file has to be exportet to a .cer file. This can now be importet to the cacerts file of the java virtual machine (.../jre/lib/security). Now all information of the certificate are valid. Additionally I used the IE to accept my certificate as a trusted one. This can be done if the certificate pops up where you should accept it. Just go on Details - import.
My second problem was, I am not allowed to call the second webserver with "https://localhost:..." I have to use "https://<computername>:...."
Best regards
Joe
 
 
subject: SSL between two Webserver triggered by a client
 
Threads others viewed
basic question regarding ssl and certificate
does SSL work with out CA signing ?
Browser and Server SSL communication
connect to a SOAP webservice using SSL
Connect SSL with client Certificate using java code
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture