125 lines
3.7 KiB
XML
125 lines
3.7 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
|
||
<command>
|
||
<bin>8017</bin>
|
||
</command>
|
||
<data extend="data">
|
||
<pFlag len="1" required="false" cn="P标志">
|
||
p标志
|
||
</pFlag>
|
||
<flag len="1" :if="'P' == $packet.data.pFlag" cn="flag标志">
|
||
仅当P存在时
|
||
0: SN
|
||
1: 机构号
|
||
</flag>
|
||
<dLength len="2" :value="dLen()" :if="'P' == $packet.data.pFlag" cn="长度">
|
||
仅当P存在时,根据flag标志确定是什么的长度
|
||
</dLength>
|
||
<userId cn="机构号或SN">
|
||
机构号不满16字节,后面补充0x00至16字节。
|
||
如果是SN或其他,则其长度根据SN长度确定
|
||
</userId>
|
||
<type len="1" format="X" cn="证书类型">
|
||
0x00签名证书,0x01加密证书
|
||
</type>
|
||
</data>
|
||
|
||
|
||
|
||
</req>
|
||
<res>
|
||
|
||
<command>
|
||
<bin>8018</bin>
|
||
</command>
|
||
<data>
|
||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||
<options>
|
||
<option cn="无错误">
|
||
<hex>00</hex>
|
||
</option>
|
||
<option cn="无效的私钥类型">
|
||
<hex>03</hex>
|
||
</option>
|
||
<option cn="无效私钥标记">
|
||
<hex>04</hex>
|
||
</option>
|
||
<option cn="无效的哈希标识">
|
||
<hex>05</hex>
|
||
</option>
|
||
<option cn="无效的签名标识">
|
||
<hex>06</hex>
|
||
</option>
|
||
<option cn="无效的附加标识">
|
||
<hex>07</hex>
|
||
</option>
|
||
<option cn="LMK 错误">
|
||
LMK 错误;报告给管理员。
|
||
<hex>13</hex>
|
||
</option>
|
||
<option cn="输入数据错">
|
||
<hex>15</hex>
|
||
</option>
|
||
<option cn="DSP 错误">
|
||
DSP 错误;报告给管理员。
|
||
<hex>47</hex>
|
||
</option>
|
||
<option cn="私钥错误">
|
||
私钥错误;报告给管理员。
|
||
<hex>49</hex>
|
||
</option>
|
||
<option cn="无效摘要信息语法(仅仅无哈希模式)">
|
||
<hex>74</hex>
|
||
</option>
|
||
<option cn="公钥长度错误">
|
||
<hex>76</hex>
|
||
</option>
|
||
<option cn="私钥长度错误">
|
||
<hex>78</hex>
|
||
</option>
|
||
<option cn="输入数据长度错误">
|
||
<hex>80</hex>
|
||
</option>
|
||
</options>
|
||
</error>
|
||
|
||
<certLen len="2" format="X" cn="证书的字节长度">
|
||
证书的字节长度
|
||
</certLen>
|
||
|
||
<cert :len="certLen()" cn="证书">
|
||
证书
|
||
</cert>
|
||
|
||
<tailSep len="1" required="false" cn="尾分隔">
|
||
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
|
||
<hex>19</hex>
|
||
</tailSep>
|
||
|
||
<tail maxLen="32" required="false" cn="尾部">
|
||
可选项。最大长度为 32个字符。
|
||
</tail>
|
||
</data>
|
||
|
||
|
||
|
||
</res>
|
||
<script>
|
||
function certLen() {
|
||
return Util.b2i( $final.getSection('data').getSection('certLen') )
|
||
}
|
||
<![CDATA[
|
||
function dLen() {
|
||
def len = $packet.data.userId.length;
|
||
def data = new byte[2];
|
||
data[0] = (byte)(len >> 8 & 0xFF)
|
||
data[1] = (byte)(len & 0xFF)
|
||
|
||
return data;
|
||
}
|
||
]]>
|
||
</script>
|
||
</packet>
|