pfx

How can I encrypt, decrypt and sign using .pfx certificate?

白昼怎懂夜的黑 提交于 2019-12-06 00:34:32
I have a .pfx certificate file on my computer. I want to to encrypt a message with its public key, and then decrypt it with the private. Also I want to sign another message with its private key, and then check the signature. And I need to get the information about the sertificate the message was signed with from that message. How can I do it using System.Security.Cryptography? You can open the PFX in .NET, like the following: var path = <YOUR PFX FILE PATH>; var password = <YOUR PASSWORD>; var collection = new X509Certificate2Collection(); collection.Import(path, password, X509KeyStorageFlags

How to get Container name for PFX key?

眉间皱痕 提交于 2019-12-05 22:45:12
Some time ago I installed my PFX key into Container using command like this: sn -i mykey.pfx VS_XXX but two months later I forgot the Container name (VS_XXX), so my question is: How to get than name back? I know key name, I have this key, I know the key pass phrase. Download the Keypal utility and double click it, you will find all the names of the key containers. You can choose between user profile and machine profile. Alternatively, enumerate the certificate store to find the certificate of interest via its subject and then you can use CertGetCertificateContextProperty to get the value for

mac verify failure using Node with ssl certificate

别说谁变了你拦得住时间么 提交于 2019-12-05 16:41:53
问题 as specified in the Node api doc I tried the first one with a self created and signed cert using openssl. Everything was going fine except the fact that the couldn't test the client side from an android because it was needed a ca certificate. When I try the second method (that with pfx and not with key,cert) https.createserver throws an error crypto.js:145 c.context.loadPKCS12(pfx); ^ Error: mac verify failure at Object.exports.createCredentials (crypto.js:145:17) at Server (tls.js:1130:28)

SSLError(“bad handshake”) when trying to access resources Custom Certificates and Requests

点点圈 提交于 2019-12-05 07:47:32
I want to program webservices to exchange data in Python using Zeep. I can access services only with my certificate. I have a PFX certificate, but I converted it to two .pem files. My code: from zeep import Client from zeep.wsse.signature import Signature import requests from requests import Session key_filename ='/.files/cert.key.pem' cert_filename = './files/cert.crt.pem' session = Session() r = requests.get('https:...../PingWs?wsdl', cert=(cert_filename, key_filename)) print (r) But I get raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='evidim-test

openssl equivalent command in ruby

大憨熊 提交于 2019-12-04 19:25:56
I have to convert certificate file(pem format) into pfx using private key. The command perfectly works in linux is openssl pkcs12 -export -out certificate1.pfx -inkey myPrivateKey.key -in myCert.pem Can anyone help me to write equivalent code in ruby using ruby-openssl. Should be easy : #!/usr/bin/env ruby # export-der.rb require 'openssl' def export_der(pass, key, cert, out) key = OpenSSL::PKey.read File.read(key) cert = OpenSSL::X509::Certificate.new File.read(cert) name = nil # not sure whether this is allowed pkcs12 = OpenSSL::PKCS12.create(pass, name, key, cert) File.open(out, 'w'){|f| f

Problem with TemporaryKey.pfx I don't have the password

﹥>﹥吖頭↗ 提交于 2019-12-04 16:09:31
问题 A client of mine has a problem. He had a Microsoft CRM developper and he left. Now the project remains uncomplete. I've downloaded the source code of the custom applications and I'm not trying to continue the development. I've tried the ClickOne deployment and it pops me with a password input box related to the myapp_TemporaryKey.pfx. I've tried to install on a computer on the network and launch in debugging mode, and I get the same problem, it says : "Cannot import the following key file: .

Certificate issue: KEY or PFX from P7B and CRT

穿精又带淫゛_ 提交于 2019-12-04 16:02:14
问题 I'm new to the certificates, and this is a first time I bought it. I generated CSR file (in IIS) and bought certificate using GoDaddy web site. They sent me two files: P7B and CRT. Since I will use the certificate for Azure Web role, I need PFX. How can I create it using only CSR, P7B, and CRT? 回答1: Finally I managed to do that. In IIS I selected Complete Certificate Request, installed the CRT certificate, and then used Export option to save it as PFX. 回答2: Since I will use the certificate

CruiseControl.NET service failing to build due to MSBuild ResolveKeySource error, despite certificate being imported

醉酒当歌 提交于 2019-12-04 12:43:22
We just had an XBAP/WBA project added to our build server. It uses a PFX file for signing. I imported the PFX file to the CruiseControl.NET service certificate store, and can see it in the certificate store for the service. Yet we are still seeing an exception thrown by ResoveKeySource : c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets (1805,7): errorMSB4018: The "ResolveKeySource" task failed unexpectedly. System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the

Associate private key to certificate for PFXExportCertStoreEx

你离开我真会死。 提交于 2019-12-04 11:46:30
I'm trying to export certificate to pfx file. Here's what I do (simplified): h = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, NULL, CERT_STORE_CREATE_NEW_FLAG, NULL); p = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, CertBlob.pbData, CertBlob.cbData); CertSetCertificateContextProperty(p, CERT_KEY_PROV_HANDLE_PROP_ID, 0, &hPrivKey); CertAddCertificateContextToStore(h, p, CERT_STORE_ADD_ALWAYS, NULL); PFXExportCertStoreEx(h, &SomeBlob, L"", NULL, EXPORT_PRIVATE_KEYS); PFX created, no private key exported. Anyone ever exported private key to pfx? What's the proper way to

mac verify failure using Node with ssl certificate

非 Y 不嫁゛ 提交于 2019-12-04 02:02:25
as specified in the Node api doc I tried the first one with a self created and signed cert using openssl. Everything was going fine except the fact that the couldn't test the client side from an android because it was needed a ca certificate. When I try the second method (that with pfx and not with key,cert) https.createserver throws an error crypto.js:145 c.context.loadPKCS12(pfx); ^ Error: mac verify failure at Object.exports.createCredentials (crypto.js:145:17) at Server (tls.js:1130:28) at new Server (https.js:35:14) at Object.exports.createServer (https.js:54:10) at Object.<anonymous> (C: