IIS6:从命令行创建/安装 SSL 自签名证书 [英] IIS6: Create/install SSL self-signed cert from command line

查看:69
本文介绍了IIS6:从命令行创建/安装 SSL 自签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want to automate the setup of SSL for a website in IIS6. It appears selfSSL and certutil can be used to do this but certificates are new to me and I'm unsure how to put them together.

From what I understand I need to:

  1. create a certificate
  2. assign the certificate to the website
  3. add a secure (SSL/443) binding to the website

I would also like to avoid creating a new certificate if the site cert has already been created. That way I don't end up with a bunch of redudant certs.

解决方案

I would suggest you look at the IIS 6 Resource Kit: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17275

There is a tool in the resource kit called selfssl.exe - it automates the creation, assignment and even trusting of the newly created certificate. We use it quite a bit where I work to ensure that our dev boxes have certificates we can use during testing/development.

Here is the command line we use - it will create the cert (for localhost) using a key-size of 1024, trust it, and make it valid for ~10 years:

selfssl.exe /T /N:CN=localhost /K:1024 /V:3650

If you are hosting multiple sites, you will need to use the /S parameter to specify the site id you want to add the certificate to.

Note: this also works like a champ with IIS 5 on WinXP, but I have never tried it on any of the IIS 7 family.

这篇关于IIS6:从命令行创建/安装 SSL 自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆