Spotty8A

Greenhorn
+ Follow
since Aug 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Spotty8A

I faced the same issue and changing the port worked for me !

Thanks !!!
18 years ago
Hi all,
I have a Tomcat server with SSL enabled. My tomcat version in 1.4.27 and JDK is 1.4.2_03. HTTPS has been working fine with my self generated certificate [I used keytool to generate certificate and import it to keystore file].
I have replaced this self generated certificate with a signed certificate. After this, I get a 'page not found' whenever I access my server through HTTPS.

The noticable difference between the unsigned and signed certifictes is that the former cert version was V1 and signature algorithm was md5RSA. Now with the CA signed certificate the version is V3 and signature algorithm is sha1RSA.

I ran the following command to check the handshake :-
openssl s_client -connect <myServer>:8443 -ssl3 -debug

I get this error :
5364:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s
3_pkt.c:1052:SSL alert number 40
5364:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c
:529:

I have the same version of tomcat running on another server but when I run the openssl command on this other server, the handshake is successful.

Any help on why I am seeing the handshake failure for ssl3 is much appretiated.

Thanks a ton !

KNat
20 years ago
Hi,
I am trying to download a file from a HTTPS URL. I need to do it using JDK1.3.1 which means that I do not have javax.net.ssl package.
Given below is the code I have currently. It does not throw me any exception and downloads the file but I only get 0 bytes.
Please help!
private static boolean downloadFile(String source, String dest)
{
byte[] baBuffer = new byte[1024];
inti;
File destFile = new File(dest);
// if dest file already exists, return
if(destFile.exists())
{
return true;
}
try
{
java.net.URL url = new java.net.URL("https://" + source);
URLConnection urlConnection = url.openConnection();
urlConnection.setUseCaches(false);
urlConnection.setDoOutput(true);
urlConnection.setDoInput(true);
urlConnection.connect();

urlConnection.getOutputStream().flush();
urlConnection.getOutputStream().close();
DataInputStream di = new DataInputStream(urlConnection.getInputStream());
FileOutputStream fos = new FileOutputStream(destFile);
while((i = di.read(baBuffer)) != -1)
{
fos.write(baBuffer, 0, i);
}
fos.close();
return true;
}
catch(Exception e)
{
e.printStackTrace();
return false;
}
}