Hi All,
I am using Encryption Service to unlock a pdf file and add reader extension rights to it.
API of the Encryption Service: unlockPDFUsingCredential(encryptDoc, keyAlias)
key Alias- The input value is the friendly name i.e. alias of the key present in the IE key store.
This call fails with Error Message :
ALC-ENC-100-013 Could not find credential from alias.
Caused By: findCredentialByAlias: no Local or HSM credential found -- No such object in the store(error code bin: 262, hex: 0x106)(CredentialServiceImpl.java466)
Note: The Acrobat pro is able to decrypt the encrypted doc but my LC call is failing.
Encryption is done using this call:
pkiIdentities -- This list has a recipeint which has a X509 cert (whose private key is used to unlock).
encryptPDFUsingCertificates(inDoc,pkiIdentities, certOptionsSpec);
Questions:
1) The API gives no information about the location of the keyStore where it is getting the handle of the key using the alias.
2) I looked at the removePDFCertificateSecurity(encryptDoc, keyAlias) API. That page describes the key should be rpesent in the Live cycle Store.
Note: A private key is stored in the LiveCycle Trust Store. When a certificate is placed there, an alias v...specified.
How can I get a handle to LC Trust Store.
If possible please provice a sample code to do unlocking of the encrupted PDF.
--Thanks
greenday