RFR: 8258833: Cancel multi-part cipher operations in SunPKCS11 after failures [v3]

Martin Balao mbalao at openjdk.java.net
Fri Jan 8 20:01:12 UTC 2021


> When a multi-part cipher operation fails in SunPKCS11 (i.e. because of an invalid block size), we now cancel the operation before returning the underlying Session to the Session Manager. This allows to use the returned Session for a different purpose. Otherwise, an CKR_OPERATION_ACTIVE error would be raised from the PKCS#11 library.
> 
> The jdk/sun/security/pkcs11/Cipher/CancelMultipart.java regression test is introduced as part of this PR.
> 
> No regressions found in jdk/sun/security/pkcs11.

Martin Balao has updated the pull request incrementally with two additional commits since the last revision:

 - Documentation note explaining why Cancel Operation is not required in P11Signature
 - Cancel Operation should not fail if the operation is not initialized in the token.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1901/files
  - new: https://git.openjdk.java.net/jdk/pull/1901/files/91363c16..5bf00de0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1901&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1901&range=01-02

  Stats: 12 lines in 2 files changed: 12 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1901.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1901/head:pull/1901

PR: https://git.openjdk.java.net/jdk/pull/1901


More information about the security-dev mailing list