Expand my Community achievements bar.

EncryptPDFUsingCertificates Error

Avatar

Former Community Member

I would like to Invoke the web service by .NET web reference. It works fine for others service but the encryptPDFUsingCertificates() in EncryptionService returns error.

I generate a certificate by keytool(JAVA 7) with key usage for encryption, and following the code in http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000057.html

After compiles and runs, it shows error.

com.adobe.livecycle.encryption.client.EncryptionServiceException: Generic PDFEncryptionException--problem in PDF Encryption API: Unable to build recipients -- Operation failed(error code bin: 259, hex: 0x103) -- (error code bin: 1, hex: 0x1)
Caused By: Generic PDFEncryptionException--problem in PDF Encryption API: Unable to build recipients -- Operation failed(error code bin: 259, hex: 0x103)(ExceptionHandler.java49)
Caused By: Unable to build recipients(SecurityLockPKIImpl.java103)
Caused By: Unable to encode RecipientInfo.(null-1)

Could anyone can help on this? I hang on this for days.

Many thanks!!!

Raymond

2 Replies

Avatar

Level 8

If you seperate out the .Net access and try to do the same operation via a workflow do you get the same error?

The other thing that may be causing you an issue is the use of Java 7 for the keytool.  LiveCycle 8.2 only supported Java 5.   I'm not sure if this is causing your issus, but it may be something to look into.

Avatar

Former Community Member

First, thanks for you reply.

I call the web service again through java but the error still exists.

If I use Java 5 to generate the certificate, I cannot generate one that have "Key Usage" extension on the certificate.

And if I use that certificate for encryption, it causes another error that is "Incorrect Key Usage".