<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">+1<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 12 Jul 2017, at 15:51, Adam Petcher <<a href="mailto:adam.petcher@oracle.com" class="">adam.petcher@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class=""><p class="">I made a minor tweak to the test. I realized that the test will
still pass if the curve becomes supported in the future. I want
the test to fail in this case because it would no longer be
testing an unsupported curve.</p><p class="">latest webrev:
<a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~apetcher/8182999/webrev.02/">http://cr.openjdk.java.net/~apetcher/8182999/webrev.02/</a></p>
<br class="">
<div class="moz-cite-prefix">On 7/12/2017 10:42 AM, Vincent Ryan
wrote:<br class="">
</div>
<blockquote cite="mid:2B2884C3-0491-476F-A125-7E4BC2189EA2@oracle.com" type="cite" class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
Looks fine to me too.
<div class=""><br class="">
</div>
<div class="">We should investigate how best to support similar
behaviour for the SunPKCS11 provider.</div>
<div class="">To track this issue I’ve filed a related bug <a moz-do-not-send="true" href="https://bugs.openjdk.java.net/browse/JDK-8184290" class="">8184290</a>: SunPKCS11 throws ProviderException for
unsupported curves</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 10 Jul 2017, at 17:03, Seán Coffey <<a moz-do-not-send="true" href="mailto:sean.coffey@oracle.com" class="">sean.coffey@oracle.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Thanks for the update! Looks fine to me.<br class="">
<br class="">
Regards,<br class="">
Sean.<br class="">
<br class="">
On 10/07/17 16:13, Adam Petcher wrote:<br class="">
<blockquote type="cite" class="">New webrev: <a moz-do-not-send="true" href="http://cr.openjdk.java.net/%7Eapetcher/8182999/webrev.01/" class="">http://cr.openjdk.java.net/~apetcher/8182999/webrev.01/</a><br class="">
<br class="">
Yes, this is a good idea. I made this work by
printing out the value from
AlgorithmParameters.toString(), so hopefully that
means you should always get a useful string. At the
moment (with SunEC AlgorithmParameters), the string
prints the friendly name followed by the OID:<br class="">
<br class="">
Unsupported curve: brainpoolP256r1
(1.3.36.3.3.2.8.1.1.7)<br class="">
<br class="">
On 7/7/2017 4:12 PM, Seán Coffey wrote:<br class="">
<blockquote type="cite" class="">Adam,<br class="">
<br class="">
would it be useful to get the curve name in the
new exception ? I think it would help with future
debugging. Line 96 already gets the curve name if
we're dealing with ECGenParameterSpec instance. I
think the same approach could be applied to your
new code.<br class="">
<br class="">
Regards,<br class="">
Sean.<br class="">
<br class="">
<br class="">
On 07/07/2017 19:59, Adam Petcher wrote:<br class="">
<blockquote type="cite" class="">This is a bug fix
related to invalid curves in the SunEC provider.
During ECKeyPairGenerator.initialize(), the
provider only checks whether the curve is known,
but it doesn't check whether the curve is
actually supported by the native code. So the
call to generateKeyPair() can fail in the native
code and throw a ProviderException. This change
adds a new native method to check whether the
curve is supported. This method is called by
initialize(), which will set the state to
uninitialized and throw the expected exception
when the curve is not supported.<br class="">
<br class="">
JBS: <a moz-do-not-send="true" href="https://bugs.openjdk.java.net/browse/JDK-8182999" class="">https://bugs.openjdk.java.net/browse/JDK-8182999</a><br class="">
Webrev: <a moz-do-not-send="true" href="http://cr.openjdk.java.net/%7Eapetcher/8182999/webrev.00/" class="">http://cr.openjdk.java.net/~apetcher/8182999/webrev.00/</a><br class="">
<br class="">
</blockquote>
<br class="">
</blockquote>
<br class="">
</blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
<br class="">
</div>
</div></blockquote></div><br class=""></div></body></html>