简体   繁体   English

如何下载导入到 Azure Function 应用程序中的 SSL 证书?

[英]How to download SSL certificate that was imported into an Azure Function app?

Last year I uploaded a pfx certificate to a consumption-based Azure Function app.去年我上传了一个pfx证书到一个基于消费的Azure Function app。 Currently, I don't have access to it anywhere else.目前,我无法在其他任何地方访问它。 Is it possible to download this pfx file in any way?是否可以通过任何方式下载此 pfx 文件? I could not see this option on the portal.我在门户网站上看不到此选项。 Tried FTPing into the app and there was nothing there either.尝试通过 FTP 进入该应用程序,但那里也没有任何内容。

One of the workaround is to download it from your KUDU console.解决方法之一是从您的 KUDU 控制台下载它。 Steps to download your certificate.下载证书的步骤。

  1. Add WEBSITE_LOAD_CERTIFICATES to * from your Application settings.从您的应用程序设置WEBSITE_LOAD_CERTIFICATES添加到 *。

  2. Navigate to your KUDU console from Advanced Tools >> Go >> Debug Console >> Powershell .Advanced Tools >> Go >> Debug Console >> Powershell导航到您的 KUDU 控制台。

  3. Get-ChildItem -Path Cert:\CurrentUser\My lists the certificate loaded in current user. Get-ChildItem -Path Cert:\CurrentUser\My列出当前用户加载的证书。

  4. Then you can export the same to your wwwroot folder using然后您可以将其导出到您的 wwwroot 文件夹使用

    Get-ChildItem -Path Cert:\currentuser\my | Select-Object -first 1 | Export-Certificate -FilePath D:\home\site\wwwroot\certificate.pfx -Force
  5. Now you can directly download from D:\home\site\wwwroot\certificate.pfx现在可以直接从D:\home\site\wwwroot\certificate.pfx下载

    在此处输入图像描述

REFERENCES: Export SSL Certificate from Azure Web App参考资料: 从 Azure Web App 导出 SSL 证书

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM