digital-signature

Queries regarding digital signature in PDF

落爺英雄遲暮 提交于 2019-12-13 16:25:34
问题 I was going through the official PDF spec. I came across a digitally signed PDF here. While I was analyzing its catalog dictionary, I saw this: I have some queries regarding this: As per page 736 of the spec, FieldMDP has no P parameter, that belongs to DocMDP (page 733). Of course, the PDF might have been modified by some third party who added an extraneous key to the dictionary. But I just want to confirm, if a P key is found in FeldMDP , is it to be ignored, or it has some meaning? As per

Use iText to create signature with complete own appearance

蓝咒 提交于 2019-12-13 15:48:19
问题 I need to create signatures, which consists only of the signing name and date. Additionally, these two fields have to be placed at exact coordinates as the two fields have to be placed in a predefined "revision table". Is this possible? Here´s my code, which is pretty (!) much the same as of Bruno Lowagie´s samples and is probably not even near to the problem´s solution: namespace signatures.chapter3 { public class C3_11_SignWithToken { public static String SRC = "../../../../resources/hello

Pades LTV verification in iTextSharp throws Public key presented not for certificate signature for root CA certificate

无人久伴 提交于 2019-12-13 13:14:25
问题 I'm getting an Org.BouncyCastle.Security.InvalidKeyException with error message Public key presented not for certificate signature when validating a pdf with LtvVerifier . This problem has arisen after circumventing an issue with CRL LDAP URIs. The code used to perform the verification is the same as the previous post: public static bool Validate(byte[] pdfIn, X509Certificate2 cert) { using (var reader = new PdfReader(pdfIn)) { var fields = reader.AcroFields; var signames = fields

What exactly does the enveloped signature transform?

别等时光非礼了梦想. 提交于 2019-12-13 12:35:13
问题 If I want to sign the next XML code with envoloped signature: <root> <element> <child>text node</child> </element> </root> Then the Signature XML code takes place inside the signed XML code, in the way shown below: <root> <element> <child>text node</child> </element><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">...</Signature> </root> Notice: no line break nor single character is added outside Signature element since that would invalidate the signature. The XML enveloped signature

Program crashing when Applying SHA-256/SHA-512 instead of SHA-1 when signing documents with RSA

僤鯓⒐⒋嵵緔 提交于 2019-12-13 08:36:09
问题 First I generate a Signature and place in the txt_EmpSignature text box and then to sign documents i'm using the following argument in the "Sign" button click event handler: RSACryptoServiceProvider MySigner = new RSACryptoServiceProvider(); openFileToSign.ShowDialog(); FileStream file_to_sign = new FileStream(openFileToSign.FileName, FileMode.Open, FileAccess.Read); BinaryReader reader_to_sign = new BinaryReader(file_to_sign); byte[] data_to_sign = reader_to_sign.ReadBytes((int)file_to_sign

Is there any way to get source code with resource of itext in action

江枫思渺然 提交于 2019-12-13 08:19:02
问题 I'm new to digital signature. I want to create an example. After lots of research I found this code: iText part3/chapter12 Signatures.java But due to my lack of knowledge, I can't figure out and make my own resource. Is there any way to find resources which define in this code. So I can directly execute it and examine the result and understand it? 回答1: If you go to the "learn" page on the official iText site, you will find a link to a free ebook entitled Digital Signatures for PDF Documents.

how to password protect the digitally signed pdf using iTextSharp?

南楼画角 提交于 2019-12-13 05:30:17
问题 I m creating and signing pdf using c#,itextsharp.Now i m using this code for password protection and digital sign.First i am protecting with password.Than i am signing. the transmitted pdf is not asking password while opening? Can someone tellme why is this happening? Thanks.. string passprotectedfile = filename; using (Stream input = new FileStream(signedfile, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (Stream output = new FileStream(passprotectedfile, FileMode.Create,

How do I create a blank PDF signature field using an HTML input document or after exporting to PDF using ABCPDF?

谁都会走 提交于 2019-12-13 04:37:44
问题 I have a source HTML document generated from an ASPX. I then convert the html to PDF using ABCPDF. The html has a signature area, which is just a text box with a border. I need a signature field inside the PDF with a name that I can pass on. The PDF will be sent to a third-party who will correspond with the client and then digitally sign the PDF and send it back. Given that I have an html document, or PDF, how do I programmatically add the blank PDF signature field around the original html

openssl_sign(): supplied key param cannot be coerced into a private key

Deadly 提交于 2019-12-13 04:25:26
问题 I have googled to search answer for these problem.but I'm not able to find proper solution for my question as many answer was specific to problem related. when I tried to create digital signature of content using XMLSecurityKey and openssl_sign I'm getting warning and signature was not created. openssl_sign is throwing error as : Warning: openssl_sign(): supplied key param cannot be coerced into a private key in /var/www/git/ta_client/accessService.php on line 105 And my code is: public

How to extract digest algorithm from signed dll using PowerShell?

岁酱吖の 提交于 2019-12-13 03:19:16
问题 I have a dll file which is digitally signed. I need to write a PowerShell command which could get me the Digest Algorithm that is used for the Digital Signature. Digest Algorithm info I need: I tried with Get-AuthenticodeSignature but this didn't get me the Digest Algorithm info. After running the following command I get the below result. Get-AuthenticodeSignature "C:\Program Files\Application Verifier\vrfauto.dll" | Format-List Results of above: 回答1: So what you are looking for is Get