Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Sample how to use DSS Facade from Java KSeF Client

Generating test electronic stamp

openssl req -newkey rsa:2048 -nodes -keyout key.pem -out certificate.csr -subj "/C=PL/ST=Mazowieckie/L=Warszawa/O=test-org/OU=IT/CN=test klient/emailAddress=kowalski@example.com/2.5.4.97=VATPL-2932110194"
openssl x509 -signkey key.pem -in certificate.csr -req -days 3650 -out certificate.pem
openssl pkcs12 -export -out stamp.p12 -inkey key.pem -in certificate.pem

Signer implementation

For test, when do you have stamp in p12 file

P12Signersigner = newP12Signer(newKeyStore.PasswordProtection("123ewqasd".toCharArray()), newFile(tokenFile));

For Demo and Prod, when you are using real electronic stamp or digital signature

PasswordInputCallbackcallback = newPrefilledPasswordCallback(newKeyStore.PasswordProtection("......".toCharArray()));
CardSignersigner = newCardSigner("/opt/proCertumSmartSign", "cryptoCertum3PKCS", 1, callback);

You need "driver" for your crypto device. The first param points to a path where a library resides, and the second one, point file name without an extension.

Library name for various suppliers:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages