jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java
changeset 297 bec12c857972
parent 296 a26e4ea2ca63
child 5291 d6df082f6524
equal deleted inserted replaced
296:a26e4ea2ca63 297:bec12c857972
   815             throws ShortBufferException, IllegalBlockSizeException {
   815             throws ShortBufferException, IllegalBlockSizeException {
   816         long errorCode = e.getErrorCode();
   816         long errorCode = e.getErrorCode();
   817         if (errorCode == CKR_BUFFER_TOO_SMALL) {
   817         if (errorCode == CKR_BUFFER_TOO_SMALL) {
   818             throw (ShortBufferException)
   818             throw (ShortBufferException)
   819                     (new ShortBufferException().initCause(e));
   819                     (new ShortBufferException().initCause(e));
   820         } else if (errorCode == CKR_DATA_LEN_RANGE) {
   820         } else if (errorCode == CKR_DATA_LEN_RANGE ||
       
   821                    errorCode == CKR_ENCRYPTED_DATA_LEN_RANGE) {
   821             throw (IllegalBlockSizeException)
   822             throw (IllegalBlockSizeException)
   822                     (new IllegalBlockSizeException(e.toString()).initCause(e));
   823                     (new IllegalBlockSizeException(e.toString()).initCause(e));
   823         }
   824         }
   824     }
   825     }
   825 
   826