smartcard

iTextSharp vertical SignatureAppearance

試著忘記壹切 提交于 2021-02-15 07:54:07
问题 I'm signing a document with token certificate: var cp = new Org.BouncyCastle.X509.X509CertificateParser(); var chain = new[] { cp.ReadCertificate(cert.RawData) }; var externalSignature = new X509Certificate2Signature(cert, "SHA-1"); var pdfReader = new PdfReader(origem); var signedPdf = new FileStream(destino, FileMode.Create); var pdfStamper = PdfStamper.CreateSignature(pdfReader, signedPdf, '\0'); var sig = pdfStamper.SignatureAppearance; sig.SetVisibleSignature(new Rectangle(50, 0, 500, 50

iTextSharp vertical SignatureAppearance

懵懂的女人 提交于 2021-02-15 07:54:05
问题 I'm signing a document with token certificate: var cp = new Org.BouncyCastle.X509.X509CertificateParser(); var chain = new[] { cp.ReadCertificate(cert.RawData) }; var externalSignature = new X509Certificate2Signature(cert, "SHA-1"); var pdfReader = new PdfReader(origem); var signedPdf = new FileStream(destino, FileMode.Create); var pdfStamper = PdfStamper.CreateSignature(pdfReader, signedPdf, '\0'); var sig = pdfStamper.SignatureAppearance; sig.SetVisibleSignature(new Rectangle(50, 0, 500, 50

Getting SmartCard certificate into Windows service local store (mmc)

旧街凉风 提交于 2021-02-08 07:38:43
问题 I need the certificate from my smart card to be in the Windows service local sotre. I opened the store with mmc -> snap-in -> certificates. I used different little tools to see informations(ATR etc.) about my smartcard and they all worked out. I can see a lot of certificates there, but the one from my smartcard is missing in the store. The folder 'Smartcard trusted Roots' is empty. Windows gets the .cer/.pfx-data from smart cards automatically, right? Or is there no chance, i can do it

ATR command when programming PC/SC reader

房东的猫 提交于 2021-02-07 06:43:46
问题 I have checked the programming interface for the MIFARE Ultralight and TOPAZ/Jewel IC tags. The API quite nicely describes how the bytes are saved on the card, how to address the memory blocks, how to make all operations like read, read-all, use of the OTP (One Time Programmable) function, how to read ROM bytes, how to switch from idle to ready state (REQA, WUPA commands), it says if commands are CRC protected, how to access the tag UID, etc. When stared to program the NFC reader (ACR122U or

javax.smartcardio in Java 9, 10, 11, 12… etc

蹲街弑〆低调 提交于 2021-02-05 09:18:31
问题 What happened to the javax.smartcardio library from Java 9 onwards? Is there an alternative or some way to obtain it in JAR? 回答1: After the java becomes "Modular Development", javax.smartcardio has also been modularized. If you want to use the package after java 9 , create module-info.java . Please see the image. Or you can just degrade the compiler version to JDK 1.8 : https://dzone.com/articles/java-9-modularity-jigsaw 回答2: After some hours searching on the web, thanks to the answer above,

How to convert object of class into hexadecimal array in java

↘锁芯ラ 提交于 2021-02-05 08:28:07
问题 An object of class having some data and I am gone write that object into java card. I am having a function that convert hexadecimal data into byte array and then write that data to smart card using java card. While i convert data into hex format i encrypt that data. So i need to convert object of class into hexadecimal. Please tell me how to convert object into Hex format in java. I am using smart card type = contact card using java card 2.2.2 with jcop using apdu. 回答1: Here i am sending you

Smartcard with different historical bytes depending on interface

余生颓废 提交于 2021-01-28 18:56:24
问题 I would like to know if there is a way of changing the historical bytes automatically as you power your smartcard, in order to have different response if on contact or contactless. In Javacard you can use setATRHistBytes , and also call it depending on the access interface. But the changes would be reflected on next power up of the card. I want to set them intermediately. TA 回答1: Actually the contact-less interface has no attribute named ATR. Because ATR is for contact interface only. The

Copying a certificate from a smart card to computer

五迷三道 提交于 2021-01-28 00:26:51
问题 Is it possible to copy a certificate from a smart card to the computer and use it to login to a certain site. On mac, those certificates appear in Keychain and they can be saved to disk, but I'm not sure how to force a site to prompt a dialog screen to choose the certificate. When the smart card is connected, the prompt somehow appears and asks to choose a certificate. 回答1: The smartcard contains a key pair composed by a private key and a public key wrapped into a X509 certificate. It is

Sign a PDF with Aspose.Pdf using Belgian Identity Card leads to an SecurityException

雨燕双飞 提交于 2021-01-25 05:04:54
问题 When I try to sign a pdf using Aspose.PDF .net (net core 3.1 version 20.4) using a Belgian ID card I get an exception : error 2148532330 Access was denied because of a security violation. On the id card there are 2 certificates. The first one is an Authentication certifificate. Using this one no issue. The second one is the Signature certificate (non repudiation). The issue appears when using this certificate. I got more information about this error in the eid-middleware-dev google group :

Sign a PDF with Aspose.Pdf using Belgian Identity Card leads to an SecurityException

帅比萌擦擦* 提交于 2021-01-25 05:04:02
问题 When I try to sign a pdf using Aspose.PDF .net (net core 3.1 version 20.4) using a Belgian ID card I get an exception : error 2148532330 Access was denied because of a security violation. On the id card there are 2 certificates. The first one is an Authentication certifificate. Using this one no issue. The second one is the Signature certificate (non repudiation). The issue appears when using this certificate. I got more information about this error in the eid-middleware-dev google group :