Code Monkey home page Code Monkey logo

m0rf30 / cie-middleware-linux Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 2.0 5.83 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.33% 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 Introduction

Header metrics Repositories metrics Languages plugin metrics Notable contributions plugin metrics

cie-middleware-linux's People

Contributors

dependabot[bot] avatar m0rf30 avatar resoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cie-middleware-linux's Issues

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)

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)

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.

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.

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

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.