digital-certificate

Programmatically Determine If An Excel File (.xls) Contains Macros

感情迁移 提交于 2019-11-30 20:49:18
Is there any way to programmatically determine if an .xls contains macros, without actually opening it in Excel? Also are there any methods to examine which certificate (including timestamp cert) these macros are signed with? Again without using Excel. I'm wondering in particular if there are any strings that always show up in the raw data of an Excel file when macros are present. Yes, you can open the .xls file as a compound document file and check whether is contains a VBA folder and streams containing VBA code. Sample code is available in this CodeProject article: Another OLE Doc Viewer but

This solution is safe to access to user's private certificate on a web with a webSoket communication?

余生长醉 提交于 2019-11-30 19:09:00
问题 We are developing a web page that use https protocol (two way). We need to access to the private certificates of the user, because we need sign documents by the user's certificate, so we developed a Java application that communicate with the web by a websoket. This application will call with a protocol call since the web (same that when you open a pdf on Acrobat Reader from a browser). So we have to be sure that our web is calling to the native application(only our web). We want develop a

Programmatically Determine If An Excel File (.xls) Contains Macros

只谈情不闲聊 提交于 2019-11-30 04:38:56
问题 Is there any way to programmatically determine if an .xls contains macros, without actually opening it in Excel? Also are there any methods to examine which certificate (including timestamp cert) these macros are signed with? Again without using Excel. I'm wondering in particular if there are any strings that always show up in the raw data of an Excel file when macros are present. 回答1: Yes, you can open the .xls file as a compound document file and check whether is contains a VBA folder and

Digital certificates: What is the difference between encrypting and signing

不打扰是莪最后的温柔 提交于 2019-11-29 22:39:35
I am relatively new to PKI, certificates and all related stuff. As far as I understand in public-key cryptography one encrypt with a public key and decrypt with a private key. Only one private key can correspond to any public key but the opposite is not true. Is it correct? Or is it one to one mapping? So, the way digital signature works is that the content of a certificate is hashed and then "signed" with a private key. The signature is verified then with the corresponding public key. So, here is where I get confused. What is the difference between encrypting a message with a public key and

Checking digital signature programmatically from Delphi

孤街浪徒 提交于 2019-11-29 19:27:31
I need a function in Delphi to verify the digital signature of an external EXE or DLL. In my particular application, I am going to occasionally invoke other processes, but for security purposes I want to make sure these executables were created by our organization before running them. I have seen Microsoft's example in C , however, I do not want to waste the time translating this to Delphi if somebody else already has. I would prefer a snippet or code example over a third-party library. Thanks. Here you go: // IsCodeSigned, which verifies that the exe hasn't been modified, uses //

keytool - see the public and private keys

半世苍凉 提交于 2019-11-29 12:26:20
问题 I created Java keystore programmatically of type jks (i.e. default type). It is initially empty so I created a DSA certificate. keytool -genkey -alias myCert -v -keystore trivial.keystore How can I see the public and private keys? I.e. is there a command that prints the private key of my certificate? I could only find keytool -certreq which in my understanding prints the certificate as a whole: -----BEGIN NEW CERTIFICATE REQUEST-----

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

给你一囗甜甜゛ 提交于 2019-11-29 11:47:45
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. <?php error_reporting(-1); function dump($Var) { echo "<hr/><pre>"; var_dump($Var); echo "</pre><hr/>"; } function check_errors() { echo "<hr/><pre>"; $Count = 0; while (($e=openssl_error_string())!==false) { echo $e."<br>"; $Count++; } if ($Count==0)

Royal Mail Shipping API - SOAP connection & pem/certificates query

故事扮演 提交于 2019-11-29 08:59:04
I am trying to setup the Royal Mail Shipping API (if anyone has any experience of this i'd be grateful if you could assist). In the documentation they provide I need to download a certificate (a .p12 file) & import this onto my Windows machine - this is pretty straightforward using the 'Certificate Import Wizard'. Once it gets to the "Set Security Level' I must select High & this will request permission with a password each time this is used. In Internet Explorer in 'Internet Options' within the Content tab I can view the Certificates and can clearly see that this certificate has been imported

Saving certificate chain in a pkcs12 keystore

爷,独闯天下 提交于 2019-11-28 20:24:16
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 both certificates are part of the chain? EDIT: Here's an SSCCE . This works fine with "JKS" , fails with

Digital certificates: What is the difference between encrypting and signing

≡放荡痞女 提交于 2019-11-28 18:03:11
问题 I am relatively new to PKI, certificates and all related stuff. As far as I understand in public-key cryptography one encrypt with a public key and decrypt with a private key. Only one private key can correspond to any public key but the opposite is not true. Is it correct? Or is it one to one mapping? So, the way digital signature works is that the content of a certificate is hashed and then "signed" with a private key. The signature is verified then with the corresponding public key. So,