l3onardo-oliv3ira / signer4j Goto Github PK
View Code? Open in Web Editor NEWA simpler way to perform digital signature operations with A1 and A3 certificates.
License: Other
A simpler way to perform digital signature operations with A1 and A3 certificates.
License: Other
O driver libaetpkss.so.3
fornecido pela SafeSign para o token G&D Burti funciona perfeitamente no safesignidentityclient
, Firefox, Thunderbird, bem como acessa com sucesso os portais da RFB e GOV.BR, indicando que o driver e a cadeia de certificados está adequadamente instalada e em pleno funcionamento, contudo, o PjeOffice-Pro falha ao carregar a lista de Tokens disponíveis, com a seguinte saida no terminal:
com.github.signer4j.exception.DriverHealthCheckingException: This library "/usr/lib/libaetpkss.so.3.9.9.1" apparently is not compatible with your operating system and has been rejected by crash prevention (see log details).
A carga da biblioteca provocará o crash do aplicativo. Driver rejeitado!
at com.github.signer4j.imp.DriverHealth.check(DriverHealth.java:114)
at com.github.signer4j.imp.PKCS11Driver.loadSlots(PKCS11Driver.java:87)
at com.github.signer4j.imp.AbstractDriver.doLoad(AbstractDriver.java:123)
at com.github.signer4j.imp.LoadCycle.load(LoadCycle.java:67)
at com.github.signer4j.imp.AbstractDriver.getDevices(AbstractDriver.java:81)
at com.github.signer4j.imp.AbstractDeviceAccessor.lambda$getDevices$0(AbstractDeviceAccessor.java:74)
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at com.github.signer4j.imp.AbstractDeviceAccessor.getDevices(AbstractDeviceAccessor.java:74)
at com.github.signer4j.imp.Signer4JDeviceManager.getDevices(Signer4JDeviceManager.java:77)
at com.github.signer4j.imp.TokenAccessor.lambda$showCertificates$0(TokenAccessor.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
INFO thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.220 healthy driver: /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so
DEBUG thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.220 Driver health checking time for /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so: 344ms
DEBUG thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.220 Initialization library time: 0ms
DEBUG thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.792 Slot list loading time: 572ms
INFO thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.792 Total loading time: 916ms
INFO thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.874 healthy driver: /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so
DEBUG thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.875 Driver health checking time for /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: 83ms
WARNING: gnome-keyring:: can't do without os locking
DEBUG thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.875 Initialization library time: 0ms
WARN thread: driver health monitor-pool-2-thread-1 2024-02-20 16:58:24.876 Unabled to load gracefully
com.github.signer4j.exception.DriverFailException: Unabled to create PKCS11 instance
at com.github.signer4j.imp.PKCS11Driver.loadSlots(PKCS11Driver.java:95)
at com.github.signer4j.imp.AbstractDriver.doLoad(AbstractDriver.java:123)
at com.github.signer4j.imp.LoadCycle.load(LoadCycle.java:67)
at com.github.signer4j.imp.AbstractDriver.getDevices(AbstractDriver.java:81)
at com.github.signer4j.imp.AbstractDeviceAccessor.lambda$getDevices$0(AbstractDeviceAccessor.java:74)
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at com.github.signer4j.imp.AbstractDeviceAccessor.getDevices(AbstractDeviceAccessor.java:74)
at com.github.signer4j.imp.Signer4JDeviceManager.getDevices(Signer4JDeviceManager.java:77)
at com.github.signer4j.imp.TokenAccessor.lambda$showCertificates$0(TokenAccessor.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_CANT_LOCK
at sun.security.pkcs11.wrapper.PKCS11.C_Initialize(Native Method)
at sun.security.pkcs11.wrapper.PKCS11$SynchronizedPKCS11.C_Initialize(PKCS11.java:1627)
at sun.security.pkcs11.wrapper.PKCS11.getInstance(PKCS11.java:163)
at com.github.signer4j.imp.PKCS11Driver.loadSlots(PKCS11Driver.java:93)
O resultado é o mesmo independentemente da versão do JRE utilizado, uma vez que o PjeOffice-Pro usa JRE embarcado em seu próprio diretório de instalação (./jre/bin/java
, no meu caso /opt/pjeoffice-pro/jre/bin/java
).
Não pude confirmar ainda, mas suspeito que seja um problema de permissões, seja em alguma das livrarias ou binários do PjeOffice-Pro, seja nas livrarias do sistema.
Poderia ser o problema causado pelo signer4j
, ou por algo relacionado à instalação do PjeOffice-Pro?
O log leva a crer que o problema seja em como o signer4j interage com o driver (This library "/usr/lib/libaetpkss.so.3.9.9.1" apparently is not compatible with your operating system and has been rejected by crash prevention (see log details).
), não com o driver em si, que funciona em outras aplicações.
Agradeço desde já.
lucas@lucas-pc:/opt/pjeoffice-pro$ inxi -v3
System:
Host: lucas-pc Kernel: 6.1.0-18-amd64 arch: x86_64 bits: 64 compiler: gcc
v: 12.2.0 Desktop: GNOME v: 43.9 Distro: Debian GNU/Linux 12 (bookworm)
Machine:
Type: Desktop System: Gigabyte product: B450M DS3H v: N/A
serial: <superuser required>
Mobo: Gigabyte model: B450M DS3H-CF serial: <superuser required>
UEFI: American Megatrends LLC. v: F63c date: 07/20/2022
CPU:
Info: 6-core model: AMD Ryzen 5 1600 bits: 64 type: MT MCP arch: Zen+ rev: 2
cache: L1: 576 KiB L2: 3 MiB L3: 16 MiB
Speed (MHz): avg: 1624 high: 2800 min/max: 1550/3200 boost: enabled cores:
1: 1550 2: 1550 3: 1550 4: 1374 5: 1550 6: 1550 7: 1550 8: 1550 9: 2800
10: 1550 11: 1375 12: 1550 bogomips: 76657
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: XFX Pine driver: amdgpu v: kernel arch: GCN-4 bus-ID: 06:00.0
temp: 54.0 C
Display: wayland server: X.Org v: 1.22.1.9 with: Xwayland v: 22.1.9
compositor: gnome-shell driver: X: loaded: amdgpu
unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
resolution: 1920x1080~165Hz
API: OpenGL v: 4.6 Mesa 22.3.6 renderer: AMD Radeon RX 570 Series
(polaris10 LLVM 15.0.6 DRM 3.49 6.1.0-18-amd64) direct-render: Yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Gigabyte driver: r8169 v: kernel port: f000 bus-ID: 04:00.0
IF: enp4s0 state: down mac: b4:2e:99:92:29:3f
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 05:00.0
IF: wlp5s0 state: up mac: 78:2b:46:d5:db:03
Drives:
Local Storage: total: 987.42 GiB used: 562.44 GiB (57.0%)
Info:
Processes: 452 Uptime: 9m Memory: 7.67 GiB used: 4.2 GiB (54.7%)
Init: systemd target: graphical (5) Compilers: N/A Packages: 2174
Shell: Bash v: 5.2.15 inxi: 3.3.26
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.