Skip to content

Commit

Permalink
Merge pull request #343 from youwenbusi/develop
Browse files Browse the repository at this point in the history
1.8.6 release
  • Loading branch information
youwenbusi authored Oct 12, 2022
2 parents 7a24e1e + 8ecdc4f commit 9475184
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 61 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### V1.8.6 (2022-10-14)
Features:
1. Upgrade the property fields in WeIdDocument to conform to the W3C DID Specification
2. Upgrade the way data is stored and retrieved in the weid-contract
3. Upgrade the interfaces related to WeId and Evidence

### V1.8.5 (2022-08-16)
Features:
1. Replace the web3sdk with fisco-bcos-java-sdk
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.6-rc.2-SNAPSHOT
1.8.6-rc1
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ dependencies {
localDeps 'org.projectlombok:lombok:1.18.10'
if (!gradle.startParameter.isOffline()) {
compile logger, lombok, apache_commons, json, mysql_driver, redisson, zxing, rpc, pdfbox, protobuf, caffeine, oval, gson
compile("com.webank:weid-contract-java:1.3.1-rc.2-SNAPSHOT")
//compile("com.webank:weid-contract-java:1.3.0-rc1")
//compile("com.webank:weid-contract-java:1.3.1-rc.2-SNAPSHOT")
compile("com.webank:weid-contract-java:1.3.1-rc1")

compile fileTree(dir: 'lib', include: '*.jar')
implementation 'com.google.guava:guava:31.1-jre'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
jdkTlsNamedGroups=secp256r1,secp256k1
repoType=cn
repoType=en
signing.keyId=
signing.password=
signing.secretKeyRingFile=
Expand Down
39 changes: 0 additions & 39 deletions src/main/java/com/webank/weid/protocol/base/PublicKeyProperty.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* The base data structure to handle WeIdentity DID Document info.
*
* @author tonychen 2018.9.29
* @author afeexian 2022.8.29
*/
@Data
public class WeIdDocument implements JsonSerializer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* Service implementation for operation on CPT (Claim Protocol Type).
*
* @author lingfenghe
* @author afeexian
*/
public class CptServiceImpl extends AbstractService implements CptService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* Service implementations for operations on Evidence.
*
* @author chaoxinhu 2019.1
* @author afeexian 2022.10
*/
public class EvidenceServiceImpl extends AbstractService implements EvidenceService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/**
* Service implementations for operations on WeIdentity DID.
*
* @author tonychen 2018.10
* @author afeexian 2022.08
*/
public class WeIdServiceImpl extends AbstractService implements WeIdService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/**
* EvidenceServiceEngine calls evidence contract which runs on FISCO BCOS 2.0.
*
* @author yanggang, chaoxinhu
* @author afeexian, marsli
*/
public class EvidenceServiceEngineV2 extends BaseEngine implements EvidenceServiceEngine {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* WeIdServiceEngine call weid contract which runs on FISCO BCOS 2.0.
*
* @author tonychen 2019年6月21日
* @author afeexian, marsli 2022.10.10
*/
public class WeIdServiceEngineV2 extends BaseEngine implements WeIdServiceEngine {

Expand Down Expand Up @@ -157,7 +157,7 @@ public ResponseData<Boolean> createWeId(
String privateKey) {

AuthenticationProperty authenticationProperty = new AuthenticationProperty();
//在创建weid时默认添加一个id为#keys-0的verification method
//在创建weid时默认添加一个id为#keys-[hash(publicKey)]的verification method
authenticationProperty.setId(WeIdUtils.convertAddressToWeId(weAddress) + "#keys-" + DataToolUtils.hash(publicKey).substring(58));
//verification method controller默认为自己
authenticationProperty.setController(WeIdUtils.convertAddressToWeId(weAddress));
Expand Down
17 changes: 8 additions & 9 deletions src/main/java/com/webank/weid/util/DataToolUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.webank.weid.exception.DataTypeCastException;
import com.webank.weid.exception.WeIdBaseException;
import com.webank.weid.protocol.base.AuthenticationProperty;
import com.webank.weid.protocol.base.PublicKeyProperty;
import com.webank.weid.protocol.base.WeIdDocument;
import com.webank.weid.protocol.cpt.RawCptSchema;
import com.webank.weid.protocol.request.CptMapArgs;
Expand Down Expand Up @@ -623,7 +622,7 @@ public static String SigBase64Serialization(
* @param signature signature base64 string
* @return secp256k1 signature (v = 0,1)
*/
public static RsvSignature SigBase64Deserialization(String signature) {
public static RsvSignature SigBase64Deserialization(String signature) {
byte[] sigBytes = base64Decode(signature.getBytes(StandardCharsets.UTF_8));
if (SERIALIZED_SIGNATUREDATA_LENGTH != sigBytes.length) {
throw new WeIdBaseException("signature data illegal");
Expand Down Expand Up @@ -765,19 +764,19 @@ public static boolean verifySignature(
}*/

/**
* eecrypt the data. todo
* encrypt the data. todo
*
* @param data the data to encrypt
* @param publicKey public key
* @return decrypt data
* @throws Exception encrypt exception
*/
public static byte[] encrypt(String data, String publicKey)
throws Exception {
//
// cryptoSuite.
// ECCEncrypt encrypt = new ECCEncrypt(new BigInteger(publicKey));
// return encrypt.encrypt(data.getBytes());*/
public static byte[] encrypt(String data, String publicKey) throws Exception {
/*
cryptoSuite.ECCEncrypt encrypt = new ECCEncrypt(new BigInteger(publicKey));
return encrypt.encrypt(data.getBytes());
*/
return data.getBytes();
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fisco.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ group.id=1
# #
#######################################################################################################
# Fisco-Bcos sdk SSL encrypt type, false:ECDSA, true:SM2
sdk.sm-crypto=true
sdk.sm-crypto=false
# fisco-bcos sdk cert path contains[ca.crt,sdk.crt,sdk.key]
# if sdk.sm-crypto is true, contains [gm] directory, and gm dir contains [gmca.crt,gmsdk.crt,gmsdk.key,gmensdk.crt,gmensdk.key]
sdk.cert-path=conf
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/weidentity.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ amop.request.timeout=5000
amop.id=org44amop

# Blockchain node info.
nodes=10.107.120.121:23200
nodes=10.107.120.121:21200


#######################################################################################################
Expand Down

0 comments on commit 9475184

Please sign in to comment.