3

I'm trying to sign a pdf using the following...

<cfpdf action="sign"
source="#expandPath('.')#\tempFiles\unsigned\form - unsigned.pdf"
destination="#expandPath('.')#\tempFiles\signed\form - signed.pdf"
keystore="C:\Program Files (x86)\Java\jre1.8.0_121\bin\KeyStore.jks" 
keystorepassword="testpw"
keyalias="mystore"
overwrite="true" pages="1" height="100"
width="100" position="100,100" author="false"/>

I created the keystore using the keytool.exe but I get an error saying

Keystore file C:\Program Files (x86)\Java\jre1.8.0_121\bin\KeyStore.jks does not exist.

But it does exist... I'm hoping someone can help me with what I'm doing wrong.

Thanks in advance.

malibu65k
  • 95
  • 6
  • Are you sure that file exists? The default Java keystore is normally a file called `cacerts` and is stored under the `C:\Program Files (x86)\Java\jre1.8.0_121\lib\security\` folder. If the file does indeed exist then perhaps your ColdFusion service does not have access to it. – Miguel-F Apr 06 '17 at 17:31
  • Keystore.jks does exist, I created it and it's in the folder, I looked. Also I have a file called cacert, no extention just cacert. It's in the folder you indicated. I tried that as well and I get the same error message that it doesn't exist either. – malibu65k Apr 06 '17 at 17:50
  • Does the Windows user account that the ColdFusion service is running under have security access to the `C:\Program Files (x86)\Java\jre1.8.0_121\bin\KeyStore.jks` file? Are you using ColdFusion sandbox security? If the file is there then I would assume it is a user rights issue. – Miguel-F Apr 06 '17 at 18:48
  • (Edit) *...it's in the folder, I looked* So as not to overlook the obvious, does "looked" mean you used something other than just your eyes to verify the file exists (and confirmed that is the JVM CF is using in the CF Admin)? :) Also, what is the complete error message? Sometimes a different (nested) cause of an error is listed further down in the stack trace. – Leigh Apr 06 '17 at 19:31

0 Answers0