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

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



POSTing seems to be broken in the Jigsaw library, which we use for HTTP.
We will try to fix this for 3.0 release but given that this is not a
problem in our own code I cannot promise anything.

Regards,

 Andreas Sterbenz              mailto:Andreas.Sterbenz@iaik.tu-graz.ac.at

-----Ursprüngliche Nachricht-----
Von: Gil Peeters <gil@online.be>
An: IAIK SSL <iaik-ssl@iaik.tu-graz.ac.at>
Gesendet: Montag, 08. November 1999 17:18
Betreff: [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
>    scc.setAllowedProtocolVersions(SSLContext.VERSION_SSL30,
> Context.VERSION_SSL30);
>    // Set he pre-seeded Random generator
>    scc.setRandomGenerator(rAll);
>    // Set the allowed Cipher Suites
>    scc.setEnabledCipherSuites(a);
>    // Set the Trust Decider
>    scc.setTrustDecider(new MyTrustDecider());
>    // Set the Context...
>    huc.setSSLContext(scc);
>    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...
> uc.setDoOutput(true);
> uc.setDoInput(true);
> // Get the output stream
> DataOutputStream out = new DataOutputStream(uc.getOutputStream());
> out.writeBytes("BT_GIL=D1&X=XXX&Y=YYY&Z=ZZZ");
> out.close();
> // Read the response
> int iCount = 0;
> try
> {
>    while (true)
>    {
>       String s;
>       if ((s = bufferedreader.readLine()) == null)
>

>          break;
>       }
>       System.out.println (">>"+s);
>       iCount++;
>    }
>    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...
>
> THANKS!!!!
>
> G.
>
> --
> -----------------------------------------------------------------------
> 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
>
>
>


smime.p7s