aspnetcore导出开发证书玩法
简书链接:aspnetcore导出开发证书玩法
文章字数:194,阅读全文大约需要1分钟
1 | dotnet dev-certs https --trust --export-path aa.pem --no-password --format PEM |
如下 导出pem格式 公钥和私钥一起生成。
1 | C:\Users\Administrator>dotnet dev-certs https --trust --export-path aa.pem --no-password --format PEM |
官方文档中 ,pem为私钥部分
更多命令如下
1 | dotnet dev-certs https |
生成crt
1 | dotnet dev-certs https -ep ./certificate.crt -p $CREDENTIAL_PLACEHOLDER$ --trust --format PEM |
更多参考文档
https://learn.microsoft.com/zh-cn/dotnet/core/tools/dotnet-dev-certs
在 ASP.NET Core 中强制使用 HTTPS | Microsoft Learn
https://learn.microsoft.com/zh-cn/aspnet/core/security/authentication/certauth?view=aspnetcore-8.0
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 情迁博客!
评论