So, there are a couple things going on here.
First, the JDK sets the default SSLSocketFactory the first time it's
asked for, which means that in the first scenario, both connections
will be using the JDK provider for TLS. The JDK provider uses the
highest-priority security provider for a lot of internal
implementation details, though, which means that in the second
connection you're going to be using the JDK TLS provider but Conscrypt
for various internal crypto operations, which is a weird
configuration, but should in theory work.
However, that configuration ends up failing, and it looks like what's
happening is the JDK TLS provider is asking for EC curve parameters
using an ECGenParameterSpec that has an OID in it. Conscrypt doesn't
support this: ECGenParameterSpec's documentation calls for using a
"standard name", which seems pretty clear to me that it should only be
called with a curve name (eg, "prime256v1") rather than an OID
("1.2.840.10045.3.1.7"), so Conscrypt doesn't accept OIDs. I would
consider this a bug in the JDK TLS provider, but they might argue that
"standard name" includes OIDs. If there's wide demand for this, we
could consider allowing OIDs in Conscrypt as well, but we haven't had
much call for that so far.
In any case, we definitely recommend that if you're going to use
Conscrypt you install it as soon as possible after starting your
program, so that you are sure to get Conscrypt set up properly for
everything you want to do.
- Adam
> --
> You received this message because you are subscribed to the Google Groups
> "conscrypt" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
conscrypt+...@googlegroups.com.
> To post to this group, send email to
cons...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/conscrypt/76d0437b-6ea2-4242-9f69-268cf5a696e0%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.