Giter VIP home page Giter VIP logo

m0rf30 / cie-middleware-linux Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 3.0 5.96 MB

🪪 Software per l'utilizzo della Carta d'Identità Elettronica Italiana - Accesso ai servizi della PA, firma e verifica di documenti 🇮🇹 Software for the usage of the Italian Electronic Identity Card. Access to PA services, signing and verification of documents

License: BSD 3-Clause "New" or "Revised" License

C++ 72.96% C 12.34% Java 14.29% Shell 0.14% Meson 0.27%
cie pa carta-identita-elettronica italian-electronic-identity-card altenativa-a-spid no-spid

cie-middleware-linux's Issues

Domande sulle funzionalità

Ciao, non ho trovato modo di contattarti altrove, allora ti scrivo qua.
Sto cercando di pacchettizzare cie-middleware per openSUSE e avrei alcune domande:

  • libcie-pkcs11, rimossi i riferimenti alla firma, è compilabile e funzionale in versione 1.4.1?
  • quest'ultima funziona con firefox 90+?
  • CIEID è indispensabile? Per farlo accettare nella distribuzione non posso tirarmi dietro dei jar binari e pacchettizzare quelli sta richiedendo un po' di tempo. Per dire, se serve solamente a cambiare PIN non posso usare il tool di OpenSC come per le smart card ordinarie? Oppure andrebbe patchato anche quello?

Grazie

meson compile o ninja -C ?

Salve,
Complimenti per questo lavoro. Volevo solo segnalare che su ubuntu 20.04 attuale il comando meson da pacchetto non ha il sottocomando compile. Ho usato ninja in sua vece. É corretto?
Il build é terminato correttamente, comunque.

Fix all implicit type conversions

Besides a variety of other warnings, there are a lot of type narrowing and type conversions in the libcie-pkcs11 C++ project.
These are not just GCC poking fun at C++ developers, if you're building with clang some become errors and in some platforms others are actually broken code. See for example a Darwin build here, where DWORD is unsigned int, not unsigned long as implicitly assumed.

Being a Java application and a native library with just a handful of universal libraries for dependencies, I'm pretty sure this project could actually work on a lot more platforms than just GNU/Linux distro if these issues could be fixed.

Failure on adding graphic signature: incompatibility between jna and ghost4j

Allora, ho appena finito di scrivere un bel pacchetto Nix che fa una build riproducibile di cie-middleware-linux usando il branch con podofo originale.
Ho provato le seguenti cose:

  1. abbinare la carta;
  2. firmare e verificare la firma (sia CAdES sia PAdES);
  3. aggiungere il modulo PKCS#11 al database NSS e fare un login;
  4. rimuovere la carta.

Sembra funzionare tutto correttamente tranne la firma PAdES. Se spunto "aggiungi la firma grafica" la firma fallisce con questo errore (che sempre essere un'incompatibilità tra ghost4j e jna):

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid calling convention 63
	at com.sun.jna.Native.createNativeCallback(Native Method)
	at com.sun.jna.CallbackReference.<init>(CallbackReference.java:320)
	at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:506)
	at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:483)
	at com.sun.jna.Function.convertArgument(Function.java:558)
	at com.sun.jna.Function.invoke(Function.java:345)
	at com.sun.jna.Library$Handler.invoke(Library.java:265)
	at jdk.proxy2/jdk.proxy2.$Proxy3.gsapi_set_stdio(Unknown Source)
	at org.ghost4j.Ghostscript.initialize(Ghostscript.java:323)
	at org.ghost4j.renderer.SimpleRenderer.run(SimpleRenderer.java:105)
	at org.ghost4j.renderer.AbstractRemoteRenderer.render(AbstractRemoteRenderer.java:86)
	at org.ghost4j.renderer.AbstractRemoteRenderer.render(AbstractRemoteRenderer.java:70)
	at it.ipzs.cieid.Firma.PdfPreview.<init>(PdfPreview.java:53)
	at it.ipzs.cieid.MainFrame$42.actionPerformed(MainFrame.java:2033)

Originally posted by @rnhmjoj in #8 (comment)

Crash on graphical signature (PAdES) using the podofo-vanilla branch

Using the podofo-vanilla branch a crash will occur during the PAdES graphical signature process (without checking the box to append the signature image)

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fbe441740b0, pid=2393655, tid=2393968
#
# JRE version: OpenJDK Runtime Environment (17.0.4+8) (build 17.0.4+8-nixos)
# Java VM: OpenJDK 64-Bit Server VM (17.0.4+8-nixos, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libpodofo.so.0.9.8+0x14e0b0]  PoDoFo::PdfPagesTree::GetTotalNumberOfPages() const+0x0
#

Originally posted by @rnhmjoj in #8 (comment)

Le istruzioni riportate nel readme non sono piu attuali

Branch: master
Sistema Operativo: Raspberry Pi OS
Architettura: ARM

Su questa nuova versione la build si rompe quasi subito al lancio del comando meson builddir libs a causa dell'errore libs/meson.build:11:0: ERROR: C++ shared or static library 'libpodofo' not found (vedi immagine a seguire).

La precedente versione (1.4.1) non aveva questo problema. Compilazione su ARM (RPI 4).

image

Ho visto che c'è stato ulteriore refactoring, andrebbe revisionato il README; il comando di build indicato non è più valido a causa del fatto che la directory libcie-pkcs11 non esiste più.
È possibile che per la Build Generica occorre procedere in modo diverso che al momento non è indicato?

Grazie.

L'abbinamento della carta fallisce con le versioni > 1.5.1

Sto compilando la libreria su rpi5 (aarch64) togliendo la parte di codice riguardante la firma digitale; usando l'applicativo java eseguendo l'abbinamento ottengo il seguente errore:

2024-08-17 16:18:20.367  [E] Errore inaspettato durante la comunicazione con la smart card

Riprovando l'abbinamento poi il programma crasha con:

# Problematic frame:
# C  [libcrypto.so.3+0x1f91b0]  EVP_DigestUpdate+0x10

Provando ad usare abilitacie.cpp ottengo invece il seguente errore:

2024-08-17 16:18:20:313  [ERROR] VerificaSOD - SOD sign not valid
2024-08-17 16:18:20:363  [ERROR] AbbinaCIE - Exception VerificaSOD - SOD sign not valid

Stessi errori se provo a compilare la libreria per intero usando il branch podofo-vanilla

Il problema sembra essere stato introdotto con il commit 2f8654d
Compilando la libreria al commit precedente, l'abbinamento funziona sia con il programma java sia con quello cpp.

Errore inaspettato durante la comunicazione con la smart card

image

Mi da questo errore mentre provo ad abbinare la CIE. Il repo ufficiale funziona.

Distro: Arch Linux
Lettore: miniLECTOR AIR bit4id

[niko@arch-phoenix ~]$ cieid 
java.io.FileNotFoundException: /home/niko/.CIEID/cieid.props (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at it.ipzs.cieid.util.Utils.getProperty(Utils.java:56)
	at it.ipzs.cieid.MainApplication.initialize(MainApplication.java:53)
	at it.ipzs.cieid.MainApplication.<init>(MainApplication.java:47)
	at it.ipzs.cieid.MainApplication.showUI(MainApplication.java:41)
	at it.ipzs.cieid.MainApplication$1.run(MainApplication.java:31)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
TabbedPan Selected Index: 0
java.io.FileNotFoundException: /home/niko/.CIEID/cieid.props (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at it.ipzs.cieid.util.Utils.getProperty(Utils.java:56)
	at it.ipzs.cieid.MainFrame.selectHome(MainFrame.java:4596)
	at it.ipzs.cieid.MainFrame.<init>(MainFrame.java:3187)
	at it.ipzs.cieid.IntroFrame$3.actionPerformed(IntroFrame.java:163)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
java.io.FileNotFoundException: /home/niko/.CIEID/cieid.props (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at it.ipzs.cieid.util.Utils.getProperty(Utils.java:56)
	at it.ipzs.cieid.MainFrame.selectHome(MainFrame.java:4617)
	at it.ipzs.cieid.MainFrame.<init>(MainFrame.java:3187)
	at it.ipzs.cieid.IntroFrame$3.actionPerformed(IntroFrame.java:163)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
tabbedPanel: javax.swing.JTabbedPane[,200,-65,600x635,invalid,layout=javax.swing.plaf.metal.MetalTabbedPaneUI$TabbedPaneLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=352,maximumSize=,minimumSize=,preferredSize=,haveRegistered=false,tabPlacement=TOP]
TabbedPan Selected Index: 1
File INI:
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
Lib log level: 2
java.io.FileNotFoundException: /home/niko/.CIEID/cieid.props (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at it.ipzs.cieid.util.Utils.getProperty(Utils.java:56)
	at it.ipzs.cieid.MainFrame.selectHome(MainFrame.java:4596)
	at it.ipzs.cieid.MainFrame$78.run(MainFrame.java:3908)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
java.io.FileNotFoundException: /home/niko/.CIEID/cieid.props (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at it.ipzs.cieid.util.Utils.getProperty(Utils.java:56)
	at it.ipzs.cieid.MainFrame.selectHome(MainFrame.java:4617)
	at it.ipzs.cieid.MainFrame$78.run(MainFrame.java:3908)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
TabbedPan Selected Index: 0
Lib log level: 2

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.