digital-signature

m_safeCertContext is an invalid handle

送分小仙女□ 提交于 2019-12-10 12:33:24
问题 I've been wrestling with a problem, maybe you guys can point me in the right direction. I'm trying to digitally sign a pdf, on the webserver, over an https connection. At page load i'm doing as so: HttpClientCertificate cs = Request.ClientCertificate; X509Certificate card = new X509Certificate(cs.Certificate); Org.BouncyCastle.X509.X509CertificateParser cp = new Org.BouncyCastle.X509.X509CertificateParser(); Org.BouncyCastle.X509.X509Certificate[] chain = new Org.BouncyCastle.X509

Digital Signing of XFA forms

痴心易碎 提交于 2019-12-10 12:14:45
问题 I'd like to sign PDF documents created in Adobe Livecycle (it is XFA form) programmatically. I know about iText library for manipulating with PDFs, but I haven't found any example how to sign it yet. Maybe its not supported yet. Do you know any other Java library which can do that? Or do you know a way how to sign it? I know, my question is similar to this opened question, but I don't need the use of iText. Thank you very much for your help! 回答1: This is a small example showing how to sign

OpenSSL not enough data

时光毁灭记忆、已成空白 提交于 2019-12-10 11:18:45
问题 I've generated a self signed certificate using Adobe X, and exported a pfx file (for my private key) along with a .cer file (for the certificate). I then try to collect the certificate, along with the key, but for some reason, OpenSSL is giving the error OpenSSL::X509::CertificateError: not enough data Here is my code require 'openssl' CERTFILE = "test.cer" RSAKEYFILE = "test.pfx" # Open certificate files cert = OpenSSL::X509::Certificate.new(File.read CERTFILE) key = OpenSSL::PKey::RSA.new

How to programmatically remove the digital signature from VBA macros in Excel?

﹥>﹥吖頭↗ 提交于 2019-12-10 11:15:41
问题 Is there any way to programmatically remove the digital signature from the VBA macros of an Excel sheet? i.e. code that is equivalent to entering the VBA editor, going to Tools menu -> Digital Signature and clicking Remove. 回答1: Interesting question. It's deliberately not part of the Excel object model for security reasons. It is possible to remove the certificate from the certificate store. This requires Win32 api calls (which can be made from VB6 or VBA but I'm not sure of the exact effect

Digital Signature (PKCS#7 - Deferred Signing) / The document has been altered or corrupted since the signature was applied

爱⌒轻易说出口 提交于 2019-12-10 10:53:31
问题 I have gone through all similar questions but could not find a case where itextsharp deferred signing is applied. Basically, my application signs pdf documents using PKCS#7 signature that is created by remote web service. My application sends this web service the hash of the original document (hash of the signable bytes after empty signature field is added), and receives a Base64 encoded signature file. I embed this signature to previously generated temporary pdf file which has empty

Check signature of OSX bundle before load

安稳与你 提交于 2019-12-10 10:37:07
问题 Goal: Load .so/.bundle that has been verified to be signed (or verified against an arbitrary algorithm). I want to be able to verify a .so/.bundle either using OSX's builtin binary signature tools or some custom algorithm and then load that .so/.bundle with dlopen... The wrench in this is that there seems to be no programmatic way to check-then-load. One could check the file manually and then load it after.. however there is a window-of-opportunity within which someone could swap out that

c# itextsharp how to get digital signature image

萝らか妹 提交于 2019-12-10 10:11:23
问题 Is it possible to get the image of any digital signatures in a pdf file with itextsharp using c# code? PdfReader pdf = new PdfReader("location.pdf"); AcroFields acroFields = pdf.AcroFields; List<string> names = acroFields.GetSignatureNames(); foreach (var name in names) { PdfDictionary dict = acroFields.GetSignatureDictionary(name); } With this simple lines i can get the signature dictionaries but from this object i am not able to get the content of the image. Can anyone help? 回答1: I answer

Digital Signature with wrong value

混江龙づ霸主 提交于 2019-12-10 10:09:46
问题 I am trying to create a digital signature for a block of Text. While I seem to be able to create a signature it is different from the digital test signature as required by our test cases. The code I am using is below. X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.OpenExistingOnly); X509Certificate2Collection certcol = store.Certificates.Find(X509FindType.FindByIssuerName, "eBusiness Development CA", false); if (certcol.Count > 0) {

What to put into ~/.gitconfig to imply --show-signature for every git subcommand that supports it?

时间秒杀一切 提交于 2019-12-10 04:45:05
问题 I just searched through the git-config(1), git-log(1) and git-show(1) man pages of git 2.6.2, but haven't found any hint that the --show-signature option (to e.g. git show or git log ) can be configured globally in my ~/.gitconfig for all git subcommands that support it. One option would be aliases, but since I don't know which subcommands all support it, that's just a workaround, not a solution. I guessed it may be core.show-signature = yes or core.showSignature = yes but that didn't change

Digitally Signing Data in a web app

梦想与她 提交于 2019-12-10 03:39:26
问题 I have a web application where some data (not file) needs to be digitally signed using a PKI Private Key. The PKI Certificate & Private Key will be in a USB Cryptotoken which registers the certificates with the browser when inserted into the USB slot. This eases the pain of doing authentication using the certificate because I do that by trigerring ssl-renegotiation in my Application. However, using a certificate for digital signing seems to be a bit more tricky. I can think of several ways to