How to configure in ubuntu 14.04?

2,258 views
Skip to first unread message

Murilo Ns

unread,
Jun 5, 2014, 4:58:24 PM6/5/14
to jsig...@googlegroups.com
hello people,
Sorry for my english
How can I configure the linux JSignPdf
I use the e-token Aladdin 72k, and licenses are not displayed

I already removed the file comment .conf / conf.properties
pkcs11config.path = conf/pkcs11.cfg

And I modified the library ./conf/pkcs11.cfg file to:
library = / lib/libeToken.so.8.3.34

But he does not find my token certificates. In firefox certificates are normally presented.

My client is linux 3.8.34 SafeNet
Ubuntu 14.04 LTS use


Does anyone have a step-by-step?
thank you

Josef Cacek

unread,
Jun 6, 2014, 2:01:33 AM6/6/14
to JSignPdf forum
Are you sure the library path is correct? I see a space there after
the fist slash.
I would expect something like:
library = /usr/local/lib/libetpkcs11.so

(looking at https://wiki.nikhef.nl/grid/Using_an_Aladdin_eToken_PRO_to_store_grid_certificates)

-- jc
> --
> You received this message because you are subscribed to the Google Groups
> "JSignPdf" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jsignpdf+u...@googlegroups.com.
> To post to this group, send email to jsig...@googlegroups.com.
> Visit this group at http://groups.google.com/group/jsignpdf.
> For more options, visit https://groups.google.com/d/optout.

Rajendra Prasad

unread,
Jun 8, 2014, 12:04:09 PM6/8/14
to jsig...@googlegroups.com
Are you able to see certificate in safenet client application. If safenet driver installed successfully the certificate will show in client application. Further you may need to change some code in the jsignpdf to work in Ubuntu linux. Please read my post https://groups.google.com/forum/#!topic/jsignpdf/FWdLqVIWGKo 
regards
Rajendrarajsri

Murilo Ns

unread,
Jun 9, 2014, 8:26:39 AM6/9/14
to jsig...@googlegroups.com
Josef,

My path library = /lib/libeToken.so.8.3.34

The JSignPdf shows PKCS11 for selection, but when you click Load keys, it does not load the certificate that is in the token and displays the screen attached error even filling the password field


The same path is configured in mozilla and works normally. However, for JsignPdf the token is not recognized


The same certificate is functional in Windows



Rajendra,
I can see the certificate in SafeNet, and use it in Mozilla
I saw your post but didn't work

Rajendra Prasad

unread,
Jun 9, 2014, 11:56:14 AM6/9/14
to jsig...@googlegroups.com
Ok so rename the original file "JSignPdf.jar" to something else and place the attached jar file at the same location. It has little modificaton in the original code. It works for me.
Rajendra
JSignPdf.jar

Murilo Ns

unread,
Jun 9, 2014, 1:13:36 PM6/9/14
to jsig...@googlegroups.com
Error :(
# java -jar JSignPdf.jar
DEBUG Relaxing SSL security.
Exception in thread "main" java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfDictionary
    at net.sf.jsignpdf.SignPdfForm.<init>(SignPdfForm.java:79)
    at net.sf.jsignpdf.Signer.main(Signer.java:144)
Caused by: java.lang.ClassNotFoundException: com.lowagie.text.pdf.PdfDictionary
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 2 more

Josef Cacek

unread,
Jun 10, 2014, 3:11:10 PM6/10/14
to JSignPdf forum
Murilo,

what does this command print, if you use it in console?

java -jar JSignPdf.jar -lk -kst PKCS11 -ksp [yourPIN]

-- josef

Murilo Ns

unread,
Jun 10, 2014, 4:50:49 PM6/10/14
to jsig...@googlegroups.com

root@pc-ti:/home/murilo/Documentos/pc-murilo/instaladores-linux/jsignpdf-1.5.2# java -jar JSignPdf.jar -lk -kst PKCS11 -ksp PASSWORD
DEBUG Relaxing SSL security.
INFO  Getting keystore type instance: PKCS11
java.io.IOException: load failed
    at sun.security.pkcs11.P11KeyStore.engineLoad(P11KeyStore.java:763)
    at java.security.KeyStore.load(KeyStore.java:1433)
    at net.sf.jsignpdf.utils.KeyStoreUtils.loadKeyStore(KeyStoreUtils.java:363)
    at net.sf.jsignpdf.utils.KeyStoreUtils.getKeyAliases(KeyStoreUtils.java:106)
    at net.sf.jsignpdf.Signer.main(Signer.java:119)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 0x81000001
    at sun.security.pkcs11.wrapper.PKCS11.C_GetAttributeValue(Native Method)
    at sun.security.pkcs11.P11KeyStore.mapLabels(P11KeyStore.java:2277)
    at sun.security.pkcs11.P11KeyStore.engineLoad(P11KeyStore.java:755)
    ... 4 more
Exception in thread "main" java.lang.NullPointerException: Keystore was not loaded succesfully. Check if the keystore type, path and password are valid.
    at net.sf.jsignpdf.utils.KeyStoreUtils.getKeyAliases(KeyStoreUtils.java:108)
    at net.sf.jsignpdf.Signer.main(Signer.java:119)



OR
root@pcl-ti:/home/murilo/Documentos/pc-murilo/instaladores-linux/jsignpdf-1.5.2# java -jar JSignPdf.jar

DEBUG Relaxing SSL security.
Exception in thread "main" java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfDictionary
    at net.sf.jsignpdf.SignPdfForm.<init>(SignPdfForm.java:79)
    at net.sf.jsignpdf.Signer.main(Signer.java:144)
Caused by: java.lang.ClassNotFoundException: com.lowagie.text.pdf.PdfDictionary
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 2 more






Josef Cacek

unread,
Jun 10, 2014, 5:01:24 PM6/10/14
to JSignPdf forum
This is suspicious:

Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 0x81000001
    at sun.security.pkcs11.wrapper.PKCS11.C_GetAttributeValue(Native Method)
    at sun.security.pkcs11.P11KeyStore.mapLabels(P11KeyStore.java:2277)
    at sun.security.pkcs11.P11KeyStore.engineLoad(P11KeyStore.java:755)
    ... 4 more

I think it could be a Java bug. Could you try it also with another Java versions? (OpenJDK 1.6 & 1.7, Oracle JDK 1.6, 1.7)

Thanks,
-- josef

Rajendra Prasad

unread,
Jun 12, 2014, 8:28:01 AM6/12/14
to jsig...@googlegroups.com
I have just tried JSignPdf1.5.3 on ubuntu 14.04 with Aladdin eToken and found working fine with java version "1.7.0_60" .

Murilo Ns

unread,
Jun 12, 2014, 11:12:48 AM6/12/14
to jsig...@googlegroups.com
With java:
java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

JSignPdf version: 1.5.3

root@pc-ti:/home/murilo/Documentos/pc-murilo/instaladores-linux/jsignpdf-1.5.3# java -jar JSignPdf.jar -lk -kst PKCS11 -ksp PASSWORD
DEBUG Relaxing SSL security.
DEBUG Registering SunPKCS11 provider from configuration in conf/pkcs11.cfg
DEBUG SunPKCS11 provider registered with name SunPKCS11-JSignPdf

INFO  Getting keystore type instance: PKCS11
java.io.IOException: load failed
    at sun.security.pkcs11.P11KeyStore.engineLoad(P11KeyStore.java:782)
    at java.security.KeyStore.load(KeyStore.java:1214)
    at net.sf.jsignpdf.utils.KeyStoreUtils.loadKeyStore(KeyStoreUtils.java:352)
    at net.sf.jsignpdf.utils.KeyStoreUtils.getKeyAliases(KeyStoreUtils.java:106)
    at net.sf.jsignpdf.Signer.main(Signer.java:128)

Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 0x81000001
    at sun.security.pkcs11.wrapper.PKCS11.C_GetAttributeValue(Native Method)
    at sun.security.pkcs11.P11KeyStore.mapLabels(P11KeyStore.java:2306)
    at sun.security.pkcs11.P11KeyStore.engineLoad(P11KeyStore.java:766)

    ... 4 more
Exception in thread "main" java.lang.NullPointerException: Keystore was not loaded succesfully. Check if the keystore type, path and password are valid.
    at net.sf.jsignpdf.utils.KeyStoreUtils.getKeyAliases(KeyStoreUtils.java:108)
    at net.sf.jsignpdf.Signer.main(Signer.java:128)

Rajendra Prasad

unread,
Jun 13, 2014, 3:14:16 AM6/13/14
to jsig...@googlegroups.com
root@test:~/Desktop/jsignpdf-1.5.3#  java -jar JSignPdf.jar -lk -kst PKCS11 -ksp eToken1234

DEBUG Relaxing SSL security.
DEBUG Registering SunPKCS11 provider from configuration in conf/pkcs11.cfg
DEBUG SunPKCS11 provider registered with name SunPKCS11-JSignPdf
INFO  Getting keystore type instance: PKCS11
INFO  Getting key alias
INFO  Key aliases in the keystore:
jsign
DEBUG Removing security provider with name SunPKCS11-JSignPdf
root@test:~/Desktop/jsignpdf-1.5.3# java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode)
root@test:~/Desktop/jsignpdf-1.5.3#
Try using java -jar JSignPdf.jar only. in the gui put the password and try to load the key.


On Friday, June 6, 2014 2:28:24 AM UTC+5:30, Murilo Ns wrote:

Murilo Ns

unread,
Jul 1, 2014, 3:27:03 PM7/1/14
to jsig...@googlegroups.com

I downloaded the new version and tested.
The certificate is recognized, but when selecting the PDF source file, the JSignPDF is closed, and displays the following error:

root@pc-ti:/home/murilo/Documentos/pc-murilo/instaladores-linux/jsignpdf-1.6.0# java -jar JSignPdf.jar

DEBUG Relaxing SSL security.
DEBUG Registering SunPKCS11 provider from configuration in conf/pkcs11.cfg
DEBUG SunPKCS11 provider registered with name SunPKCS11-JSignPdf
INFO  Getting keystore type instance: PKCS11

(java:7292): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkWindow'

(java:7292): Gtk-CRITICAL **: IA__gtk_window_set_modal: assertion 'GTK_IS_WINDOW (window)' failed

(java:7292): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed

(java:7292): Gtk-CRITICAL **: IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
INFO  Getting key alias
The program 'java' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 5975 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Josef Cacek

unread,
Jul 1, 2014, 4:07:51 PM7/1/14
to JSignPdf forum
Could you share what "java -version" says?
-- jc

Rajendra Prasad

unread,
Jul 2, 2014, 5:56:07 AM7/2/14
to jsig...@googlegroups.com
OK. Kindly run this script, this should resolve the issue.
/bin/cp -f /etc/xdg/menus/gnome-applications.menu /etc/xdg/menus/applications.menu
dpkg -i libccid_1.4.15-1_i386.deb     
dpkg -i libhal1_0.5.14-8ubuntu1_i386.deb
dpkg -i pcscd_1.8.10-1ubuntu1_i386.deb
dpkg -i opensc_0.13.0-3ubuntu4_i386.deb
dpkg -i hal-info_20091130-1_all.deb
dpkg -i libhal-storage1_0.5.14-8ubuntu1_i386.deb
dpkg -i libqt4-core_4.8.5+git192-g085f851+dfsg-2ubuntu4_i386.deb
dpkg -i libqt4-gui_4.8.5+git192-g085f851+dfsg-2ubuntu4_i386.deb
dpkg -i SafenetAuthenticationClient-8.3.34-0_i386.deb

Certainly these files should be on your machine.
regds
Rajendra


On Friday, June 6, 2014 2:28:24 AM UTC+5:30, Murilo Ns wrote:

Murilo Ns

unread,
Jul 2, 2014, 11:05:54 AM7/2/14
to jsig...@googlegroups.com
Josef

# java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

Josef Cacek

unread,
Jul 2, 2014, 4:21:42 PM7/2/14
to JSignPdf forum
Could you try it with Oracle Java 7 and/or OpenJDK (6,7)?

My configuration (Lubuntu 14.04 x86) works with Java 1.8.0_05, but
it's 32bit and I don't have card reader with PKCS11 configured.

-- jc

Shah Mohsin wahed

unread,
Aug 26, 2014, 3:58:13 AM8/26/14
to jsig...@googlegroups.com
Hi Everyone,


I am currently looking for SafenetAuthenticationClient-8.3 386 and x64 debian file to install it on my ubuntu 14.04. Do you know where I could find it or if someone be kind to send them to me :)

regards

Shah

Murilo Ns

unread,
Aug 26, 2014, 8:16:03 AM8/26/14
to jsig...@googlegroups.com
Shah,

http://www.proteq.com.br/download/sac/sac8.3_linux.zip

I installed in the following order:
1- libhal1_0.5.14-8_amd64.deb  (dependence)
2 - libhal-storage1_0.5.14-8ubuntu2_amd64.deb

(dependence)

3 - /SAC 8.3 Linux/Installation/Standard/DEB# dpkg -i SafenetAuthenticationClient-8.3.34-0_amd64.deb


After install:
Manual attachment look at the item 7 to use in Mozilla

Ok?
Manual.pdf

Shah Mohsin wahed

unread,
Aug 26, 2014, 6:57:13 PM8/26/14
to jsig...@googlegroups.com
Thanks a lot, it work like a charm!


You received this message because you are subscribed to a topic in the Google Groups "JSignPdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsignpdf/w4_1EZzsCcw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsignpdf+u...@googlegroups.com.

Fernando Raffani

unread,
Sep 5, 2014, 3:28:07 PM9/5/14
to jsig...@googlegroups.com
I know it has been a long time, but could you explain what has been done to avoid the error:

Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 0x81000001
    at sun.security.pkcs11.wrapper.PKCS11.C_GetAttributeValue(Native Method)
    at sun.security.pkcs11.P11KeyStore.mapLabels(P11KeyStore.java:2306)

This error is happening with Aladdin eToken, but doesn't happen with other certificates. I can't find any information about the 0x81000001 code.

Thanks in advance

Esteban Navarro

unread,
Feb 27, 2020, 8:26:02 AM2/27/20
to JSignPdf
Hi Fernando,

Recently, I get that error from an specific aladdin token, I couldn´t figurate what is happening, could you resolve or find what was generating the error?

Thanks!
Reply all
Reply to author
Forward
0 new messages