digital-certificate

Message digest of pdf in digital signature

泄露秘密 提交于 2019-11-28 11:44:37
I want to manually verify the integrity of a signed pdf. I have been able to reach at:- got the value of '/Content' node from pdf(using PyPDF2 ). This is a der encoded PKCS#7 certificate. Now as per pdf specifications , the message digest of the pdf data is stored along with the certificate in /Content node. Tried a lot but I am not able to get the digest value which I would eventually compare with hashed pdf content(specified by /ByteRange ). PDF specification snapshot:- Don't understand the last part that says write signature object data into the dictionary . where does this write actually

How to create a digital certificate and export to .p12 file in PHP?

会有一股神秘感。 提交于 2019-11-28 05:15:23
问题 How to create a digital certificate and export to .p12 file in PHP? I want the .p12 file to have private key included. And also want to check whether the key pair is already issued (logged in database). I found a function called 'openssl_pkcs12_export_to_file' but don't know where to start. Seems that I need an X509 cert and a private key first. 回答1: <?php error_reporting(-1); function dump($Var) { echo "<hr/><pre>"; var_dump($Var); echo "</pre><hr/>"; } function check_errors() { echo "<hr/>

How to Add a Digital Certificate to a SingleImage Install Shield Installation Program

最后都变了- 提交于 2019-11-28 03:09:39
问题 I have an installation program created using the limited version of Install Shield within Visual Studio 2012. I have a digital certificate that I want to add to the installation program. I'd like to use the SingleImage feature of Install Shield to create and deliver a single installation file (e.g. setup.exe) to my customers. It seems, however, that I must attach the digital certificate to an msi file, which is embedded within setup.exe, by Install Shield. I have found that placing the

how to check if a file has a digital signature

╄→гoц情女王★ 提交于 2019-11-27 21:03:05
I'd like to check programatically if a file has been digitally signed or not. For the moment, I found a rather obscure code in MSDN , that doesn't compile... Any idea on the subject? An external tool with command line would also be great, by the way. The important missing part of the answer mentioning signtool is: Yes, with the well known signtool.exe you can also find out, if a file is signed. No need to download another tool! E.g. with the simple line: signtool verify /pa myfile.exe if %ERRORLEVEL% GEQ 1 echo This file is not signed. (For verbose out put, add a '/v' after '/pa'.) One may ask

In C#, sign an xml with a x.509 certificate and check the signature

拟墨画扇 提交于 2019-11-27 18:02:36
I'm trying to sign an XML file using a x.509 certificate, I can use the private key to sign the document and then use the CheckSignature method (it has an overload that receives a certificate as parameter) to verify the signature. The problem is that the user who validates the signature must have the certificate, my concern is, if the user has the certificate then he has access to the private key, and as I understand, this is private and should be available only to the user who signs. What am I missing? Thanks for your help. In .NET, If you get your X509 cert from a .pfx file, like this:

Python: reading a pkcs12 certificate with pyOpenSSL.crypto

旧街凉风 提交于 2019-11-27 13:18:22
I have a valid certificate issued by the spanish authority (FNMT) and I want to play with it to learn more about it. The file has extension .p12 I would like to read the information in it (first and last name) and check if the certificate is valid. Is it possible to do that with pyOpenSSL? I guess I have to use the crypto module in OpenSSL. Any help or useful link? Trying reading here: http://packages.python.org/pyOpenSSL/openssl-crypto.html but not much information :-( It's fairly straight-forward to use. This isn't tested, but should work: # load OpenSSL.crypto from OpenSSL import crypto #

Saving certificate chain in a pkcs12 keystore

非 Y 不嫁゛ 提交于 2019-11-27 12:54:46
问题 The following code: //used Bouncy Castle provider for keyStore keyStore.setKeyEntry(alias, (Key)keyPair.getPrivate(), pwd, certChain); where certChain holds the end certificate and the issuer certificate (i.e. two certificates), doesn't save the issuer certificate as part of the chain in the saved to the file system keystore file if the keyStore is an instance of PKCS12 . It does save both certificates if the keystore type is PKCS12-3DES-3DES . Why is this? Doesn't a PKCS12 suppose to have

How to load a PKCS#12 Digital Certificate with Javascript WebCrypto API

我与影子孤独终老i 提交于 2019-11-27 04:25:36
I'm trying to sign data using the WebCrypto API, but instead of creating a private/public key and exporting it to pkcs#1 or 8, I would really like to use a user's PKCS#12 to sign data. I've read the W3C spec, but cannot make much of it and can't find any good material on how to do this. Right now I want to leave ActiveX and Java Applets aside. Is there a way to tweak the following: var buffer = encode(prompt("Please enter your password")); //TODO: //implement a prompt for a pfx or cert return crypto.subtle.importKey("raw", buffer, "PBKDF2", false, usages); //TODO: //instead of importing it,

How to implement digital signature with my existing web project

99封情书 提交于 2019-11-26 21:23:24
问题 I'm working on the project where the user needs to do a digital signature on a document. I checked in the google and know about sinadura which is a desktop application but I need to invoke this into my web application. I installed alfresco community edition on Linux server (https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition) and followed the instruction as below GitHub link. https://github.com/zylklab/alfresco-sinadura I've implemented successfully with above

how to check if a file has a digital signature

别来无恙 提交于 2019-11-26 20:31:57
问题 I'd like to check programatically if a file has been digitally signed or not. For the moment, I found a rather obscure code in MSDN, that doesn't compile... Any idea on the subject? An external tool with command line would also be great, by the way. 回答1: The important missing part of the answer mentioning signtool is: Yes, with the well known signtool.exe you can also find out, if a file is signed. No need to download another tool! E.g. with the simple line: signtool verify /pa myfile.exe if