Questions tagged [pfx]

pfx is a file format containing public key together with the private key for encryption and chain of trust certificates attached to the public key if such a chain exists. Pfx files are protected by a password to access.

PKCS#12, that is Public-Key Cryptography Standard number 12, allows all the identity informations to be encrypted in a single cummulative carrier to be utilized and exchanged. That carrier is the pfx file that includes the public key, the private key, and attached certificates and identities accompanying them.

604 questions
412
votes
27 answers

Cannot import the keyfile 'blah.pfx' - error 'The keyfile may be password protected'

We just upgraded our Visual Studio 2008 projects to Visual Studio 2010. All of our assemblies were strong signed using a Verisign code signing certificate. Since the upgrade we continuously get the following error: Cannot import the following key…
JasonD
  • 7,472
  • 5
  • 31
  • 31
198
votes
8 answers

Convert .pfx to .cer

Is it possible to convert a .pfx (Personal Information Exchange) file to a .cer (Security Certificate) file? Unless I'm mistaken, isn't a .cer somehow embedded inside a .pfx? I'd like some way to extract it, if possible.
Mark Carpenter
  • 17,445
  • 22
  • 96
  • 149
194
votes
5 answers

Converting pfx to pem using openssl

How to generate a .pem CA certificate and client certificate from a PFX file using OpenSSL.
new bie
  • 2,745
  • 6
  • 24
  • 26
79
votes
2 answers

"An internal error occurred." when loading pfx file with X509Certificate2

I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath("~/App_Data/myhost.pfx"), "pass"); on a shared web hosting server and I got an error: System.Security.Cryptography.CryptographicException:…
tmp3128
48
votes
2 answers

Should I add my Metro app's TemporaryKey.pfx file to version control?

I've created a Metro-style C#/XAML application, and now I'm trying to add it to version control (Git and, later, GitHub). That means figuring out which files belong in version control and which don't. When I created my Metro project, Visual Studio…
Joe White
  • 94,807
  • 60
  • 220
  • 330
45
votes
1 answer

How to check expiry date of pfx file?

How should I check the expiry date of pfx file? Can this be done in Visual Studio?
Hello123
  • 503
  • 1
  • 5
  • 11
43
votes
3 answers

How to create a snk from pfx / cer?

Microsoft seems to have created a certification jungle, that is hard to understand. Microsoft X.509 certificate (.cer) Personal Information Exchange (.pfx) Assembly Signature Key Attribute (.snk) Would it be advisable to create an snk file…
Houman
  • 64,245
  • 87
  • 278
  • 460
41
votes
1 answer

Waiting on a Task with a OnlyOnFaulted Continuation causes an AggregateException

I have some simple code as a repro: var taskTest = Task.Factory.StartNew(() => { System.Threading.Thread.Sleep(5000); }).ContinueWith((Task t) => { Console.WriteLine("ERR"); }, TaskContinuationOptions.OnlyOnFaulted); try { …
Redth
  • 5,464
  • 6
  • 34
  • 54
38
votes
1 answer

How to retrieve certificates from a pfx file with c#?

I've been googling around for half a day looking for a way to read a .pfx file and import the certificates into the certstore. So far, I am able to read the .pfx file with X509Certifcate and able to import one certificate within the .pfx file. So…
Chloé
  • 438
  • 1
  • 4
  • 6
38
votes
2 answers

How to create a valid, self-signed X509Certificate2 programmatically, not loading from file in .NET Core

What I currently do is that I use OpenSSL to generate PFX file. This is causing an unwanted dependency, especially for Windows users. So I found some examples on how to create your own certificate using BouncyCastle, but this library is not .NET…
Wapac
  • 4,058
  • 2
  • 20
  • 33
37
votes
4 answers

How can I create a PFX file from a Java Keystore?

I have a Java keystore (.jks file) holding a single certificate. How can I create a .pfx file from this keystore?
Christian Berg
  • 14,246
  • 9
  • 39
  • 44
31
votes
3 answers

what is the correct way to cancel multiple tasks in c#

I have a button thats spawns 4 tasks. The same button changes to a cancel button and clicking this should cancel all 4 tasks. Should I pass the same cancel token to all 4 tasks and have them poll on the same token for IsCancelRequested ? I am…
Gullu
  • 3,477
  • 7
  • 43
  • 70
27
votes
8 answers

Cannot import the following key file error when importing pfx

I researched this question thoroughly on stackoverflow and I have seen numerous answers but none of them have worked for us yet. We recently bought a code signing certificate from comodo that we are going to use to sign our c# WPF .net4 application.…
hobeau
  • 873
  • 1
  • 11
  • 24
26
votes
4 answers

pvk2pfx.exe - can not find

Could tell me where to find the file pvk2pfx.exe? It is supposed to be located in /Visual Studio 8/Common7/Tools/bin/pvk2pfx.exe, but not on my machine. I don't seem to be able to find it online either. I tried installing the SDK, but…
Astraport
  • 1,239
  • 4
  • 20
  • 40
26
votes
3 answers

how to load password protected certificates from the X509Store?

I am building an ACS protected Azure WCF service that will require clients to authenticate via a certificate. I would like the client (and the server) to load their respective password certs from the X509Store instead of from the file system. I am…
Pete Maroun
  • 2,045
  • 2
  • 18
  • 27
1
2 3
40 41