Coder Social home page Coder Social logo

alessioscarfone / java-digital-signature Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 13.0 19.98 MB

Java command line tool for digital signature with PKCS#11 token.

License: GNU General Public License v3.0

Java 100.00%
cades pades dss java esignature signature pkcs11 cli-tool digital-signature

java-digital-signature's Introduction

Hello. 👋

LinkedIn CodePen

💻 Tech Stack:

JavaScript TypeScript HTML5 CSS3 SASS

Angular RxJS

React NextJS React Native Redux

Node.js Express.js NestJS Apollo-GraphQL Java Spring

MySQL PostgreSQL

Redis Docker Git

java-digital-signature's People

Contributors

alessioscarfone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

java-digital-signature's Issues

last --page

Do it is possible to set the last page in the --page parameter?

Exception in thread "main"

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.

help to resolve the problem

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.
PdfSigning

Token access failed

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

Long Term Validation

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.

profili di conformance

Quale profili di conformance definiti nello standard CAdES supporta?

  • CAdES-BES (Basic Electronic Signature)
  • CAdES-T (Timestamped)
  • CAdES-C (Complete),

card pin in driver gui

When javasign query for a card sign, it is insert from driver gui.
Do it is possible same with card pin instead of cli?

Utilizzo sul Mac

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

-vi Parameter Error.

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.

More files to sign

Do it is possible to sign more documents without to repeat sign pin?
I set more number in driver gui sign but not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.