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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 17
    • Affects Version/s: None
    • Component/s: 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.

              Assignee:
              Valerie Peng
              Reporter:
              Valerie Peng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: