在 Oracle® Solaris 11.2 中确保网络安全

退出打印视图

更新时间: 2014 年 9 月
 
 

如何在 IKEv1 中处理已撤销的证书

已撤销证书是指因为某个原因而泄密的证书。使用已撤销证书会带来安全风险。验证证书是否已经撤销时,您可以使用多种方式。您可以使用静态列表,或者通过 HTTP 协议动态验证证书是否已经撤销。您可以通过四种方式处理已撤销证书。

  • 您可以指示 IKEv1 忽略在证书中嵌入了其统一资源指示符 (uniform resource indicator, URI) 的 CRL 或 OCSP。Step 5 展示了此选项。

  • 您可以指示 IKEv1 从一个 URI 访问 CRL 或 OCSP,该 URI 的地址嵌入在来自 CA 的公钥证书中。

  • 您可以指示 IKEv1 从 LDAP 服务器访问 CRL,该服务器的 DN(directory name,目录名称)项嵌入在来自 CA 的公钥证书中。

  • 您可以提供 CRL 作为 ikecert certrldb 命令的参数。有关示例,请参见Example 10–3

开始之前

您必须成为分配有 "Network IPsec Management"(网络 IPsec 管理)权限配置文件的管理员。有关更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限

  1. 显示从 CA 收到的证书。

    有关 ikecert certdb 命令的参数的信息,请参见 ikecert(1M) 手册页。

    例如,以下证书由公司的 PKI 颁发。详细信息已更改。

    # ikecert certdb -lv cert-protect.example.com
    Certificate Slot Name: 0   Type: dsa-sha256
       (Private key in certlocal slot )
     Subject Name: <O=Example, CN=cert-protect.example.com>
     Issuer Name: <CN=ExampleCo CO (Cl B), O=Example>
     SerialNumber: 14000D93
       Validity:
          Not Valid Before: 2013 Sep 19th, 21:11:11 GMT
          Not Valid After:  2017 Sep 18th, 21:11:11 GMT
       Public Key Info:
          Public Modulus  (n) (2048 bits): C575A…A5
          Public Exponent (e) (  24 bits): 010001
       Extensions:
          Subject Alternative Names:
                  DNS = cert-protect.example.com
          Key Usage: DigitalSignature KeyEncipherment
          [CRITICAL]
       CRL Distribution Points:
          Full Name:
             URI = #Ihttp://www.example.com/pki/pkismica.crl#i
             DN = <CN=ExampleCo CO (Cl B), O=Example>
          CRL Issuer: 
          Authority Key ID:
          Key ID:              4F … 6B
          SubjectKeyID:        A5 … FD
          Certificate Policies
          Authority Information Access

      请注意 CRL Distribution Points 项。

    • URI 项指示此组织的 CRL 在 Web 上是可用的。

    • DN 项指示 CRL 在 LDAP 服务器上是可用的。在 IKE 访问 CRL 后,将高速缓存该 CRL 以供将来使用。

    要访问 CRL,您需要到达分发点。

  2. 选择以下方法之一从中心分发点访问 CRL。
    • 使用 URI。

      将关键字 use_http 添加到主机的 /etc/inet/ike/config 文件。例如,ike/config 文件的显示与以下内容类似:

      # Use CRL or OCSP from organization's URI
      use_http
    • 使用 Web 代理。

      将关键字 proxy 添加到 ike/config 文件。proxy 关键字将 URL 用作参数,如下所示:

      # Use web proxy to reach CRLs or OCSP
      proxy "http://proxy1:8080"
    • 使用 LDAP 服务器。

      在主机的 /etc/inet/ike/config 文件中,将 LDAP 服务器指定为 ldap-list 关键字的参数。您的组织提供 LDAP 服务器的名称。ike/config 文件中项的显示与以下内容类似:

      # Use CRL from organization's LDAP
      ldap-list "ldap1.example.com:389,ldap2.example.com"
      …

    在证书到期之前,IKE 检索并高速缓存 CRL。

示例 10-3  将 CRL 粘贴到 IKEv1 的本地 certrldb 数据库中

如果无法从中心分发点获取 CA 的 CRL,则可以将该 CRL 手动添加到本地 certrldb 数据库。按照 CA 的说明将 CRL 提取到文件中,然后使用 ikecert certrldb -a 命令将此 CRL 添加到数据库。

# ikecert certrldb -a < ExampleCo.Cert.CRL