Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257932

ECDHKeyAgreement.generateSecret() should throw the proper exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: security-libs
    • Labels:

      Description

      If the public or private key has has points that are not on the curve, ECDHKeyAgreement.generateSecret() will throw a ProviderException.
      It should be a InvalidKeyException, which is a subclass of the GeneralSecurityException.

      The KeyAgreement.generateSecret() spec says IllegalStateException are to be thrown. The EC method does not wrap previous exception.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ascarpino Anthony Scarpino
                Reporter:
                ascarpino Anthony Scarpino
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: