1、修改了8017指令xml文档,兼容通过sn获取证书信息。添加通过sn获取证书信息的接口

This commit is contained in:
zhoubin
2021-12-27 16:17:38 +08:00
parent 45db61b1cd
commit 38327139b7
6 changed files with 149 additions and 34 deletions
+30 -5
View File
@@ -6,10 +6,23 @@
<bin>8017</bin>
</command>
<data extend="data">
<userId cn="用户编号">
用户编号
<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>
@@ -93,7 +106,19 @@
</res>
<script>function certLen() {
return Util.b2i( $final.getSection('data').getSection('certLen') )
} </script>
<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>