[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-ssl] POSTing with HTTPS Connection....

Hey folks,

Got a problem with POSTS using SILKv3b2.... They do no appear to work...

Here is what I do after I get the HttpsURLConnection (var is huc):

I set up the HttpsURLConnection correctly with a TrusDecider and all the
correct info...

URLConnection getURLConnection(URL u)
   URLConnection ur = u.openConnection();
   // Return the URLConnection if it is not a HttpsURLConnection
   if (!(ur instanceof HttpURLConnection))
      return ur;

   // Cast to a HttpsURLConnection
   HttpsURLConnection huc = (HttpsURLConnection)uc;
   // Create a new Client Context
   SSLClientContext scc = new SSLClientContext();
   // Set allowed Protocols
   // Set he pre-seeded Random generator
   // Set the allowed Cipher Suites
   // Set the Trust Decider
   scc.setTrustDecider(new MyTrustDecider());
   // Set the Context...
   return huc;

Then I pass in a "http://" or "https://" URL instance and it gives me a
URLConnection back.
Independent of which type of URLConnection I get back I follow the
procedure to post info to
the URL.

// u is either a "http://" or "https://"  URL
URLConnection = getURLConnection(u);

// set in and out enabled...
// Get the output stream
DataOutputStream out = new DataOutputStream(uc.getOutputStream());
// Read the response
int iCount = 0;
   while (true)
      String s;
      if ((s = bufferedreader.readLine()) == null)         
      System.out.println (">>"+s);
   System.out.println ("Read "+iCount+" lines");
catch (Exception e)
   System.out.println("IOException: " + e);

My server is set up (for testing purposes) to accept both Http and Https
connections. The 1st posted value, "BT_GIL" indicated the function to
call, in this case "GIL".

If I use a Http URL there are no problems. I get a Html Page back for
the function GIL, with the data that was posted.

When I use a HTTPS URL, it does not even find which function needs to be
called and returns a HTML page indicating that the Function requested is
UNKNOWN. In other words it never got the "BT_GIL" part of the post.

Is this a known problem???

To IAIK: I really need an answer on this, as my client is seriously
deciding on wether or not to use IAIK for SSL. If this does not work
then they will have to go elsewhere...



Gil Peeters
Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-ssl/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-ssl