Wishlist 0 ¥0.00

如何快速创建自签名证书

在Windows中有时候一些服务需要配置证书。这时候就迫切需要一张证书来配置服务。对于测试环境,建立CA过于繁琐,使用openssl又要去找安装包很不方便,因为官方没有发布安装包需要自己编译或者找三方编译的包。

     现在Windows的powershell终于可以方便的创建自签发的证书了。命令如下

New-SelfSignedCertificate -Subject test.ca.local -DNSName "test", "test.ca.local","192.168.124.27" -FriendlyName "Joe test" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddMonths(240)

      这个命令可以创建一张20年的自签发证书,其中可以自己随意定义common name和SAN名字和友好名称等。还是很实用的。注意powershell需要以管理员身份运行。

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.