pfx

How do I securely store a .pfx password to use in MSBuild?

◇◆丶佛笑我妖孽 提交于 2019-12-18 10:55:37
问题 I need to add certificate signing to my build. Below is a sample of the working script I wrote, however it includes the password to the .pfx file. I can't keep the password in the build script. What are "best practices" or hacks that you would use in this type of situation? <ItemGroup Label="SignFiles"> <SignFilesInclude="$(FileLocation)\**\*.exe"/> </ItemGroup> <Exec Command="$(SignTool) sign /v /ac C:\MSCV-VSClass3.cer /f C:\Certificate.pfx /p Password /t http://timestamp.verisign.com

winhttpcertcfg giving access to IIS user in Windows 7

时光怂恿深爱的人放手 提交于 2019-12-18 10:44:42
问题 I need to give access to the IIS user to a pfx certificate. The website is running under the App Pool under some user AppPoolUser. IIS automatically has the user name "IIS APPPOOL\AppPoolUser" and this is what we need to give access when we use aspnet_regiis -ga . However, when i use winhttpcertcfg to give access to the user "IIS APPPOOL\AppPoolUser", it says "No account information was found". The command I use is winhttpcertcfg -i <filename> -c <certificateLocation> - g -a <account name>

How to create a snk from pfx / cer?

柔情痞子 提交于 2019-12-18 10:22:52
问题 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 based on pfx or cer? (Not sure if its even possible, and if its possible how is it done?) While an assembly can be signed with a password protected pfx, it doesn't seem to be strong named though, unless it is signed with snk instead. But the snk has no

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

*爱你&永不变心* 提交于 2019-12-17 18:58:18
问题 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 ,

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

拥有回忆 提交于 2019-12-17 08:53:24
问题 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. 回答1: 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

Convert .pfx to .cer

百般思念 提交于 2019-12-17 04:39:34
问题 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. 回答1: the simple way I believe is to import it then export it, using the certificate manager in Windows Management Console. 回答2: PFX files are PKCS#12 Personal Information Exchange Syntax Standard bundles. They can include arbitrary number of private keys with accompanying X

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

浪尽此生 提交于 2019-12-17 02:28:08
问题 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 file: companyname.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_3E185446540E7F7A This happens

Invalid provider type specified error in code signing the vsto outlook application

三世轮回 提交于 2019-12-13 15:03:39
问题 I brought a code signing certificate from GoDaddy generated a .pfx file from it. But when I use this file to code sign the clickonce manifest of my outlook vsto application I get this error in visual studio An error occurred while signing: Invalid provider type specified. What could be the problem here? Thanks. 回答1: The signing identity stored in the .pfx container are most likely older "Cryptographic Service Providers" (CSP) style. The environment you are using to sign your package looks

Setting private key permissions with PowerShell

醉酒当歌 提交于 2019-12-13 11:43:18
问题 I have a PowerShell script that installs pfx certificate into the LocalMachine certificate store. The function looks like this: function Add-Certificate { param ( [Parameter(Position=1, Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$pfxPath, [Parameter(Position=2, Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$pfxPassword ) Write-Host "Installing certificate" -ForegroundColor Yellow try { $pfxcert = new-object system.security.cryptography.x509certificates.x509certificate2

how to password protect the digitally signed pdf using iTextSharp?

南楼画角 提交于 2019-12-13 05:30:17
问题 I m creating and signing pdf using c#,itextsharp.Now i m using this code for password protection and digital sign.First i am protecting with password.Than i am signing. the transmitted pdf is not asking password while opening? Can someone tellme why is this happening? Thanks.. string passprotectedfile = filename; using (Stream input = new FileStream(signedfile, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (Stream output = new FileStream(passprotectedfile, FileMode.Create,