Skip to content

Commit

Permalink
支持自定义扩展属性的定义
Browse files Browse the repository at this point in the history
  • Loading branch information
nearzk authored and gitee-org committed Oct 13, 2021
1 parent d85dd74 commit 2f69b32
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ofdrw-sign/src/main/java/org/ofdrw/sign/OFDSigner.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public static Provider OFDRW_Provider() {
*/
private SignMode signMode;

/**
* 签名扩展属性
*/
private Parameters parameters;

/**
* 签名列表文件绝对路径
Expand Down Expand Up @@ -473,6 +477,8 @@ private Path buildSignature(SignsDir signsDir,
.setProvider(OFDRW_Provider())
// 设置签名方法
.setSignatureMethod(signContainer.getSignAlgOID())
// 设置签名扩展属性
.setParameters(parameters)
// 设置签名时间
.setSignatureDateTime(DF.format(LocalDateTime.now()));

Expand Down Expand Up @@ -620,4 +626,15 @@ public OFDSigner setRelative(String id) {
this.relativeID = id;
return this;
}

/**
* 设置签名扩展属性
*
* @param parameters 扩展属性
* @return this
*/
public OFDSigner setParameters(Parameters parameters){
this.parameters = parameters;
return this;
}
}

0 comments on commit 2f69b32

Please sign in to comment.