alessioscarfone / java-digital-signature Goto Github PK
View Code? Open in Web Editor NEWJava command line tool for digital signature with PKCS#11 token.
License: GNU General Public License v3.0
Java command line tool for digital signature with PKCS#11 token.
License: GNU General Public License v3.0
Do it is possible to set the last page in the --page parameter?
Windows 10
openjdk version "21.0.1" 2023-10-17 LTS
When try:
"%ProgramFiles%\Java\openJRE\bin\java.exe" -jar signer.jar --driver %SystemRoot%\system32\mydriver.dll -i
I get:
Use driver located in: C:\WINDOWS\system32\mydriver.dll
Password:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.IllegalAccessError: class eu.europa.esig.dss.token.Pkcs11SignatureToken (in unnamed module @0x35f983a6) cannot access class sun.security.pkcs11.SunPKCS11 (in module jdk.crypto.cryptoki) because module jdk.crypto.cryptoki does not export sun.security.pkcs11 to unnamed module @0x35f983a6
at eu.europa.esig.dss.token.Pkcs11SignatureToken.installProvider(Pkcs11SignatureToken.java:154)
at eu.europa.esig.dss.token.Pkcs11SignatureToken.getProvider(Pkcs11SignatureToken.java:130)
at eu.europa.esig.dss.token.Pkcs11SignatureToken.getKeyStore(Pkcs11SignatureToken.java:174)
at eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection.getKeys(AbstractKeyStoreTokenConnection.java:24)
at com.unical.digitalsignature.Main.showInfo(Main.java:132)
at com.unical.digitalsignature.Main.main(Main.java:92)
... 3 more
how to solve?
grazie.
Hi,
After pdf signing( PADES) with my own driver and hardware token, I am getting this error in signature verification in Adobe Acrobat. Error during the signature verification. Error Encountered while validating. Error Encountered while BER Decoding. in a detailed explanation of the error it is stated that the hash and encryption algorithm is not available. my certificate is completely ok. I have changed your code a little because it wasn't applicable in that way .but there seems to be some problem with your code have you please yourself tested your code on a pdf signing? I think that there is a problem with the certificate parsing
I would have been appreciating if you help me.
Windows 10 pro 64 bit
Java version 1.8.0_291
Usb token di aruba correttamente installato
Quando viene chiesto l'inserimento della password digitando "java -jar signed.jar -i" inserisco il codice pin della smartcard
Viene restituito l'errore "token acccess failed"
Lo stesso errore quando cerco di siglare con l'estensione chrome.
Cosa guardare per analizzare meglio la problematica?
Grazie
Ciao e possibile aggiungere il supporto per la firma XAdES ?
Buonasera, è possibile firmare in formato PADES-LTV (validazione a lungo termine)?
Ho visto che non supporti più il progetto in quanto non hai più a disposizione un token. Ma ho visto anche che c'è un branch "signature-validation-test" che mi sembra vada in quella direzione.
This project seems to exclusively read from a card reader. Is there anyway to read a cert from a file?
Quale profili di conformance definiti nello standard CAdES supporta?
When javasign query for a card sign, it is insert from driver gui.
Do it is possible same with card pin instead of cli?
Salve anzitutto complimenti per il software.
Volevo segnalare che su Mac Os Catilina, utilizzando Token Usb Key4-c ed eseguendo tutte le istruzioni mi da il seguente errore
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.NoSuchMethodError: sun.security.pkcs11.SunPKCS11.(Ljava/io/InputStream;)V
at eu.europa.esig.dss.token.Pkcs11SignatureToken.installProvider(Pkcs11SignatureToken.java:154)
at eu.europa.esig.dss.token.Pkcs11SignatureToken.getProvider(Pkcs11SignatureToken.java:130)
at eu.europa.esig.dss.token.Pkcs11SignatureToken.getKeyStore(Pkcs11SignatureToken.java:174)
at eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection.getKeys(AbstractKeyStoreTokenConnection.java:24)
at com.unical.digitalsignature.Main.sign(Main.java:191)
at com.unical.digitalsignature.Main.main(Main.java:113)
... 5 more
working:
java.exe -jar signer.jar --driver "C:\Windows\system32\mydriver.dll" --password 12345678 pades -v "c:\Temp\file.pdf" -o "c:" -pv T -ph R
not working:
java.exe -jar signer.jar --driver "C:\Windows\system32\mydriver.dll" --password 12345678 pades -vi "c:\Temp\file.pdf" -o "c:" -pv T -ph R
Parameter Error.
or
No File input
in -vi have to specify a image file
it not specified in help.
Do it is possible to sign more documents without to repeat sign pin?
I set more number in driver gui sign but not work.
Can you add the Xades signature support ?
P.S. Ty for this little project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.