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

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

问题描述

我想为IIS6中的网站自动设置SSL。似乎selfSSL和certutil可用于执行此操作,但证书对我来说是新的,我不确定如何将它们放在一起。

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. 创建证书

  2. 将证书分配给网站

  3. 为网站添加安全(SSL / 443)绑定

我还想避免创建新证书网站证书已经创建。这样我就不会得到一堆还原剂证书。

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.

推荐答案

我建议你看一下IIS 6资源套件: http://www.microsoft.com/download /en/details.aspx?displaylang=en&id=17275

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

资源工具包中有一个名为 selfssl.exe - 它自动创建,分配甚至信任新创建的证书。我们使用它来确保我们的开发盒具有我们可以在测试/开发期间使用的证书。

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.

这是我们使用的命令行 - 它将使用1024的密钥大小创建证书(对于localhost),信任它,并使其有效约10年:

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

如果如果您要托管多个网站,则需要使用 / S 参数来指定要将证书添加到的网站ID。

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.

注意:这也像WinXP上的IIS 5一样,但我从来没有尝试过任何IIS 7系列。

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天全站免登陆