[prev in list] [next in list] [prev in thread] [next in thread]
List: bouncycastle-crypto-dev
Subject: [dev-crypto] Patch for using Luna HSM Java provider
From: Tomas Gustavsson <tomasg () primekey ! se>
Date: 2008-02-25 16:10:41
Message-ID: 47C2E881.8070903 () primekey ! se
[Download RAW message or body]
Hi,
To be able to use Luna HSM for decrypting CMS message the following
patch is needed in KeyTransRecipientInformation.java, line 130 in 1.38.
(only a new catch is needed since Luna throws another exception when it
faile unwrapping)
} catch (ProviderException e) // some providers do not support UNWRAP
{
keyCipher.init(Cipher.DECRYPT_MODE, key);
sKey = new
SecretKeySpec(keyCipher.doFinal(encryptedKey), alg);
}
It also needs an:
import java.crypto.ProviderException
off-course...
Regards,
Tomas
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic