pfx

Joining GoDaddy-issued .spc and .key files into a complete .pfx / .cer certificate

非 Y 不嫁゛ 提交于 2019-11-28 16:03:07
问题 I have a GoDaddy-issued code signing certificate in a .spc file. Also, I have a private key in .key file. The code signing has been issued some 13 months ago, then it expired and was renewed with GoDaddy. During the renewal process no private key was requested and just a new .spc file was issues. Now I'm facing the problem of joining the original private key file with the issues certificate to form a .pfx (or .cer ?) file suitable for installation into the Windows certificate store. The

How to cancel a task that is waiting with a timeout without exceptions being thrown

我们两清 提交于 2019-11-28 09:26:13
When canceling a task that has a timeout (before the timeout has ended) using a cancel token an exception is thrown. Example: mytask.start(); bool didTaskRunInTime = mytask.wait(5 mins, _cancelToken); Which means I cannot go on like below. //was the task cancelled if (_cancelToken.IsCancelRequested) { // log cancel from user to file etc } if (didTaskRunInTime ) { int taskResult = myTask.Result; // log result to file } else if (!_cancelToken.IsCancelRequested) { // Tell user task timed out , log a message etc } I will have to do all this in my catch block and my code is looking messy. What is

create a pfx file from a .cer and a .pem file

馋奶兔 提交于 2019-11-27 21:17:39
I have used openssl to create a .key and .cer file in pem format (you can read them). Now I want to create .pfx file from them. I have read openssl doumentation it says something like following command I can use openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer but I don't know which one is my .cer file (certificate.cer or CACert.cer) what is differences between these two files? The certificate.cer is your public key and the CACert.cer file (as it names suggest) is the public key of a CA (maybe the one who has signed your certificate).

classic producer consumer pattern using blockingcollection and tasks .net 4 TPL

我只是一个虾纸丫 提交于 2019-11-27 20:09:09
Please see below pseudo code //Single or multiple Producers produce using below method void Produce(object itemToQueue) { concurrentQueue.enqueue(itemToQueue); consumerSignal.set; } //somewhere else we have started a consumer like this //we have only one consumer void StartConsumer() { while (!concurrentQueue.IsEmpty()) { if (concurrentQueue.TrydeQueue(out item)) { //long running processing of item } } consumerSignal.WaitOne(); } How do I port this pattern I have used since time immemorial to use taskfactory created tasks and the new signalling features of net 4. In other words if someone were

How to programmatically import a pfx with a chain of certificates into the certificate store?

丶灬走出姿态 提交于 2019-11-27 19:46:42
I am trying to programmatically import a X509 certificate (pfx / PKCS#12) in my local machine's certificate store. This particular certificate has a chain of certificates, the certification path looks something like this: Root certificate CA Organization certificate CA Organization 2 certificate CA My certificate The code I use looks like this: cert = new X509Certificate2(pathToCert, password); if (cert != null) { var store = new X509Store(StoreName.My, StoreLocation.LocalMachine); store.Open(OpenFlags.ReadWrite); if (!store.Certificates.Contains(cert)) { store.Add(cert); } } This code does

Multithreading or task parallel library

有些话、适合烂在心里 提交于 2019-11-27 15:10:02
问题 I have an application which performs 30 independent tasks simultaneously using multithreading, each task retrieves data over http, performs a calculation and returns a result to the ui thread. Can I use TPL to perform the same tasks? Does TPL create 30 new threads and spread them over all the available cores, or does it just split the tasks over the available cores and use one thread per core? Will there be a performance boost using TPL over multithreading in this case? 回答1: I believe TPL

Is it possible to convert an SSL certificate from a .key file to a .pfx?

喜夏-厌秋 提交于 2019-11-27 07:00:53
is there a way to convert from a .key file to a .pfx file? thank you. EDIT: I only have the .key file but my hosting provider says that I could convert it to .pfx with just that file. To check if your .key file has everything you need: #check if file contains a valid certificate: openssl x509 -text -in file.key It should print out certificate details. If it prints an error including the text "unable to load certificate", then your file is not sufficient. #check if file contains a valid key: openssl rsa -text -in file.key openssl dsa -text -in file.key One of the above commands should print out

“An internal error occurred.” when loading pfx file with X509Certificate2

断了今生、忘了曾经 提交于 2019-11-27 03:02:28
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: An internal error occurred. stack trace ends with System.Security.Cryptography.CryptographicException. ThrowCryptogaphicException(Int32 hr) +33 System.Security.Cryptography.X509Certificates.X509Utils. _LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) +0 System.Security

How to programmatically import a pfx with a chain of certificates into the certificate store?

拟墨画扇 提交于 2019-11-26 22:50:43
问题 I am trying to programmatically import a X509 certificate (pfx / PKCS#12) in my local machine's certificate store. This particular certificate has a chain of certificates, the certification path looks something like this: Root certificate CA Organization certificate CA Organization 2 certificate CA My certificate The code I use looks like this: cert = new X509Certificate2(pathToCert, password); if (cert != null) { var store = new X509Store(StoreName.My, StoreLocation.LocalMachine); store.Open

Convert .pfx to .cer

两盒软妹~` 提交于 2019-11-26 21:19:15
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. the simple way I believe is to import it then export it, using the certificate manager in Windows Management Console. Berk D. Demir PFX files are PKCS#12 Personal Information Exchange Syntax Standard bundles. They can include arbitrary number of private keys with accompanying X.509 certificates and a certificate authority chain (set certificates). If you want to extract client