跳到主要内容

3. 语法

本节描述这三种服务的请求和回复语法, 并给出简单示例.

3.1. 认证请求​

认证请求是包含自签名证书的 RFC 1421 MIC-ONLY 或 MIC-CLEAR 隐私增强消息. 只有一个签名者.

自签名证书具有以下字段 (与 RFC 1422 中一样, 其类型为 Certificate):

        version is 0
serialNumber is arbitrary; the value 0 is suggested unless the
certification authority specifies otherwise
signature is the algorithm by which the self-signed
certificate is signed; it need not be the same as the
algorithm by which the requested certificate is to be
signed
issuer is the requestor's distinguished name
validity is arbitrary; the value with start and end both at
12:00am GMT, January 1, 1970, is suggested unless the
certification authority specifies otherwise
subject is the requestor's distinguished name
subjectPublicKeyInfo is the requestor's public key

请求者的 MIC 加密算法必须是非对称算法 (例如 RSA), MIC 算法必须是无密钥算法 (例如 RSA-MD2, 而不是 MAC), 以便任何人都能验证签名.

示例:

      To: [email protected]
From: [email protected]
-----BEGIN PRIVACY-ENHANCED MESSAGE-----
Proc-Type: 4,MIC-ONLY
Content-Domain: RFC822
Originator-Certificate: <requestor's self-signed certificate>
MIC-Info: RSA,RSA-MD2,<requestor's signature on text>
<text>
-----END PRIVACY-ENHANCED MESSAGE-----

3.2. 认证回复​

认证回复是包含新证书, 从该证书到 RFC 1422 Internet 认证机构的认证路径, 以及可能包含的其他证书的 RFC 1421 MIC-ONLY 或 MIC-CLEAR 隐私增强消息. 只有一个签名者. "MIC-Info:" 字段和封装文本直接取自认证请求. 回复与请求具有相同的处理类型 (MIC-ONLY 或 MIC-CLEAR).

由于回复是普通隐私增强消息, 新证书可以在正常的隐私增强邮件处理过程中插入请求者的数据库. 请求者可以将回复转发给其他请求者, 以分发该证书.

示例:

      To: [email protected]
From: [email protected]
-----BEGIN PRIVACY-ENHANCED MESSAGE-----
Proc-Type: 4,MIC-ONLY
Content-Domain: RFC822
Originator-Certificate: <requestor's new certificate>
Issuer-Certificate: <issuer's certificate>
MIC-Info: RSA,RSA-MD2,<requestor's signature on text>
<text>
-----END PRIVACY-ENHANCED MESSAGE-----

3.3. CRL 存储请求​

CRL 存储请求是 RFC 1421 CRL 类型的隐私增强消息, 其中包含待存储的 CRL, 并且可选地包含它们到 RFC 1422 Internet 认证机构的认证路径.

示例:

      To: [email protected]
From: [email protected]
-----BEGIN PRIVACY-ENHANCED MESSAGE-----
Proc-Type: 4,CRL
CRL: <CRL to be stored>
Originator-Certificate: <CRL issuer's certificate>
CRL: <another CRL to be stored>
Originator-Certificate: <other CRL issuer's certificate>
-----END PRIVACY-ENHANCED MESSAGE-----

3.4. CRL 存储回复​

CRL 存储回复是确认已存储 CRL 的普通消息. 未规定特定语法.

3.5. CRL 检索请求​

CRL 检索请求是一种新型隐私增强消息, 通过处理类型 CRL-RETRIEVAL-REQUEST 与 RFC 1421 隐私增强消息区分开来.

该请求包含两个或更多封装头字段: 必需的 "Proc-Type:" 字段和一个或多个 "Issuer:" 字段. 这些字段必须按上述顺序出现. 由于没有封装文本, 因此字段与封装文本之间没有空行分隔.

每个 "Issuer:" 字段都指定一个要检索其最新 CRL 的颁发者. 该字段包含一个 Name 类型的值, 用于指定颁发者的可识别名称. 该值的编码方式与 RFC 1421 的 "Originator-ID-Asymmetric:" 字段相同 (即先按照基本编码规则 (Basic Encoding Rules) 编码, 然后以 ASCII 表示).

示例:

      To: [email protected]
From: [email protected]
-----BEGIN PRIVACY-ENHANCED MESSAGE-----
Proc-Type: 4,CRL-RETRIEVAL-REQUEST
Issuer: <issuer whose latest CRL is to be retrieved>
Issuer: <another issuer whose latest CRL is to be retrieved>
-----END PRIVACY-ENHANCED MESSAGE-----

3.6. CRL 检索回复​

CRL 检索回复是 RFC 1421 CRL 类型的隐私增强消息, 其中包含检索到的 CRL, 它们到 RFC 1422 Internet 认证机构的认证路径, 以及可能包含的其他证书.

由于回复是普通隐私增强消息, 检索到的 CRL 可以在正常的隐私增强邮件处理过程中插入请求者的数据库. 请求者可以将回复转发给其他请求者, 以分发这些 CRL.

示例:

      To: [email protected]
From: [email protected]
-----BEGIN PRIVACY-ENHANCED MESSAGE-----
Proc-Type: 4,CRL
CRL: <issuer's latest CRL>
Originator-Certificate: <issuer's certificate>
CRL: <other issuer's latest CRL>
Originator-Certificate: <other issuer's certificate>
-----END PRIVACY-ENHANCED MESSAGE-----