forked from WeBankBlockchain/WeIdentity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request WeBankBlockchain#92 from WeBankFinTech/feature/emb…
…edded-credential-replace-sd Embedded credential supports change of disclosure policy
- Loading branch information
Showing
6 changed files
with
285 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright© (2019) WeBank Co., Ltd. | ||
* | ||
* This file is part of weid-java-sdk. | ||
* | ||
* weid-java-sdk is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* weid-java-sdk is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with weid-java-sdk. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.webank.weid.protocol.cpt; | ||
|
||
import java.util.List; | ||
|
||
import com.github.reinert.jjschema.Attributes; | ||
import lombok.Data; | ||
|
||
import com.webank.weid.protocol.base.CredentialPojo; | ||
|
||
/** | ||
* Trusted timestamping envelope. | ||
* | ||
* @author junqizhang 2019.11 | ||
*/ | ||
|
||
@Data | ||
@Attributes(title = "Trusted Timestamping", description = "Trusted timestamping envelope") | ||
public class Cpt108 { | ||
|
||
/** | ||
* ID of timestamp authority. | ||
*/ | ||
String timestampAuthorityId; | ||
|
||
/** | ||
* information about timestamp authority. | ||
*/ | ||
String timestampAuthority; | ||
|
||
/** | ||
* caculate the hash from the credentials. | ||
*/ | ||
String claimHash; | ||
|
||
/** | ||
* trusted timestamping provided by the trusted third party or by the consensus of each node in | ||
* the consortium chain. | ||
*/ | ||
Long timestamp; | ||
|
||
/** | ||
* signed by Timestamp authority. authoritySignature = sign( hashKey ) | ||
*/ | ||
String authoritySignature; | ||
|
||
@Attributes(required = true, description = "Original credential list to be signed") | ||
List<CredentialPojo> credentialList; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright© (2019) WeBank Co., Ltd. | ||
* | ||
* This file is part of weid-java-sdk. | ||
* | ||
* weid-java-sdk is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* weid-java-sdk is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with weid-java-sdk. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.webank.weid.protocol.cpt; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* Trusted timestamping envelope. | ||
* | ||
* @author junqizhang 2019.11 | ||
*/ | ||
|
||
@Data | ||
public class Cpt109 { | ||
|
||
/** | ||
* caculate the hash from the entire list rather than from any single credential. | ||
*/ | ||
String claimHash; | ||
|
||
/** | ||
* trusted timestamping provided by the trusted third party or by the consensus of each node in | ||
* the consortium chain. | ||
*/ | ||
Long timestamp; | ||
|
||
/** | ||
* hashKey = hash(claimHash + timestamp) hashKey will be the key in the smart contract. | ||
*/ | ||
String hashKey; | ||
|
||
/** | ||
* signed by Timestamp authority signature = sign( hashKey ). | ||
*/ | ||
String signatureList; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters