You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i use this java called from PHP in apache in linux are ok but if use Apache in Windows not work.
if i run in command line the command work and sign but if i call the same command in shell_exec not work:
FINE Default property file doesn't exists.
FINE Default property file doesn't exists.
Exception in thread "main" java.lang.IllegalArgumentException: key length must be in range 32 to 448 bits
at org.bouncycastle.crypto.engines.BlowfishEngine.setKey(Unknown Source)
at org.bouncycastle.crypto.engines.BlowfishEngine.init(Unknown Source)
at org.bouncycastle.crypto.modes.CBCBlockCipher.init(Unknown Source)
at org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher.init(Unknown Source)
at net.sf.jsignpdf.JSignEncryptor.decrypt(JSignEncryptor.java:140)
at net.sf.jsignpdf.JSignEncryptor.decryptString(JSignEncryptor.java:156)
at net.sf.jsignpdf.BasicSignerOptions.getDecrypted(BasicSignerOptions.java:848)
at net.sf.jsignpdf.BasicSignerOptions.loadOptions(BasicSignerOptions.java:213)
at net.sf.jsignpdf.SignerOptionsFromCmdLine.loadCmdLine(SignerOptionsFromCmdLine.java:103)
at net.sf.jsignpdf.Signer.parseCommandLine(Signer.java:256)
at net.sf.jsignpdf.Signer.main(Signer.java:95)
When i use this java called from PHP in apache in linux are ok but if use Apache in Windows not work.
if i run in command line the command work and sign but if i call the same command in shell_exec not work:
Comand:
java -jar C:/xampp/htdocs/crontTask/pdfsigner/PDF_DigSert.jar -lpf C:/xampp/htdocs/crontTask/pdfsigner/settings_h --disable-acrobat6-layer-mode -ksp PASSWORD123# -d C:/xampp/htdocs/uploads/reports/ C:/xampp/htdocs/uploads/reports/3chart-1701098421.pdf
from shell_exec return this:
FINE Default property file doesn't exists.
FINE Default property file doesn't exists.
Exception in thread "main" java.lang.IllegalArgumentException: key length must be in range 32 to 448 bits
at org.bouncycastle.crypto.engines.BlowfishEngine.setKey(Unknown Source)
at org.bouncycastle.crypto.engines.BlowfishEngine.init(Unknown Source)
at org.bouncycastle.crypto.modes.CBCBlockCipher.init(Unknown Source)
at org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher.init(Unknown Source)
at net.sf.jsignpdf.JSignEncryptor.decrypt(JSignEncryptor.java:140)
at net.sf.jsignpdf.JSignEncryptor.decryptString(JSignEncryptor.java:156)
at net.sf.jsignpdf.BasicSignerOptions.getDecrypted(BasicSignerOptions.java:848)
at net.sf.jsignpdf.BasicSignerOptions.loadOptions(BasicSignerOptions.java:213)
at net.sf.jsignpdf.SignerOptionsFromCmdLine.loadCmdLine(SignerOptionsFromCmdLine.java:103)
at net.sf.jsignpdf.Signer.parseCommandLine(Signer.java:256)
at net.sf.jsignpdf.Signer.main(Signer.java:95)
the config file have this:
#Properties saved by PropertyProvider
#Mon Feb 17 16:19:38 GMT 2020
visibleSignature.img=
keystore.type=PKCS12
signature.reason=Certification
tsa.url=
enc.keystorePwd=34c1ac9edb4db642d4c63d3935425c87
inpdf.file=
keystore.keyIndex=0
signature.location= Portugal
enc.tsa.passwd=
tsa.cert.file=
certification.level=CERTIFIED_NO_CHANGES_ALLOWED
tsa.hash.algorithm=
keystore.password=PASSWORD123#
keystore.alias=alaias
visibleSignature.acro6layers=false
tsa.user=
proxy.port=80
visibleSignature.bgScale=-1.0
tsa.serverAuthn=NONE
ocsp.enabled=false
visibleSignature.l2text=$$NULL$$
visibleSignature.l4text=
visibleSignature.render=DESCRIPTION_ONLY
keystore.file=C:/xampp/htdocs/crontTask/pdfsigner/sign.pfx
right.screenReaders=false
signature.append=false
hash.algorithm=SHA1
pdf.encryption.publicKeyFile=
pdf.encryption=NONE
view.advanced=true
enc.pdfOwnerPwd=
enc.pdfUserPwd=
tsa.enabled=false
enc.tsa.cert.file=
outpdf.file=
proxy.type=DIRECT
visibleSignature.page=1
crl.enabled=false
store.passwords=true
visibleSignature.bgImg=
proxy.host=
tsa.policy=
visibleSignature.ury=32.40131
visibleSignature.lly=82.88709
right.assembly=false
visibleSignature.urx=765.7657
visibleSignature.llx=629.3448
visibleSignature.enabled=true
enc.keyPwd=
ocsp.serverUrl=
visibleSignature.l2textFontSize=6.0
enc.home=5ba191270a5a6529420faff74ca4e604f386e8c4d29d5193
tsa.cert.file.type=
right.fillIn=false
right.modify.annotations=false
signature.contact=
right.copy=false
right.printing=ALLOW_PRINTING
right.modify.contents=false
The text was updated successfully, but these errors were encountered: