Force bad padding exception in TestPKCS5PaddingError.java at all times

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 27
    • Affects Version/s: 27
    • Component/s: security-libs

      Currently implementation of the test relies on changing the last byte of the cypher to mess up the padding lines. However after reading though the pkcs5 rfc, if the last bit is already 0 the padding will not be taken into account and the result will have no error but will be a garbage output. Current test doesn't take this into account.

      The fix should encode the test text without padding and decode with padding to make sure that the bad padding exception is thrown.

            Assignee:
            Mikhail Yankelevich
            Reporter:
            Mikhail Yankelevich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: