4.2 自动确定要使用的证明者

因为大多数 Notes 环境都使用多个证明者,所以可通过策略将 NotesDriverShim 配置为使用不同的证明者。 Cert.xsl 样本样式表(位于 Identity_Manager_3_Linux_NW_Win.iso CD 上的 dirxml\drivers\lotusNotes\rules 目录中)是一个包含逻辑的输出转换样式表,可根据 <add> 标记上的 src‑dn 特性确定要使用的 Notes 证明者。 提供的另一个示例是 NotesCertifierSelectionSampleSS.xsl 样本样式表。 (如果从 Identity_Manager_3_Unix.iso CD 进行安装即会安装这些样式表。)

可以编辑 choose/when 语句来创建 Notes 系统证明者结构的模型。 如果可以只使用根证明者,则无需使用 Cert.xsl,因为驱动程序参数屏幕包含根证明者的信息。

要在所在环境中使用 Cert.xsl,首先要更改现有 xsl:when 语句以符合您的配置。

<xsl:when test="string($dn) = ’\dirxml-ds\provo\notes\eng’"> <xsl:attribute name="cert-id">c:\lotus\domino\data\eng.id</xsl:attribute> <xsl:attribute name="cert-pwd">certify2eng</xsl:attribute> <xsl:attribute name="user-pwd">new2notes</xsl:attribute </xsl:when>

添加所需数量的 xsl:when 语句以创建组织的证书结构的模型。

然后,更改 xsl:otherwise 中的 cert‑id 和 cert‑pwd 以符合根证明者信息。

<xsl:otherwise> <xsl:attribute name="cert-id">d:\lotus\domino\data\cert.id</xsl:attribute> <xsl:attribute name="cert-pwd">certify2notes</xsl:attribute> </xsl:otherwise>

通过将特性添加到 XML 文档的 add 标记中,Cert.xsl 可传送证明者信息。 如果 NotesDriverShim 未找到这些特性,它将使用初始化期间传递的驱动程序参数中的根证明者信息。

NOTE:Cert.xsl 还显示了如何覆盖驱动程序的其它几个参数。有关这些参数的更多信息,请参见Section 4.5, Custom Driver Parameters