开发者

IIS7 LocalHost Certificate - Remove IE8 warning

开发者 https://www.devze.com 2023-02-10 05:54 出处:网络
Trying to get开发者_JS百科 rid of the mismatch error in IE8 when testing on localhost. Tried installing the Cert as admin, in IE8 and use the trusted list.

Trying to get开发者_JS百科 rid of the mismatch error in IE8 when testing on localhost.

Tried installing the Cert as admin, in IE8 and use the trusted list. Can not change the CommonName in the cert.

Tried Selfssl.exe and MakeCert winhttpcertcfg - did not try this, but not sure it will work on win7

MakeCert created a file, but it was a .CER file and IIS7 is not seeing it. Tried placing it in the MMC certificate folders, for "Computer Account" (personal and Trusted Root...)folders. Actually just about everyfolder.

Win 7 VS2010 IE8 Need localhost https selfsigned cert to not throw error i IE8?

I would not mind the MakeCert.exe if IIS7 would see the .CER file or convert it.


Was able to create and associate the certs with help from user295734's answer on Feb 15 2011. Steps that I followed:

  1. Launch command prompt as administrator
  2. Run: cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"
  3. Run makecert -r -pe -n "CN=localhost" -sky exchange -sv C:\selfcert.pvk C:\selfcert.cer
  4. New window appears, asking to set password. This example uses the letter ‘a’, as the next instruction line below uses this password after the ‘-pi’ instruction. Password specified here could be ‘anything’, but next instruction line must contain -pi anything rather than -pi a.
  5. Back at command prompt, run:
    pvk2pfx -pvk C:\selfcert.pvk -pi a -spc C:\selfcert.cer -pfx C:\selfcert.pfx
  6. Three new files should now exist:
    a. c:\Selfcert.pvk b. c:\Selfcert.cer c. Selfcert.pfx
  7. Close command prompt window
  8. Launch MMC.exe from the start bar search box.
  9. Within mmc, goto File\ Add\Remove Snap-in
  10. Choose Certificates from the available snap-ins pane and click the Add button
  11. In window that appears, choose computer account -> Next -> Local Computer -> Finish.
  12. Click OK on the Add or Remove Snap-ins window.
  13. Expand Certificates (Local Computer) in the pane containing Console Root
  14. Right click on the folder marked Personal and choose All Tasks -> Import
  15. Certificate Import Wizard will appear, Click Next.
  16. Click Browse and the Open dialog will appear
  17. Make sure to choose Personal Information Exchange (*.pvx) in the file filter dropdown.
  18. Nav to c:\selfcert.pfx (that we created earlier) and click Open.
  19. After selecting the file, chose Next in the Certificate Import Wizard.
  20. In the password box, type the password specified in step 4 above. For this example I used "a".
  21. Click Next.
  22. Choose "Place all certificates in the following store Personal" and click Next, then Finish.
  23. You will be notified that import was success and will see that the localhost pfx is available in the personal\certificates folder.
  24. Repeat steps 14 through 23 for "Trusted Root Certification Authorities".


Was able to create the PFF cert file with these cmd lines, created a batch file below. On Win7 IIs7 IE8 Make sure you have the programs makecert and pvk2pfx

Use the BAT below to create the cert files. (use any tmp path, has to exist or will not run) Then you'll use the MMC(some instructions below BAT) to import the PFX (NOT the CER) file into MMC certificates(Personal and trusted Root)


@echo off
cls

cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"
makecert -r -pe -n "CN=localhost" -sky exchange -sv C:\_bat\_cert\selfcert.pvk C:\_bat\_cert\selfcert.cer
pvk2pfx -pvk C:\_bat\_cert\selfcert.pvk -pi a -spc C:\_bat\_cert\selfcert.cer -pfx C:\_bat\_cert\selfcert.pfx

pause

NOTE: -pi a is the password. It will ask you for this when you run these programs. You can set -pi to what ever, but make sure to set it, because when importing the PFX cert it will ask you for this password.

using MMC to create pvk file cmd prompt run mmc (mmc.exe).

File >> Add/removeSnap-in >> Certificates >> ADD >> Computer account >> OK Open Certificates under Console Root. Right click Personal >> All Tasks >> Import. Then import the PFX file into the Personal Certificates and Trusted Root Cert. Auth.

In IIS7, choose Certificates, refresh, and the localhost cert should be there.

There was also 2 other programs to help out, that i did not get to try cert2spc C:_bat_cert\selfcert.cer C:_bat_cert\selfcert.spc pvkimprt -pfx C:_bat_cert\selfcert.pvkselfcert.spc C:_bat_cert\selfcert.pvkselfcert.pvk

The localhost cert did remove my IE8 warning!

But my main issue was with downloading files over https://localhost I thought it was cert problem, but the error is still showing, "Unable to download from localhost" Any suggestions on the download problem?

0

精彩评论

暂无评论...
验证码 换一张
取 消