127 lines
3.6 KiB
XML
127 lines
3.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
<command>
|
||
<bin>8019</bin>
|
||
</command>
|
||
<data extend="data">
|
||
|
||
<dataLen len="2" :value="dataLength()" cn="数据长度">
|
||
已签名数据长度
|
||
</dataLen>
|
||
|
||
<signData cn="已签名数据">
|
||
已签名数据
|
||
</signData>
|
||
|
||
<flag len="2" cn="标记">
|
||
<options>
|
||
<option cn="不返回">
|
||
<bin>0000</bin>
|
||
</option>
|
||
<option cn="返回">
|
||
<bin>0001</bin>
|
||
</option>
|
||
</options>
|
||
</flag>
|
||
|
||
</data>
|
||
</req>
|
||
|
||
|
||
<res>
|
||
<command>
|
||
<bin>8020</bin>
|
||
</command>
|
||
<data>
|
||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||
<options>
|
||
<option cn="无错误">
|
||
<hex>00</hex>
|
||
</option>
|
||
<option cn="公钥不符合编码规则">
|
||
<hex>04</hex>
|
||
</option>
|
||
<option cn="无效的加密标识">
|
||
<hex>06</hex>
|
||
</option>
|
||
<option cn="无效的附加模式标识">
|
||
<hex>07</hex>
|
||
</option>
|
||
<option cn="密钥奇偶校验错误">
|
||
<hex>10</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>76</hex>
|
||
</option>
|
||
<option cn="输入数据长度错误">
|
||
<hex>80</hex>
|
||
</option>
|
||
</options>
|
||
</error>
|
||
|
||
<infoLen len="2" format="X" :if="0 != $packet.data.flag$option" cn="信息长度">
|
||
信息长度
|
||
</infoLen>
|
||
|
||
<info :len="reInfoLen()" :if="0 != $packet.data.flag$option" cn="信息">
|
||
若发送报文返回证书信息标志位为0,则返回已签名数据,
|
||
若发送报文返回证书信息标志位为1,则返回CERT_INFO结构的证书数据
|
||
</info>
|
||
|
||
<oDataLen len="2" format="X" :if="0 != $packet.data.flag$option" cn="原始数据长度">
|
||
签名的原始数据长度
|
||
</oDataLen>
|
||
|
||
<oData :len="reODataLen()" :if="0 != $packet.data.flag$option" cn="原始数据">
|
||
签名的原始数据
|
||
</oData>
|
||
|
||
</data>
|
||
|
||
|
||
</res>
|
||
<script>
|
||
<![CDATA[
|
||
function dataLength() {
|
||
def len = $packet.data.signData.length;
|
||
def data = new byte[2];
|
||
data[0] = (byte)(len >> 8 & 0xFF)
|
||
data[1] = (byte)(len & 0xFF)
|
||
|
||
return data;
|
||
}
|
||
]]>
|
||
|
||
function reInfoLen() {
|
||
if (null == $final.data.infoLen){
|
||
return 0;
|
||
}
|
||
|
||
return Util.b2i( $final.getSection('data').getSection('infoLen') )
|
||
}
|
||
|
||
function reODataLen() {
|
||
if (null == $final.data.oDataLen){
|
||
return 0;
|
||
}
|
||
|
||
return Util.b2i( $final.getSection('data').getSection('oDataLen') )
|
||
}
|
||
</script>
|
||
</packet> |