Skip to content

Commit

Permalink
1. 修正错误文案,避免误导开发者。本项目加签导不导出x509Certificate证书都可以加签。
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwenjing committed Feb 13, 2022
1 parent b9c79f8 commit f74ef1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
@NoArgsConstructor
@Accessors(chain = true)
public class SignRequest implements Serializable {

/**
* 唯一id, 用来区分是哪一次发送的消息,默认值=1,从1开始,{@code int} 最大, 2<sup>31</sup>-1.
*/
Expand Down
32 changes: 15 additions & 17 deletions 中国电子口岸报文加签接口文档.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# chinaport-data-signature

Version | Update Time | Status | Author | Description
---|---|---|---|---
1.0|2022-02-12 10:30|创建|Weasley J|创建api文档

## 电子口岸报文加签Controller

### CEBXxxMessage.xml加签

## 电子口岸报文加签Controller
### CEBXxxMessage.xml加签
**URL:** http://localhost:8080/rpc/eport/signature

**Type:** POST
Expand All @@ -23,17 +22,16 @@ Version | Update Time | Status | Author | Description
Parameter | Type|Description|Required|Since
---|---|---|---|---
id|int32|唯一id, 用来区分是哪一次发送的消息,默认值=1,从1开始,{@code int} 最大, 2<sup>31</sup>-1.|false|-
sourceXml|string|不带ds:Signature节点的CEbXXXMessage.xml原文|true|-
sourceXml|string|不带ds:Signature节点的CEbXXXMessage.xml原文<br><ul><br> <li><a href='http://tool.qdhuaxun.cn/ceb/CEB311Message.xml'>待加签xml报文样例</a></li><br></ul>|true|-

**Request-example:**

```
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/rpc/eport/signature --data '{
"id": 519,
"sourceXml": "eh7080"
"id": 707,
"sourceXml": "3f1pe7"
}'
```

**Response-fields:**

Field | Type|Description|Since
Expand All @@ -43,10 +41,10 @@ success|boolean|是否成功|-
timestamp|string|响应时间戳|-
code|int32|状态码|-
data|object|响应数据|-
└─success|boolean|本次是否加签成功|-
└─certNo|string|签名的ukey的卡序列号,需要用专用的工具导出|-
└─x509Certificate|string|签名的ukey证书,需要用专用工具导出|-
└─digestValue|string|xml的数字摘要,先对不包含Signature节点的原始报文,进行C14n格式化,然后取shal二进制摘要,然后对sha1的值进行base64编码<br><ul><br> <li><a href='http://tool.qdhuaxun.cn/ceb/CEB311Message.xml'> 待加签报文样例</a></li><br></ul>|-
└─success|boolean|本次加签是否成功|-
└─certNo|string|签名的ukey的卡序列号|-
└─x509Certificate|string|签名的ukey证书|-
└─digestValue|string|xml的数字摘要,先对不包含Signature节点的原始报文,进行C14n格式化,然后取shal二进制摘要,然后对sha1的值进行base64编码<br><ul><br> <li><a href='http://tool.qdhuaxun.cn/ceb/CEB311Message.xml'> 待加签xml报文样例</a></li><br></ul>|-
└─signatureValue|string|调用ukey获取的签名值|-

**Response-example:**
Expand All @@ -55,14 +53,14 @@ data|object|响应数据|-
{
"message": "success",
"success": true,
"timestamp": "2022-02-13 22:28:01",
"code": 204,
"timestamp": "2022-02-14 02:09:04",
"code": 856,
"data": {
"success": true,
"certNo": "ljih34",
"x509Certificate": "m9vr1r",
"digestValue": "pwescu",
"signatureValue": "96t2u1"
"certNo": "6luqft",
"x509Certificate": "i2aqct",
"digestValue": "zcere7",
"signatureValue": "ujfbfi"
}
}
```
Expand Down

0 comments on commit f74ef1b

Please sign in to comment.