sydapi/DProto/8012.xml
2021-06-29 11:32:24 +08:00

156 lines
4.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<bin>8012</bin>
</command>
<data extend="data">
<originLen len="2" :value="orginLength()" cn="待签名数据长度">
待签名数据长度
</originLen>
<originData cn="待签名数据">
待签名数据
</originData>
<signLen len="2" :value="signLength()" cn="数据长度">
已签名数据长度
</signLen>
<signData cn="已签名数据">
已签名数据
</signData>
<flag len="2" cn="标记">
<options>
<option cn="不上载">
<bin>0000</bin>
</option>
<option cn="上载并返回证书内容">
<bin>0001</bin>
</option>
<option cn="上传并返回证书内容,并更新机构号">
<bin>0002</bin>
</option>
</options>
</flag>
<organizationNumLen len="2" :if="useOrganization()" :value="bNumberLength()" cn="机构号长度">
标志为0002 时存在
</organizationNumLen>
<organizationNum :if="useOrganization()" cn="机构号内容">
标志为0002 时存在
</organizationNum>
</data>
</req>
<res>
<command>
<bin>8013</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" cn="信息长度">
信息长度
</infoLen>
<info :len="infoLen()" cn="信息">
若发送报文返回证书信息标志位为0则返回已签名数据,
若发送报文返回证书信息标志位为1则返回CERT_INFO结构的证书数据
</info>
</data>
</res>
<script><![CDATA[
function orginLength(){
def len = $packet.data.originData.length;
def data = new byte[2];
data[0] = (byte)(len >> 8 & 0xFF)
data[1] = (byte)(len & 0xFF)
return data;
}
function signLength(){
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 useOrganization(){
if (0002 == $packet.data.flag$option){
return true
}else {
return false
}
}
function bNumberLength(){
def len = $packet.data.organizationNum.length();
def data = new byte[2];
data[0] = (byte)(len >> 8 & 0xFF)
data[1] = (byte)(len & 0xFF)
return data;
}
function infoLen() {
if (null == $final.data.infoLen){
return 0;
}
return Util.b2i( $final.data.infoLen )
} ]]> </script>
</packet>