[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Jessie-discuss] Paypal https failure
From: |
Eric Wong |
Subject: |
[Jessie-discuss] Paypal https failure |
Date: |
Tue, 27 Nov 2007 01:46:49 +0800 |
The sample code below used to be working perfectly until recently (few
months back?). I am getting the following exception:
Exception in thread "main" javax.net.ssl.SSLProtocolException:
java.lang.IllegalArgumentException: unknown attribute 2.5.4.5
Funny thing is, other https seem to be working fine.
I am using GCJ 3.4.1, Jessie 1.0.0 with Gnu Crypto CVS dated May 2005.
I have no clue what went wrong. Any help appreciated. TIA!!
Eric
>> Sample code --- test.java
import java.io.*;
import java.net.*;
import java.security.*;
public class test {
public static void main( String[] args ) throws Exception {
System.setProperty( "java.protocol.handler.pkgs",
"org.metastatic.jessie" );
// Path to GCJ compiled libs
System.load( "/path/libjcrypto.so" ); // GNU Crypto
System.load( "/path/libjessie.so" ); // Jessie
Class clazz = Class.forName( "org.metastatic.jessie.provider.Jessie" );
Security.addProvider( ( Provider )clazz.newInstance() );
URL url = new URL( "https://www.paypal.com/" );
// Ok but produce java.io.IOException: malformed chunk-size
// URL url = new URL( "https://developer.paypal.com/" );
// Perfectly alright
// URL url = new URL( "https://www.amazon.com/" );
// URL url = new URL( "https://adwords.google.com/select/Login" );
URLConnection uc = url.openConnection();
uc.setUseCaches( false );
uc.setDoOutput( true );
uc.setDoInput( false );
uc.setRequestProperty( "Connection", "Close" );
BufferedReader in = new BufferedReader( new InputStreamReader(
uc.getInputStream() ) );
String s = "";
try {
while ( ( s = in.readLine() ) != null ) {
System.out.println( s );
}
} catch( EOFException ignore ) {}
in.close();
}
}
- [Jessie-discuss] Paypal https failure,
Eric Wong <=
Re: [Jessie-discuss] Paypal https failure, Eric Wong, 2007/11/27