当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

作者:精品下载站 日期:2024-12-14 03:14:17 浏览:12 分类:玩电脑

在 Windows Server 中导出 Let's Encrypt 证书


在上一篇文章中,我们在 Exchange Server 中安装了 Let’s Encrypt。 Exchange Server 上的一切运行良好,并且访问 OWA URL 时会显示安全连接。但是,如果您的组织中有多个 Exchange Server,该怎么办?在本文中,您将逐步学习如何在 Windows Server 中导出 Let’s Encrypt 证书。

您希望导出 Let’s Encrypt 证书(包括私钥),并将其导入到其他 Exchange 服务器上。为此,您必须首先导入证书私钥并使其可导出。这样您就可以在 Windows 中导出 Let’s Encrypt 证书。下一步是导出证书。

Let’s Encrypt SSL 证书不可导出

当您想要导出不带私钥导出选项的证书时,最好了解一下它的外观。

启动 MMC(Microsoft 管理控制台)并添加证书管理单元。 右键单击 Let’s Encrypt 证书,然后单击所有任务。单击导出...

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

正在显示证书导出向导。单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

我们需要的选项是是,导出私钥。我们无法选择导出私钥的选项,因为它是灰色的。单击取消返回。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

在下一步中,我们将导入私钥并使其可导出。导入后,我们将遵循与刚才相同的步骤。这次,我们将能够选择导出私钥的选项。本文稍后将详细介绍这一点。

在Win-ACME中查找私钥密码

在我们将私钥导入系统之前,我们必须获取证书密码。证书密码可以在Win-ACME客户端中找到。

转到 Win-ACME 文件夹并启动 Win-ACME 客户端。选择A 管理续订,然后按Enter

 A simple Windows ACMEv2 client (WACS)
 Software version 2.1.22.1260 (release, pluggable, standalone, 64-bit)
 ACME server https://acme-v02.api.letsencrypt.org/
 Scheduled task looks healthy
 Please report issues at https://github.com/win-acme/win-acme

 N: Create certificate (default settings)
 M: Create certificate (full options)
 R: Run renewals (0 currently due)
 A: Manage renewals (1 total)
 O: More options...
 Q: Quit

 Please choose from the menu: A

选择D以显示续订详细信息,然后按Enter

  Welcome to the renewal manager. Actions selected in the menu below will be
  applied to the following list of renewals. You may filter the list to target
  your action at a more specific set of renewals, or sort it to make it easier
  to find what you're looking for.

 1: mail.exoip.com - renewed 1 time, due after 2020/8/8 18:08:45

 E: Edit renewal
 D: Show details for the renewal
 R: Run the renewal
 A: Analyze duplicates for the renewal
 C: Cancel the renewal
 V: Revoke certificate(s) for the renewal
 Q: Back

 Choose an action or type numbers to select renewals: D

找到证书.pfx密码并复制密码。在我的示例中,它是n8LVJLxx2vQrC3QB2G7cn/mdeMK/RyGMBt8ECq8GYjs=

 Details for renewal 1/1

 Id:                  xfRT7WjC40mP2rVUt1uybg
 File:                xfRT7WjC40mP2rVUt1uybg.renewal.json
 FriendlyName:        mail.exoip.com
 .pfx password:       n8LVJLxx2vQrC3QB2G7cn/mdeMK/RyGMBt8ECq8GYjs=
 Renewal due:         08/08/2020 18:08:45
 Renewed:             1 times
 Target        -----------------------------------------------------------------
  - Plugin:           Manual - (Manual input)
  - CommonName:       mail.exoip.com
  - AlternativeNames  mail.exoip.com,autodiscover.exoip.com
 Validation    -----------------------------------------------------------------
  - Plugin:           SelfHosting - (Serve verification files from memory)
 Order         -----------------------------------------------------------------
  - Plugin:           Single - (Single certificate)
 CSR           -----------------------------------------------------------------
  - Plugin:           RSA - (RSA key)
 Store         -----------------------------------------------------------------
  - Plugin:           CertificateStore - (Windows Certificate Store)
  - Store:            My
  - AclFullControl:   network service,administrators
 Installation  -----------------------------------------------------------------
  - Plugin:           IIS - (Create or update https bindings in IIS)
 Installation  -----------------------------------------------------------------
  - Plugin:           Script - (Start external script or program)
  - Script:           ./Scripts/ImportExchange.ps1
  - ScriptParameters  '{CertThumbprint}' 'IIS,SMTP,IMAP' 1 '{CacheFile}'
                      '{CachePassword}' '{CertFriendlyName}'
 History       -----------------------------------------------------------------

 1: 14/06/2020 16:08:45 - Success - Thumbprint E06F2B82608090BAE540841E3EA9895804951F83

 Press <Enter> to continue

现在我们有了私钥的密码,我们可以将证书导入到系统中。

在 Windows 中导入私钥

打开以下路径找到证书。

C:\ProgramData\win-acme\acme-v02.api.letsencrypt.org\Certificates

双击证书以启动证书导入向导。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

选择本地计算机,然后单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

文件名路径将自动填写。单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

粘贴您在上一步中复制的私钥密码。选中两个复选框:

  • 将此密钥标记为可导出。这将允许您稍后备份或传输您的密钥。
  • 包括所有扩展属性

单击下一步。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

单击下一步,根据证书类型自动选择证书存储。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

单击完成完成证书导入向导。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

证书导入成功。单击确定

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

下一步是导出 Let’s Encrypt 证书。请记住,在文章开头,我们无法导出证书,因为私钥不可导出。我们现在可以选择该选项吗?

将 Let’s Encrypt 证书导出到 PFX

如果您已打开 MMC 控制台,请单击工具栏中的刷新按钮。如果需要,您可以关闭 MMC 并启动新会话。

启动 MMC 并添加证书管理单元。 右键单击 Let’s Encrypt 证书,然后单击所有任务。单击导出...

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

这次可以选择导出。单击是,导出私钥,然后单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

选中以下复选框:

  • 如果可能的话,包括认证路径中的所有证书
  • 导出所有扩展属性
  • 启用证书隐私

单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

选择密码复选框。填写将保护证书的安全密码。导入证书时需要密码。单击下一步

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

单击浏览并选择要放置证书的文件夹。在我的示例中,它将位于C:驱动器上的Certs文件夹中。确保写下名称,包括 PFX 格式。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

单击完成完成证书导出向导。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

证书导出成功。单击确定

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

启动文件资源管理器并浏览到导出的证书。这是导出的 Let’s Encrypt 证书,包括私钥。

[玩转系统] 在 Windows Server 中导出 Let's Encrypt 证书

Let’s Encrypt 证书(包括私钥)已成功导出到 Windows Server 中。现在您已拥有证书,您可以将证书导入到另一台 Exchange Server 中。

结论

您学习了如何导出 Let’s Encrypt 证书及其私钥。首先,启动Win-ACME客户端并找到密码。接下来,导入证书及其密码。之后,证书(包括私钥)就可以导出。

最好导出证书并在其他 Exchange 服务器上导入证书。请记住,您不应为每个 Exchange Server 请求证书。可以在所有 Exchange 服务器上安装一份证书。

您喜欢这篇文章吗?您可能还喜欢 Outlook 搜索栏移至顶部。不要忘记关注我们并分享这篇文章。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯