Re: TLS 1.3 with Java 11

2019-07-12 Thread Koji Kawamura
Hi Oleg,

Thanks for your quick response as always.

After I upgraded JDK to 11.0.3, TLS 1.3 started working even with
HttpAsyncClient 4.1.3 and HttpCore 4.5.3.
Glad to know that the JDK issue has been fixed and back-ported.
https://bugs.openjdk.java.net/browse/JDK-8212885

Best,
Koji

On Thu, Jul 11, 2019 at 7:01 PM Oleg Kalnichevski  wrote:
>
> On Thu, 2019-07-11 at 16:19 +0900, Koji Kawamura wrote:
> > Hello,
> >
> > I found a comment on in the 5.0-BETA4 release note:
> >
> > * Resolved compatibility issues with TLS 1.3 engine shipped with Java
> > 11
> >   Contributed by Oleg Kalnichevski 
> >
> https://archive.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES-5.0.x.txt
> >
> > Is there any JIRA specifically addressing this issue?
> > I could only find this one, but the release note comment sounds like
> > there are others.
> > https://issues.apache.org/jira/browse/HTTPCLIENT-1967
> >
>
> The only one that truly matters is this one
>
> https://bugs.openjdk.java.net/browse/JDK-8212885
>
>
> > Also, I'd like to know if TLS 1.3 with Java 11 is (or will be?)
> > supported by HttpAsyncClient.
> >
>
> HttpAsyncClient 4.1.4 should be fully TLSv1.3 / Java11 compatible but
> one needs to upgrade its HttpCore dependency to version 4.4.11.
>
> Cheers
>
> Oleg
>
>
>
> -
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
>

-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



TLS 1.3 with Java 11

2019-07-11 Thread Koji Kawamura
Hello,

I found a comment on in the 5.0-BETA4 release note:

* Resolved compatibility issues with TLS 1.3 engine shipped with Java 11
  Contributed by Oleg Kalnichevski 
https://archive.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES-5.0.x.txt

Is there any JIRA specifically addressing this issue?
I could only find this one, but the release note comment sounds like
there are others.
https://issues.apache.org/jira/browse/HTTPCLIENT-1967

Also, I'd like to know if TLS 1.3 with Java 11 is (or will be?)
supported by HttpAsyncClient.

Best,
Koji

-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Re: HttpAsyncRequestProducer is not sending content fully with HTTPS

2016-08-13 Thread Koji Kawamura
Hi Oleg,

Thank you very much for your quick reply.

I looked at the example, ZeroCopyPost.java and its super class
BaseZeroCopyRequestProducer.
As you described, produceContent can be called multiple times when
underlying I/O session gets ready to send more data.

I wrote a loop code inside the produceContent, and it was the cause of
this issue.
After I fixed the code to let the framework handle that, data is sent correctly!

I updated the Gist with the corrected implementation.
https://gist.github.com/ijokarumawak/6027ca64eb28fd143acd173d799ffd48

Thanks again for this great product and your help :)


Koji

> On Fri, 2016-08-12 at 13:02 +0900, Koji Kawamura wrote:
> > Hello httpclient community,
> >
> > I'm having an issue with HTTPS and HttpAsyncRequestProducer
> > combination, so I would like to ask for some help.
> >
> > I've been using httpclient HttpAsyncRequestProducer to make a
> > non-blocking HTTP POST request.
> > My use case consists of two threads, one is pushing data to a channel,
> > and the other is reading streaming data from that channel, then
> > producing a POST chunked content.
> >
> > It's been working wonderfully with HTTP, but when I tested with HTTPS,
> > noticed it only sends first few KB of data, even if I'm using the same
> > client code.
> > If the whole data size is less that about 8KB, it works, but bigger
> > than that, further data is not sent.
> >
> > Debugging around AbstractContentEncoder and SSLIOSession, but I
> > couldn't find the exact cause of this behavior yet. But found that
> > Line Buffer Size is being 8192, it seems this is the threshold of the
> > behavior.
> >
> > Wondering if calling ContentEncoder.write(ByteBuffer) multiple times
> > causes this issue. It look like once about 8KB data is sent, further
> > write() doesn't write anything, returning 0 even if the buffer has
> > remaining data.
> >
>
> Koji
>
> This is how non-blocking I/O works. If the underlying I/O session is
> unable to accept any more input the write operation returns immediately
> with zero bytes written instead of blocking the thread. Once the I/O
> session can accept more input it will trigger #produceContent event
> again and the producer can produce more data. Please take a look at data
> producers shipped with the library as reference.
>
> Hope this helps
>
> Oleg
>
> > To illustrate this issue, I wrote a simple test case which POST data
> > via HTTP and HTTPS. The issue is reproducible.
> > https://gist.github.com/ijokarumawak/6027ca64eb28fd143acd173d799ffd48
> >
> > Has anyone encountered similar issue? I searched web and JIRA but
> > couldn't find similar issue..
> > Any advice or insight would be appreciated,
> >
> > Thanks!
> > Koji
> >
> > -
> > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> > For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> >
>
>
>
> -
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org

-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org