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

SunJCE provider may throw unexpected NPE for un-initialized AES KW/KWP Ciphers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 17
    • None
    • security-libs
    • None
    • 17
    • b27

        When using the AES KW and KWP ciphers from SunJCE provider, it is observed that unexpected NPE occur calling getIV() and getParameters() if init() is not yet called. When the cipher object has not yet been initialized with init(), the internal iv field has value 'null'. The getIV() should check for null value (meaning iv has not been set as no init() call takes place) before cloning the iv. As for getParameters(), it should also check for null iv and return a default parameters as the javadoc suggested.

              valeriep Valerie Peng
              valeriep Valerie Peng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: