pfx

How export all my certificates of software separately to a .pfx file?

て烟熏妆下的殇ゞ 提交于 2019-12-08 05:26:45
问题 I want export programatically of a computer all my certificates of software separately to .pfx file to sign 2 new softwares that already are in final step of building in another pc. To make this i found a C++ code example (that after i translate to Delphi). My Delphi version still not was tested but even so i think that is working fine. program CertToPFX; {$APPTYPE CONSOLE} {$R *.res} uses Windows, WinCrypt, Classes, SysUtils; var CertContext: PCCERT_CONTEXT; CertPropId: DWORD; Data: array [0

Installing PFX certificate on a different user

天涯浪子 提交于 2019-12-07 19:16:58
问题 The code below works pefectly to install a pfx on the current user. I want to install it on another user, by giving the username and password (without having to log in with that user). I did this a while ago with a batch file, how could I do this using C#? I've tried a few things, including impersonation but couldn't make it work. X509Certificate2 certificate = new X509Certificate2("C:\\teste\\cert.pfx", "password"); X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);

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

徘徊边缘 提交于 2019-12-07 17:00:52
问题 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? 回答1: You can open the PFX in .NET, like the following: var path = <YOUR PFX FILE PATH>; var password = <YOUR PASSWORD

An error occurred while signing: Unknown error “-2147012894”

核能气质少年 提交于 2019-12-07 10:37:39
问题 I have .pfx certificate bought from https://www.globalsign.co.uk/. I've signed the ClickOnce manifest of my VSTO (Excel Add-In project type in Visual Studio) project with it and everything worked. After a month of use, I've tried to rebuilding my project (that used to work) and now it gives me an error: An error occurred while signing: Unknown error "-2147012894" The certificate is perfectly valid and not expired and signing manually like following works perfectly: SignTool sign /f mycert.pfx

Decode a PKCS#12 file

╄→尐↘猪︶ㄣ 提交于 2019-12-07 07:28:58
问题 I am looking for ways to decode a PKCS#12 file in .NET, I need to extract the private key and any certificates so that i can programatically access the following. modulus publicExponent privateExponent prime1 prime2 exponent1 exponent2 coefficient I need this informatio so that i can successfully use PKCS#11 to create a private key and cetificate on a USB token. I have found a website that uses OpenSSL to output this data. I was pretty excited when I found OpenSSL.NET however the

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

徘徊边缘 提交于 2019-12-07 02:21:49
问题 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

Installing PFX certificate on a different user

好久不见. 提交于 2019-12-06 12:42:46
The code below works pefectly to install a pfx on the current user. I want to install it on another user, by giving the username and password (without having to log in with that user). I did this a while ago with a batch file, how could I do this using C#? I've tried a few things, including impersonation but couldn't make it work. X509Certificate2 certificate = new X509Certificate2("C:\\teste\\cert.pfx", "password"); X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadWrite); store.Add(certificate); store.Close(); Update: Thanks to Bill's code,

Convert a .PEM certificate to .PFX programmatically using OpenSSL

时光毁灭记忆、已成空白 提交于 2019-12-06 06:37:57
问题 I've got a .PEM file that I want to convert to a PKCS12 file (PFX), and I know I can easily accomplish this using the following openssl command: Create a PKCS#12 file: openssl pkcs12 -export -in file.pem -out file.p12 -name "My Certificate" Which is great, but I'd like to do this programmatically using OpenSSL calls. Unfortunately, documentation for OpenSSL is less than ideal. I've looked into doing this using other libraries: Using .NET: I can create a X509Certificate2 object from a PEM file

Conversion from cert file to pfx file

怎甘沉沦 提交于 2019-12-06 02:42:14
Is it possible to convert a cert file to a pfx file? I tried importing my cerf file into IE, but it is never shown under the "personal" tab, thus I cannot export there. I am looking for if there is alternatives available. FYI, the cerf file is created by using "keytool" and then doing an export to a cert file. Martin Buberl This article describes two ways of creating a .pfx file from a .cer file: Maxime Lamure: Create your own .pfx file for ClickOnce Create your public & private Keys (You will be prompt to define the private key’s password): makecert.exe -sv MyKey.pvk -n "CN=.NET Ready!!!"

How to created a UWP app with a certificate that can be sideloaded

假装没事ソ 提交于 2019-12-06 01:48:22
问题 I am trying to create a UWP app that can be sideloaded onto other PCs. My main question is: Do I need a certificate from a trusted source to sign my application? After a lot of poking around, I learned that you can sideload/install UWP applications through the application App Installer from the Windows Store. After installing the App Installer, one can install UWP apps by double clicking on the .appxbundle file. (Not using the .ps1 file, as indicated here) Before doing this, I would need to