RepChain-1.0-preview集成国密(中宇提供算法实现):

1、系统所涉及到的密钥对、证书均采用SM2;
2、系统所涉及到的摘要算法均采用SM3;
3、系统所涉及到的交易签名、验签算法均使用SM3withSM2;
4、akka配置为 无 ssl传输(实际部署使用中宇国密组网)
This commit is contained in:
brightestboy 2019-08-26 16:01:03 +08:00
parent 343400b5dd
commit 6b050c565e
40 changed files with 454 additions and 184 deletions

View File

@ -0,0 +1,7 @@
{
"215159697776981712" : 10000000,
"904703631549900672" : 10000000,
"989038588418990208" : 10000000,
"645377164372772928" : 10000000,
"379552050023903168" : 10000000
}

View File

@ -0,0 +1,6 @@
{
"from" : "215159697776981712",
"to" : "904703631549900672",
"amount" : 5
}

View File

@ -0,0 +1,5 @@
{
"from" : "379552050023903168",
"to" : "215159697776981712",
"amount" : 5
}

View File

@ -0,0 +1,5 @@
{
"from" : "645377164372772928",
"to" : "379552050023903168",
"amount" : 5
}

View File

@ -0,0 +1,5 @@
{
"from" : "904703631549900672",
"to" : "989038588418990208",
"amount" : 5
}

View File

@ -0,0 +1,5 @@
{
"from" : "989038588418990208",
"to" : "645377164372772928",
"amount" : 5
}

View File

@ -53,7 +53,7 @@ libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
libraryDependencies += "org.codehaus.janino" % "janino" % "3.0.12"
libraryDependencies += "org.bouncycastle" % "bcprov-jdk15on" % "1.61"
//libraryDependencies += "org.bouncycastle" % "bcprov-jdk15on" % "1.61"
libraryDependencies ++= Seq(
"io.swagger" % "swagger-jaxrs" % "1.5.18",

View File

@ -2,16 +2,16 @@
actor {
warn-about-java-serializer-usage = off//关闭Java序列化来序列化消息时的警告建议不要开启。如果开启开启值=on
default-mailbox {
//akka默认邮箱的选择默认配置是akka.dispatch.SingleConsumerOnlyUnboundedMailbox这是一个多生产者单消费者队列。建议不要修改此参数
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
}
default-dispatcher{
//akka dispatcher 配置采用akka的默认的fork-join-executor建议不要修改。
parallelism-min =80 //最小的线程数
parallelism-factor = 3.0 //并行因子配置
parallelism-max = 200 //最大的线程数
throughput = 10
}
//akka默认邮箱的选择默认配置是akka.dispatch.SingleConsumerOnlyUnboundedMailbox这是一个多生产者单消费者队列。建议不要修改此参数
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
}
default-dispatcher {
//akka dispatcher 配置采用akka的默认的fork-join-executor建议不要修改。
parallelism-min = 80 //最小的线程数
parallelism-factor = 3.0 //并行因子配置
parallelism-max = 200 //最大的线程数
throughput = 10
}
}
// cluster {
@ -22,9 +22,11 @@
#remote.netty.tcp.port=0
// remote.netty.ssl.port = 0
remote {
//远程相关的配置
//远程相关的配置
netty.ssl {
//在单机单节点的情况下配置机器ip
//要用SSL传输的话需要为true改为GM的时候需要为false
enable-ssl = false
//在单机单节点的情况下配置机器ip
// hostname=192.168.100.93
//在单机单节点的情况下需要配置具体的端口在单机多节点的情况下直接配置为0
port = 0
@ -36,12 +38,12 @@
netty.ssl.security {
//基础路径,证书的存放路径,建议不要修改
base-path = "jks/"
base-path = "pfx/"
//名称前缀,证书的名称前缀,不要修改
base-name = ""
//证书的别名,需要跟节点的名称要保持一致
alias = "121000005l35120456.node1"
alias = "215159697776981712.node1"
//用户ca文件密码
key-store-password = "123"
//用户证书密码
@ -52,39 +54,39 @@
}
akka.http {
//akka 与http服务相关的配置
idle-timeout = 100s//一个空闲连接超时时间配置,当空闲连接超时之后,将被自动关闭
server {
server-header = akka-http/${akka.http.version}//http服务头建议不要修改
idle-timeout = 100s//空闲连接超时时间,超时将自动关闭连接
request-timeout = 100s //请求对超时时间
max-connections = 1024//最大对连接数
}
client {
idle-timeout = 100s //空闲连接超时时间,超时将自动关闭
connecting-timeout = 100s//建立连接对超时时间
}
//akka 与http服务相关的配置
idle-timeout = 100s//一个空闲连接超时时间配置,当空闲连接超时之后,将被自动关闭
server {
server-header = akka-http/${akka.http.version}//http服务头建议不要修改
idle-timeout = 100s//空闲连接超时时间,超时将自动关闭连接
request-timeout = 100s //请求对超时时间
max-connections = 1024//最大对连接数
}
client {
idle-timeout = 100s //空闲连接超时时间,超时将自动关闭
connecting-timeout = 100s//建立连接对超时时间
}
}
system {
//创世节点的名称,在系统初始化时,将根据该节点是否是创世节点进行创世块的建立
genesis_node_name="121000005l35120456.node1"
//创世节点的名称,在系统初始化时,将根据该节点是否是创世节点进行创世块的建立
genesis_node_name = "215159697776981712.node1"
//api是否开启
//如果是单机多节点测试模式Repchain则选择0默认节点1会开启
ws_enable = 1//api 0,不开启;1,开启
//交易生产方式
trans_create_type = 1 //0,手动;1,自动
trans_create_type = 0 //0,手动;1,自动
//是否进行TPS测试
statistic_enable = 1 // 0,unable;able
//实时图的事件是否发送,如果不发送,前端实时图将收不到任何消息。
realtimegraph_enable = 1//0 unable;1 enable; default 1
httpServicePort = 8081//http服务的端口号默认为8081
checkCertValidate = 0//设置是否检查证书的有效性默认为0 0=不校验1=校验
contractOperationMode = 0//设置合约的运行方式0=debug方式1=deploy默认为debug方式如果发布部署必须使用deploy方式。
number_of_transProcessor = 10//
block {
@ -102,23 +104,23 @@ system {
//最低投票人数量
vote_note_min = 4
//参与共识的节点别名
vote_node_list = ["121000005l35120456.node1","12110107bi45jh675g.node2",
"122000002n00123567.node3","921000005k36123789.node4","921000006e0012v696.node5"]
vote_node_list = ["215159697776981712.node1", "904703631549900672.node2",
"989038588418990208.node3", "645377164372772928.node4", "379552050023903168.node5"]
}
account{
chaincodename = "ContractCert"//账户管理合约的名称
account {
chaincodename = "ContractCert"//账户管理合约的名称
chaincodeversion = 1
//证书状态改变函数名
CertStatusChangeFunction="UpdateCertStatus"
CertStatusChangeFunction = "UpdateCertStatus"
}
diskspaceManager{
diskspacealarm = 5000//磁盘最少空间大小单位M ,小于这个值系统将不能启动。
}
diskspaceManager {
diskspacealarm = 5000//磁盘最少空间大小单位M ,小于这个值系统将不能启动。
}
transaction {
//辅助自动创建交易的间隔
tran_create_dur = 50 //millis
tran_create_dur = 100 //millis
//最大交易缓存量
max_cache_num = 60000
}
@ -128,11 +130,11 @@ system {
node_stable_delay = 5000 //millis
}
storage{
dbpath="/repchaindata/data/leveldbdata"
blockpath="/repchaindata/data/blockdata"
filemax=200000000//单位为字节
}
storage {
dbpath = "/repchaindata/data/leveldbdata"
blockpath = "/repchaindata/data/blockdata"
filemax = 200000000//单位为字节
}
time {
//通用稳定延迟
@ -170,5 +172,5 @@ system {
//共识类型,目前只支持一种
type = "CRFD"
}
}

View File

@ -2,7 +2,7 @@
"version" : 1,
"height" : "1",
"transactions" : [ {
"id" : "2f0c6be5-c536-405d-9261-8eb270686a30",
"id" : "87829e3b-1b8a-4cc3-949d-08151f25051e",
"type" : "CHAINCODE_DEPLOY",
"cid" : {
"chaincodeName" : "ContractCert",
@ -15,14 +15,14 @@
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.345Z",
"signature" : "MEUCIQDMIkahOfVPXjnzLmZsj4ERrd2XzLTamt7Jd10mJgfesAIgDkbLy82rRG3fcPJ1FiC0vnsZm5I8DX0a83aCu10C3G8="
"tmLocal" : "2019-08-21T17:01:39.190Z",
"signature" : "MEUCIQDP5qXQPGSeQpwCt6VKkjtuc/RMg7lfcgtjqg/wdZZQjwIgSYF+bvoUJS06PlFQaGyCaL5sHGoS6bAGczlkKd0S088="
}
}, {
"id" : "95d4f8b0-4a30-421c-af4f-649d16465262",
"id" : "2f3e3c37-0be9-4c04-847f-837c1e72d338",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -30,18 +30,18 @@
},
"ipt" : {
"function" : "SignUpSigner",
"args" : [ "{\"name\":\"node1\",\"creditCode\":\"121000005l35120456\",\"mobile\":\"18912345678\",\"certNames\":[\"node1\"]}" ]
"args" : [ "{\"name\":\"node1\",\"creditCode\":\"215159697776981712\",\"mobile\":\"18912345678\",\"certNames\":[\"node1\"]}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.906Z",
"signature" : "MEUCIGMyn+u7wwHqLMLFBqISYc0EMQAqolIHQV/5ggrF4Fw7AiEA5S5ssuwU7tPpdsElXFdxqOVI6lqyfz9zZasr/M+iyZk="
"tmLocal" : "2019-08-21T17:01:39.727Z",
"signature" : "MEYCIQDvNHa4aQVyJ4yH0bGJHEj86/YktXKhLtX/r5Cm+3emVwIhALGUqsDu2nVD9wwdxJ/weWM+/5oOQ0cCYQxClEYGTy8U"
}
}, {
"id" : "62703174-72a8-4574-b4d4-2d48df2ba82d",
"id" : "81ec0f20-0984-4974-9021-baf69bca1309",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -49,18 +49,18 @@
},
"ipt" : {
"function" : "SignUpSigner",
"args" : [ "{\"name\":\"node2\",\"creditCode\":\"12110107bi45jh675g\",\"mobile\":\"18912345678\",\"certNames\":[\"node2\"]}" ]
"args" : [ "{\"name\":\"node2\",\"creditCode\":\"904703631549900672\",\"mobile\":\"18912345678\",\"certNames\":[\"node2\"]}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.914Z",
"signature" : "MEQCIAGSvBGsx0agUy4mZdHK1MFRD2m9WYI0bU2FJLXJ7dJCAiB9T3laoZyOWgWhWeiJxkdgLHS52wrqyvX7Hv7oEB7fQg=="
"tmLocal" : "2019-08-21T17:01:39.751Z",
"signature" : "MEYCIQDcgbh9BXSVAJltROJnowngVC4St4rZxVfPlJmhqUdL/wIhAKHOHd8fxQ14e/icgygFHccNVMPqxHPqCdj7gk5Y/8IY"
}
}, {
"id" : "c7cfd74f-4e63-4efd-a97c-2b97b6773c98",
"id" : "8e1c4b9d-0467-427c-8aa2-59985183b655",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -68,18 +68,18 @@
},
"ipt" : {
"function" : "SignUpSigner",
"args" : [ "{\"name\":\"node3\",\"creditCode\":\"122000002n00123567\",\"mobile\":\"18912345678\",\"certNames\":[\"node3\"]}" ]
"args" : [ "{\"name\":\"node3\",\"creditCode\":\"989038588418990208\",\"mobile\":\"18912345678\",\"certNames\":[\"node3\"]}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.917Z",
"signature" : "MEQCIB6bL64WF8HngiK51/x4hcAbLtHCnoO7jv5n8pA28AA6AiAiNeiTxTbNd8AklfWCuEZ81qIA1BuswGd46Zl1YX2Pqw=="
"tmLocal" : "2019-08-21T17:01:39.770Z",
"signature" : "MEYCIQD1MXasDfI58eYZJH5lvqCgYWRVgskfoq2ioKG9fzY/wwIhAPwEECl7rY1n/4E/Y4niwk3Sq3mGp+D2YAHnILDTa3ks"
}
}, {
"id" : "7a6e689d-beda-4bc5-bde6-86668872894f",
"id" : "bf42056a-2e96-47fe-8b7c-54a32ffb413a",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -87,18 +87,18 @@
},
"ipt" : {
"function" : "SignUpSigner",
"args" : [ "{\"name\":\"node4\",\"creditCode\":\"921000005k36123789\",\"mobile\":\"18912345678\",\"certNames\":[\"node4\"]}" ]
"args" : [ "{\"name\":\"node4\",\"creditCode\":\"645377164372772928\",\"mobile\":\"18912345678\",\"certNames\":[\"node4\"]}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.920Z",
"signature" : "MEUCIQD/tdJlDSM67ddNzzh68kOIvMtJwqQIdkH1P55Hu78nWgIgZUxtqZLuV8y8b9dv3ez+X1Zh+8LcpYiXkNVpBkXHxuA="
"tmLocal" : "2019-08-21T17:01:39.793Z",
"signature" : "MEQCIA9ufkPgWr3irsrJTdT14K/FwcJKt20eqmO+PS/fP1WgAiBg/fnjpzlJiBYUV4nlrJLwVMUKjHQ/GpmVZ2OXpBdkyg=="
}
}, {
"id" : "1b8d78d7-8f5d-45de-8fe6-041a91fe1a27",
"id" : "57bc00a2-ac24-4080-89b5-476abe46ff5e",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -106,18 +106,18 @@
},
"ipt" : {
"function" : "SignUpSigner",
"args" : [ "{\"name\":\"node5\",\"creditCode\":\"921000006e0012v696\",\"mobile\":\"18912345678\",\"certNames\":[\"node5\"]}" ]
"args" : [ "{\"name\":\"node5\",\"creditCode\":\"379552050023903168\",\"mobile\":\"18912345678\",\"certNames\":[\"node5\"]}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.922Z",
"signature" : "MEUCIQDcpMXEz+o0W0DTDIEsmGMZ+0cTOgG5DwBaIv0QDabOjgIgUUohxBJb5FxxGV115pSekjVAvvbjtop9m0bsgkFu8Fc="
"tmLocal" : "2019-08-21T17:01:39.813Z",
"signature" : "MEYCIQD9EabM96mj6nHRt8HZxh+dFUI/k6ahXmIyikvW2mA2VgIhAM9yDoDC380GTzJaEUDLfm/SqVRHzj9yQFeEopOC9rfS"
}
}, {
"id" : "67d27f39-a80e-4a23-89c3-2423dfda4186",
"id" : "56903c4a-1f84-42ec-ae60-1497b3839ef7",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -125,18 +125,18 @@
},
"ipt" : {
"function" : "SignUpSigner",
"args" : [ "{\"name\":\"super_admin\",\"creditCode\":\"951002007l78123233\",\"mobile\":\"18912345678\",\"certNames\":[\"super_admin\"]}" ]
"args" : [ "{\"name\":\"super_admin\",\"creditCode\":\"257091603041653856\",\"mobile\":\"18912345678\",\"certNames\":[\"super_admin\"]}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.925Z",
"signature" : "MEUCIBshz7oUgVQW9LzqummVOdH4WCSeM7JsA7cxfJ+IWy+GAiEA2X1hX3Rw5EiPHT7NSh2qQrOuEqpIdhCDGu+f2fCMOqo="
"tmLocal" : "2019-08-21T17:01:39.830Z",
"signature" : "MEUCIQCkKKGhFcFrFLpgAy8ySW4vybv5klIpEC+SaZ7Xk/3IogIgPN7Jekyl3HrkuvyweKpaB21TYUb0ee8Sf7DdSBbhRGM="
}
}, {
"id" : "64f1cf02-48e1-4c0a-aa92-ef207da96d76",
"id" : "55a1dd11-d3f8-4cf7-ac06-ec67e172d783",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -144,18 +144,18 @@
},
"ipt" : {
"function" : "SignUpCert",
"args" : [ "{\"credit_code\":\"121000005l35120456\",\"name\":\"node1\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIIBmjCCAT+gAwIBAgIEXIn07TAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJjbjEL\\r\\nMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJqMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwG\\r\\nA1UECwwFaXNjYXMxCjAIBgNVBAMMATEwHhcNMTkwMzE0MDYzMDA1WhcNMjAwMzEz\\r\\nMDYzMDA1WjBWMQswCQYDVQQGEwJjbjELMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJq\\r\\nMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwGA1UECwwFaXNjYXMxCjAIBgNVBAMMATEw\\r\\nVjAQBgcqhkjOPQIBBgUrgQQACgNCAASlh+oDBPdwHEkpQT4/g4RX9ubP7jMM2Qod\\r\\niFtsnv+ObQ3dxfQN/S515ePssn3HjPCwfzR3S1KY4O9vFtH1Jql9MAoGCCqGSM49\\r\\nBAMCA0kAMEYCIQCG2NFkYx06oWahUDflmXDkoXyTBIvjnA/M2yJlou3RIQIhAJcA\\r\\n1X1djf5oGPc+6GYh9g4YhQ59HxV3p6kAEuRI13PP\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SHA1withECDSA\",\"certValid\":true,\"regTime\":{\"seconds\":1564043438,\"nanos\":937000000}}}" ]
"args" : [ "{\"credit_code\":\"215159697776981712\",\"name\":\"node1\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIICEjCCAbagAwIBAgIGAWyyKEVUMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC\\r\\nQ04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5\\r\\nMDcGA1UEAx4wADIAMQA1ADEANQA5ADYAOQA3ADcANwA2ADkAOAAxADcAMQAyAC4A\\r\\nbgBvAGQAZQAxMCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx\\r\\nCzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL\\r\\nHgYAUwBEAFIxOTA3BgNVBAMeMAAyADEANQAxADUAOQA2ADkANwA3ADcANgA5ADgA\\r\\nMQA3ADEAMgAuAG4AbwBkAGUAMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABJr9\\r\\n7SnDEsJk46bYsh9P4smxabU7I6rJcWMPEL909MLnXGsCG02gYjp1jZgCYmIaQkyF\\r\\n3pmfJQEthwZ9M2X0YLujLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF\\r\\nBQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiALobzTI768h7+iSpDN\\r\\nbfg+kkuZ3S4mCxlh3K/77aMktgIhAK4wzwfLEhi+wX/tGvkPR17hybi4aGByiT/C\\r\\nOMp6Hkit\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SM3withSM2\",\"certValid\":true,\"regTime\":{\"seconds\":1566378099,\"nanos\":848000000}}}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.970Z",
"signature" : "MEUCIQCyM2wNqdRqvHiCEwr8JKrsNAkQqew3Su3ZJpC50Q2CNwIgF6kdWhZA8aUCEAB6Cv30M7TrdAFqQWYaUBSeh605Ucs="
"tmLocal" : "2019-08-21T17:01:39.904Z",
"signature" : "MEQCIAWasmXGnd0sL3dSHc6f9wH+qtuIEjWIfbq0b2o6UjlQAiB6VEOEFfWsfZW/DjK6TYLyBSI6H0dlndxsmM/dFNP4BA=="
}
}, {
"id" : "c5fe9700-1828-44d3-aa3f-873416089649",
"id" : "4cfe071e-0776-4f31-bc27-fb88c79d6081",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -163,18 +163,18 @@
},
"ipt" : {
"function" : "SignUpCert",
"args" : [ "{\"credit_code\":\"12110107bi45jh675g\",\"name\":\"node2\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIIBmTCCAT+gAwIBAgIEXIn2LzAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJjbjEL\\r\\nMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJqMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwG\\r\\nA1UECwwFaXNjYXMxCjAIBgNVBAMMATIwHhcNMTkwMzE0MDYzNTI3WhcNMjAwMzEz\\r\\nMDYzNTI3WjBWMQswCQYDVQQGEwJjbjELMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJq\\r\\nMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwGA1UECwwFaXNjYXMxCjAIBgNVBAMMATIw\\r\\nVjAQBgcqhkjOPQIBBgUrgQQACgNCAAQbGHprzZj8UABd4LFvAoFVPFc/xDkWybEJ\\r\\noF3iey/BvIVvBrB92xskV8ULlOt+qjQGIz0SdRiCrqs+YacCAo/xMAoGCCqGSM49\\r\\nBAMCA0gAMEUCIDdarnwrREWGu3YQMvcFItU3e5X9J7kwgVw3uvZg77r0AiEAgIhG\\r\\nTTVwdvjjewyeOXoVT/emsGz314jZJTYbtzoZiv8=\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SHA1withECDSA\",\"certValid\":true,\"regTime\":{\"seconds\":1564043438,\"nanos\":979000000}}}" ]
"args" : [ "{\"credit_code\":\"904703631549900672\",\"name\":\"node2\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIICEjCCAbagAwIBAgIGAWyyKEkIMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC\\r\\nQ04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5\\r\\nMDcGA1UEAx4wADkAMAA0ADcAMAAzADYAMwAxADUANAA5ADkAMAAwADYANwAyAC4A\\r\\nbgBvAGQAZQAyMCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx\\r\\nCzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL\\r\\nHgYAUwBEAFIxOTA3BgNVBAMeMAA5ADAANAA3ADAAMwA2ADMAMQA1ADQAOQA5ADAA\\r\\nMAA2ADcAMgAuAG4AbwBkAGUAMjBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABIRp\\r\\nr3hOd1RgGqAwxxch3830dQStesVZOSYfSm+5oZk3twC4xEFMBsHswxLaHWBOAbUG\\r\\nUHh668N1in48wucUi2ijLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF\\r\\nBQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiBATr4I/QkDDAvzVSHJ\\r\\nIK2sRXm9DOd6j5d46rHQB5ffawIhAJQCLu1/TM0rpWBs52PGbh3IRAEJ2d9VASNS\\r\\nBFNTWtG/\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SM3withSM2\",\"certValid\":true,\"regTime\":{\"seconds\":1566378099,\"nanos\":931000000}}}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.980Z",
"signature" : "MEUCIBqAPQh7maJy2QoNekVI11zBe+KkZlF+AaPR0kKceHFoAiEAtg8D8vsiReM40Gcn5q+1g3kedKwMZo47vuKt/Fop4sc="
"tmLocal" : "2019-08-21T17:01:39.933Z",
"signature" : "MEUCIHpjdrEsa55Fxn/t+SkJ4PhvLIhCfPihgZ4ffEdYQGFGAiEAmgvyP8oO/vge1GfhRuFLRbDU1JWANbCMYEB9V+/c3m4="
}
}, {
"id" : "172ae52a-9b71-42a8-8b86-76a8199e4553",
"id" : "997a071c-a615-414d-a5f5-0681b070b281",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -182,18 +182,18 @@
},
"ipt" : {
"function" : "SignUpCert",
"args" : [ "{\"credit_code\":\"122000002n00123567\",\"name\":\"node3\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIIBmTCCAT+gAwIBAgIEXIn6vTAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJjbjEL\\r\\nMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJqMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwG\\r\\nA1UECwwFaXNjYXMxCjAIBgNVBAMMATMwHhcNMTkwMzE0MDY1NDUzWhcNMjAwMzEz\\r\\nMDY1NDUzWjBWMQswCQYDVQQGEwJjbjELMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJq\\r\\nMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwGA1UECwwFaXNjYXMxCjAIBgNVBAMMATMw\\r\\nVjAQBgcqhkjOPQIBBgUrgQQACgNCAASdBDKlL7mW1NEfYDDb63d6O3/MueUT0Czr\\r\\nbzcmLhrDvRyIO2fHl/zR/qrNy76cuRi7EednNO/G7qTemnJQqC9oMAoGCCqGSM49\\r\\nBAMCA0gAMEUCIEXfvQcCZsnBiCWEPV0gWmxnhBbRRXE9oirBwb4J0Tu+AiEAk7Z8\\r\\n3MRWR022p7AYeshwIXpaDlIu3N4VxatMHh3rs5I=\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SHA1withECDSA\",\"certValid\":true,\"regTime\":{\"seconds\":1564043438,\"nanos\":985000000}}}" ]
"args" : [ "{\"credit_code\":\"989038588418990208\",\"name\":\"node3\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIICEjCCAbagAwIBAgIGAWyyKElLMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC\\r\\nQ04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5\\r\\nMDcGA1UEAx4wADkAOAA5ADAAMwA4ADUAOAA4ADQAMQA4ADkAOQAwADIAMAA4AC4A\\r\\nbgBvAGQAZQAzMCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx\\r\\nCzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL\\r\\nHgYAUwBEAFIxOTA3BgNVBAMeMAA5ADgAOQAwADMAOAA1ADgAOAA0ADEAOAA5ADkA\\r\\nMAAyADAAOAAuAG4AbwBkAGUAMzBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABOsu\\r\\nduOHBqM2HY5GkCn5Gmo0JH+T0Qfnfmd1bxEY/K3AS0vC2TTCJE9FvzwqHJEf/jO6\\r\\njoWRJGFgs56n0pCG3TejLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF\\r\\nBQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiEAvWo0B6047iHdKBaX\\r\\nU8bk7RkS39m8V8SLYeFNn3s7/20CIAcXWYE9id6rzz9TlUbJxckhpMyi6rO1ljW2\\r\\nca3nMsRg\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SM3withSM2\",\"certValid\":true,\"regTime\":{\"seconds\":1566378099,\"nanos\":948000000}}}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.987Z",
"signature" : "MEQCIDMnhA0LVT2H2f/hbg47piee+nue4pCTemepfm5OObHyAiBltrZgXEOBgMrB233VufIWfXGq3Fqvyjvtf87UK0Vdng=="
"tmLocal" : "2019-08-21T17:01:39.950Z",
"signature" : "MEYCIQDBKgd//R1HHnm9wUwCyp6gG2ienoeTg/CuTXDv1ka9VQIhAMw6cAAsgFT/zbzb2WykXn/FqxghaLsibw3iepz/UVlD"
}
}, {
"id" : "51abd708-5ac9-495a-bbd8-4da7072c286f",
"id" : "8d7e47be-c04f-478a-9908-fe1882f7d075",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -201,18 +201,18 @@
},
"ipt" : {
"function" : "SignUpCert",
"args" : [ "{\"credit_code\":\"921000005k36123789\",\"name\":\"node4\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIIBmjCCAT+gAwIBAgIEXIn75TAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJjbjEL\\r\\nMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJqMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwG\\r\\nA1UECwwFaXNjYXMxCjAIBgNVBAMMATQwHhcNMTkwMzE0MDY1OTQ5WhcNMjAwMzEz\\r\\nMDY1OTQ5WjBWMQswCQYDVQQGEwJjbjELMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJq\\r\\nMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwGA1UECwwFaXNjYXMxCjAIBgNVBAMMATQw\\r\\nVjAQBgcqhkjOPQIBBgUrgQQACgNCAAQy8jrMgX4TF/iuA42wEpYr82qIzBVFZmoJ\\r\\ndyQTu2Pu5Ot4Jfg1sa/ibY4fxXX/Rc2bN8U0+88A7JiEqa0pRAQUMAoGCCqGSM49\\r\\nBAMCA0kAMEYCIQDLBrE3v62ztcucfxZ27M0JqcgKWKT1Cow3JyCLZnhAQwIhANaQ\\r\\nIv1SgKX7fnhR3lga4IKdaFK6bpW/9YnDUsQ22kFL\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SHA1withECDSA\",\"certValid\":true,\"regTime\":{\"seconds\":1564043438,\"nanos\":996000000}}}" ]
"args" : [ "{\"credit_code\":\"645377164372772928\",\"name\":\"node4\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIICEjCCAbagAwIBAgIGAWyyKEmFMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC\\r\\nQ04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5\\r\\nMDcGA1UEAx4wADYANAA1ADMANwA3ADEANgA0ADMANwAyADcANwAyADkAMgA4AC4A\\r\\nbgBvAGQAZQA0MCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx\\r\\nCzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL\\r\\nHgYAUwBEAFIxOTA3BgNVBAMeMAA2ADQANQAzADcANwAxADYANAAzADcAMgA3ADcA\\r\\nMgA5ADIAOAAuAG4AbwBkAGUANDBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABIxB\\r\\nX9xUyeB09lRNzcVpeCJbk9KKde8o3r25prbwXzW9EvOfglf720PNXCJYqO2y7rsZ\\r\\nZ92rpzq/Uxazt30mcHajLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF\\r\\nBQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiEAtunTsMTWkBCsc+uE\\r\\nI1iwFwb9ABd3Z36G67hNTRj3JVgCIESQbzMjjwzkaKhxilAhi3/DBfxnuVrSQu/p\\r\\nh/rBB+Vw\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SM3withSM2\",\"certValid\":true,\"regTime\":{\"seconds\":1566378099,\"nanos\":968000000}}}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:38.998Z",
"signature" : "MEUCIAR6Qv6KlI8kZsdn8eJDNEZH/6UTcUcM8A08AJnvUOgzAiEA8kKFcA4LM8tzPk1veQDoU7M8Wy7AToQxW175fXeD/kA="
"tmLocal" : "2019-08-21T17:01:39.969Z",
"signature" : "MEUCIQCxDSVCPqaZnoHtYOf66qXqgI3nXxMB7Wb2TkkHBZmc+QIgQsKyNkKQKZJPqD3Rzmcx27XCQdKKwijYMGJjvgdSihs="
}
}, {
"id" : "e4cc670b-2347-423d-bba3-b6ce998ef729",
"id" : "8fd15397-5544-4e84-9447-ff4f96544092",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -220,18 +220,18 @@
},
"ipt" : {
"function" : "SignUpCert",
"args" : [ "{\"credit_code\":\"921000006e0012v696\",\"name\":\"node5\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIIBmTCCAT+gAwIBAgIEXIn8QzAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJjbjEL\\r\\nMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJqMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwG\\r\\nA1UECwwFaXNjYXMxCjAIBgNVBAMMATUwHhcNMTkwMzE0MDcwMTIzWhcNMjAwMzEz\\r\\nMDcwMTIzWjBWMQswCQYDVQQGEwJjbjELMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJq\\r\\nMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwGA1UECwwFaXNjYXMxCjAIBgNVBAMMATUw\\r\\nVjAQBgcqhkjOPQIBBgUrgQQACgNCAASRkmXqNawcVmoRYCRbxxuGMEhBkNi7mB6E\\r\\nTHeC+CzOw/G7spOXst4AEEcZwNwnu4yBsTI61O59+wWWoVzJMCfHMAoGCCqGSM49\\r\\nBAMCA0gAMEUCIDUg9XvYS5gYplD2XpQIs2yYyG9yC3CYDVU3oHEbAhmgAiEA0857\\r\\njWV0BsnABl2+s/P/WYEuZWixQuO2YNGpwVG/u7g=\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SHA1withECDSA\",\"certValid\":true,\"regTime\":{\"seconds\":1564043439,\"nanos\":17000000}}}" ]
"args" : [ "{\"credit_code\":\"379552050023903168\",\"name\":\"node5\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIICEzCCAbagAwIBAgIGAWyyKEm0MAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC\\r\\nQ04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5\\r\\nMDcGA1UEAx4wADMANwA5ADUANQAyADAANQAwADAAMgAzADkAMAAzADEANgA4AC4A\\r\\nbgBvAGQAZQA1MCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx\\r\\nCzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL\\r\\nHgYAUwBEAFIxOTA3BgNVBAMeMAAzADcAOQA1ADUAMgAwADUAMAAwADIAMwA5ADAA\\r\\nMwAxADYAOAAuAG4AbwBkAGUANTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABOW/\\r\\nwG96y+/mahILa1P/buDlMaGtsddmVDZJku0k6FCCYn6Ny14MSrp0UneSuYF1cNvo\\r\\nPGBvb69NM243qN2gdTmjLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF\\r\\nBQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANJADBGAiEAgziKjXGiU4e58AXA\\r\\nre3ZiPP8kNFak1u8rRn0T8HOyloCIQDZGGBe/NRdGZuMGWT86ShQ/F6AHS+pSE1E\\r\\n9apowWJduA==\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SM3withSM2\",\"certValid\":true,\"regTime\":{\"seconds\":1566378099,\"nanos\":986000000}}}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:39.019Z",
"signature" : "MEUCICrqdjUY29jPZr9cFO66GZnhDtRX2q/u/b5yxehsFBfuAiEAlePL5n2/bEG5pejx4RG7hFCeC1+qdhp7d1PWyIp4XWE="
"tmLocal" : "2019-08-21T17:01:39.988Z",
"signature" : "MEUCIFuigm4APDq0q7u7Eb18nrMOwNyw9dUPUicpe7Y81kRSAiEAuTfkV5xVdDJQBv9l9TCVeuQGcHmhC9ekBIoDhgqk8hQ="
}
}, {
"id" : "fb6bc5e3-b946-4ca3-bce1-c1f327ee0a45",
"id" : "a96a7713-2a34-47e8-82f5-9c66768496d6",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractCert",
@ -239,18 +239,18 @@
},
"ipt" : {
"function" : "SignUpCert",
"args" : [ "{\"credit_code\":\"951002007l78123233\",\"name\":\"super_admin\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIIBrjCCAVOgAwIBAgIEXIn9HTAKBggqhkjOPQQDAjBgMQswCQYDVQQGEwJjbjEL\\r\\nMAkGA1UECAwCYmoxCzAJBgNVBAcMAmJqMREwDwYDVQQKDAhyZXBjaGFpbjEOMAwG\\r\\nA1UECwwFaXNjYXMxFDASBgNVBAMMC3N1cGVyX2FkbWluMB4XDTE5MDMxNDA3MDUw\\r\\nMVoXDTIwMDMxMzA3MDUwMVowYDELMAkGA1UEBhMCY24xCzAJBgNVBAgMAmJqMQsw\\r\\nCQYDVQQHDAJiajERMA8GA1UECgwIcmVwY2hhaW4xDjAMBgNVBAsMBWlzY2FzMRQw\\r\\nEgYDVQQDDAtzdXBlcl9hZG1pbjBWMBAGByqGSM49AgEGBSuBBAAKA0IABBLsxfk6\\r\\nB86BFI3ij2YJylNGzxXNRQb45mZPNfVAkQf0hImHJMP+EgCK7UfJqa1U970ZslSC\\r\\nVTDxNyrb5wfLOIMwCgYIKoZIzj0EAwIDSQAwRgIhANUOIZN0YmYxbtmUlJeMaeEe\\r\\nb2STEd2Z07l1WBUN+mN9AiEAqKXR2Z/F+t0lWELgO4I+fxHiw+GIBYYLlsRVy4zZ\\r\\nvvU=\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SHA1withECDSA\",\"certValid\":true,\"regTime\":{\"seconds\":1564043439,\"nanos\":31000000}}}" ]
"args" : [ "{\"credit_code\":\"257091603041653856\",\"name\":\"super_admin\",\"cert\":{\"certificate\":\"-----BEGIN CERTIFICATE-----\\r\\nMIICLDCCAdCgAwIBAgIGAWyyKEnjMAwGCCqBHM9VAYN1BQAwgYAxCzAJBgNVBAYT\\r\\nAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQLHgYAUwBEAFIx\\r\\nRTBDBgNVBAMePAAyADUANwAwADkAMQA2ADAAMwAwADQAMQA2ADUAMwA4ADUANgAu\\r\\nAHMAdQBwAGUAcgBfAGEAZABtAGkAbjAiGA8yMDExMTIzMTE2MDAwMFoYDzIwMjEx\\r\\nMjMxMTYwMDAwWjCBgDELMAkGA1UEBhMCQ04xGTAXBgNVBAoeEABSAGUAcABDAGgA\\r\\nYQBpAG4xDzANBgNVBAseBgBTAEQAUjFFMEMGA1UEAx48ADIANQA3ADAAOQAxADYA\\r\\nMAAzADAANAAxADYANQAzADgANQA2AC4AcwB1AHAAZQByAF8AYQBkAG0AaQBuMFkw\\r\\nEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEiq4EK8AdLut90Y2TdMTZEztqjASKwPi2\\r\\nHbrEsP3yeJdxMHqv+9fEiMcmVx53v/1zHV8BA0DW8uzUFltaIivcHKMuMCwwCwYD\\r\\nVR0PBAQDAgDAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBggqgRzP\\r\\nVQGDdQUAA0gAMEUCIEG3eSNYNcljUNFv4Q4sQrnZp5otA8Dq2I2xalC9uE/HAiEA\\r\\n4YUveuEbr7b0vaUPCXj37NLHXXXDZjmIUlxBHMZNkj0=\\r\\n-----END CERTIFICATE-----\\r\\n\",\"algType\":\"SM3withSM2\",\"certValid\":true,\"regTime\":{\"seconds\":1566378100,\"nanos\":9000000}}}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:39.033Z",
"signature" : "MEUCIQCO4Ig5fTfsU4wd9j6Ys9bG94t1mb1KIUu35/I2p/EeggIgZixOb5JBeOMntFUQOPCIBO2czvFmoJX8PZGipowHLt4="
"tmLocal" : "2019-08-21T17:01:40.010Z",
"signature" : "MEUCID/jIR/uyBog4haoJ4VQgFx+x2JiJSf7JSdWYcH7mZemAiEA7OTETPeDm078T/ayAqgLCIWSl9REn2yaNblqwDBKvl0="
}
}, {
"id" : "2a6e9cdd-3dfb-4ad1-ab16-6fef3b812022",
"id" : "30462be1-173b-4ecd-acdc-a8e481c5c072",
"type" : "CHAINCODE_DEPLOY",
"cid" : {
"chaincodeName" : "ContractAssetsTPL",
@ -263,14 +263,14 @@
},
"signature" : {
"certId" : {
"creditCode" : "121000005l35120456",
"creditCode" : "215159697776981712",
"certName" : "node1"
},
"tmLocal" : "2019-07-25T16:30:39.035Z",
"signature" : "MEUCICAol+04vmQclqePiuSF0WrLHYWIBvTFmSyjOa/ha0IrAiEAwRHRlOszUMDUqYIQ0RhDa9j6ayxT8sy7tip2N5yUGxo="
"tmLocal" : "2019-08-21T17:01:40.023Z",
"signature" : "MEUCIEH9A2Utuz3elou/gBshkKycNjIYuwJGgCnVTQ7Ai7uUAiEA/ByKIib2zSu3xcJknkFuinD1yjAl27ArwIrkCvyC4/c="
}
}, {
"id" : "130d5715-dad0-4dbb-ba3f-eb8f6402b207",
"id" : "21f311c7-5529-4397-8e37-75677ef5d004",
"type" : "CHAINCODE_INVOKE",
"cid" : {
"chaincodeName" : "ContractAssetsTPL",
@ -278,15 +278,15 @@
},
"ipt" : {
"function" : "set",
"args" : [ "{\r\n \"121000005l35120456\" : 10000000,\r\n \"12110107bi45jh675g\" : 10000000,\r\n \"122000002n00123567\" : 10000000,\r\n \"921000005k36123789\" : 10000000,\r\n \"921000006e0012v696\" : 10000000\r\n}" ]
"args" : [ "{\r\n \"215159697776981712\" : 10000000,\r\n \"904703631549900672\" : 10000000,\r\n \"989038588418990208\" : 10000000,\r\n \"645377164372772928\" : 10000000,\r\n \"379552050023903168\" : 10000000\r\n}" ]
},
"signature" : {
"certId" : {
"creditCode" : "951002007l78123233",
"creditCode" : "257091603041653856",
"certName" : "super_admin"
},
"tmLocal" : "2019-07-25T16:30:39.037Z",
"signature" : "MEUCIQDecVuwJm5/tLAEWZEDbfp6GbQTgcOIFFLnbHdXAyUyxwIgOkZx7+ymhVR/pRPA7WJd8lMQNNR9O+QDhI5QN/VakAM="
"tmLocal" : "2019-08-21T17:01:40.039Z",
"signature" : "MEYCIQDa9z+cIKUc7vFh54kxpXdynRgLhM9PPzfSCjMbCaIKywIhALw7c+TWJQm3XNCirNC59BSgscYUh+xefVWU4eqHx9zg"
}
} ]
}

View File

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICEjCCAbagAwIBAgIGAWyyKEVUMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC
Q04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5
MDcGA1UEAx4wADIAMQA1ADEANQA5ADYAOQA3ADcANwA2ADkAOAAxADcAMQAyAC4A
bgBvAGQAZQAxMCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx
CzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL
HgYAUwBEAFIxOTA3BgNVBAMeMAAyADEANQAxADUAOQA2ADkANwA3ADcANgA5ADgA
MQA3ADEAMgAuAG4AbwBkAGUAMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABJr9
7SnDEsJk46bYsh9P4smxabU7I6rJcWMPEL909MLnXGsCG02gYjp1jZgCYmIaQkyF
3pmfJQEthwZ9M2X0YLujLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiALobzTI768h7+iSpDN
bfg+kkuZ3S4mCxlh3K/77aMktgIhAK4wzwfLEhi+wX/tGvkPR17hybi4aGByiT/C
OMp6Hkit
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICLDCCAdCgAwIBAgIGAWyyKEnjMAwGCCqBHM9VAYN1BQAwgYAxCzAJBgNVBAYT
AkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQLHgYAUwBEAFIx
RTBDBgNVBAMePAAyADUANwAwADkAMQA2ADAAMwAwADQAMQA2ADUAMwA4ADUANgAu
AHMAdQBwAGUAcgBfAGEAZABtAGkAbjAiGA8yMDExMTIzMTE2MDAwMFoYDzIwMjEx
MjMxMTYwMDAwWjCBgDELMAkGA1UEBhMCQ04xGTAXBgNVBAoeEABSAGUAcABDAGgA
YQBpAG4xDzANBgNVBAseBgBTAEQAUjFFMEMGA1UEAx48ADIANQA3ADAAOQAxADYA
MAAzADAANAAxADYANQAzADgANQA2AC4AcwB1AHAAZQByAF8AYQBkAG0AaQBuMFkw
EwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEiq4EK8AdLut90Y2TdMTZEztqjASKwPi2
HbrEsP3yeJdxMHqv+9fEiMcmVx53v/1zHV8BA0DW8uzUFltaIivcHKMuMCwwCwYD
VR0PBAQDAgDAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBggqgRzP
VQGDdQUAA0gAMEUCIEG3eSNYNcljUNFv4Q4sQrnZp5otA8Dq2I2xalC9uE/HAiEA
4YUveuEbr7b0vaUPCXj37NLHXXXDZjmIUlxBHMZNkj0=
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICEzCCAbagAwIBAgIGAWyyKEm0MAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC
Q04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5
MDcGA1UEAx4wADMANwA5ADUANQAyADAANQAwADAAMgAzADkAMAAzADEANgA4AC4A
bgBvAGQAZQA1MCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx
CzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL
HgYAUwBEAFIxOTA3BgNVBAMeMAAzADcAOQA1ADUAMgAwADUAMAAwADIAMwA5ADAA
MwAxADYAOAAuAG4AbwBkAGUANTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABOW/
wG96y+/mahILa1P/buDlMaGtsddmVDZJku0k6FCCYn6Ny14MSrp0UneSuYF1cNvo
PGBvb69NM243qN2gdTmjLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANJADBGAiEAgziKjXGiU4e58AXA
re3ZiPP8kNFak1u8rRn0T8HOyloCIQDZGGBe/NRdGZuMGWT86ShQ/F6AHS+pSE1E
9apowWJduA==
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICEjCCAbagAwIBAgIGAWyyKEmFMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC
Q04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5
MDcGA1UEAx4wADYANAA1ADMANwA3ADEANgA0ADMANwAyADcANwAyADkAMgA4AC4A
bgBvAGQAZQA0MCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx
CzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL
HgYAUwBEAFIxOTA3BgNVBAMeMAA2ADQANQAzADcANwAxADYANAAzADcAMgA3ADcA
MgA5ADIAOAAuAG4AbwBkAGUANDBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABIxB
X9xUyeB09lRNzcVpeCJbk9KKde8o3r25prbwXzW9EvOfglf720PNXCJYqO2y7rsZ
Z92rpzq/Uxazt30mcHajLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiEAtunTsMTWkBCsc+uE
I1iwFwb9ABd3Z36G67hNTRj3JVgCIESQbzMjjwzkaKhxilAhi3/DBfxnuVrSQu/p
h/rBB+Vw
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICEjCCAbagAwIBAgIGAWyyKEkIMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC
Q04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5
MDcGA1UEAx4wADkAMAA0ADcAMAAzADYAMwAxADUANAA5ADkAMAAwADYANwAyAC4A
bgBvAGQAZQAyMCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx
CzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL
HgYAUwBEAFIxOTA3BgNVBAMeMAA5ADAANAA3ADAAMwA2ADMAMQA1ADQAOQA5ADAA
MAA2ADcAMgAuAG4AbwBkAGUAMjBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABIRp
r3hOd1RgGqAwxxch3830dQStesVZOSYfSm+5oZk3twC4xEFMBsHswxLaHWBOAbUG
UHh668N1in48wucUi2ijLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiBATr4I/QkDDAvzVSHJ
IK2sRXm9DOd6j5d46rHQB5ffawIhAJQCLu1/TM0rpWBs52PGbh3IRAEJ2d9VASNS
BFNTWtG/
-----END CERTIFICATE-----

Binary file not shown.

View File

@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICEjCCAbagAwIBAgIGAWyyKElLMAwGCCqBHM9VAYN1BQAwdDELMAkGA1UEBhMC
Q04xGTAXBgNVBAoeEABSAGUAcABDAGgAYQBpAG4xDzANBgNVBAseBgBTAEQAUjE5
MDcGA1UEAx4wADkAOAA5ADAAMwA4ADUAOAA4ADQAMQA4ADkAOQAwADIAMAA4AC4A
bgBvAGQAZQAzMCIYDzIwMTExMjMxMTYwMDAwWhgPMjAyMTEyMzExNjAwMDBaMHQx
CzAJBgNVBAYTAkNOMRkwFwYDVQQKHhAAUgBlAHAAQwBoAGEAaQBuMQ8wDQYDVQQL
HgYAUwBEAFIxOTA3BgNVBAMeMAA5ADgAOQAwADMAOAA1ADgAOAA0ADEAOAA5ADkA
MAAyADAAOAAuAG4AbwBkAGUAMzBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABOsu
duOHBqM2HY5GkCn5Gmo0JH+T0Qfnfmd1bxEY/K3AS0vC2TTCJE9FvzwqHJEf/jO6
joWRJGFgs56n0pCG3TejLjAsMAsGA1UdDwQEAwIAwDAdBgNVHSUEFjAUBggrBgEF
BQcDAQYIKwYBBQUHAwIwDAYIKoEcz1UBg3UFAANIADBFAiEAvWo0B6047iHdKBaX
U8bk7RkS39m8V8SLYeFNn3s7/20CIAcXWYE9id6rzz9TlUbJxckhpMyi6rO1ljW2
ca3nMsRg
-----END CERTIFICATE-----

Binary file not shown.

BIN
pfx/mytruststore.pfx Normal file

Binary file not shown.

View File

@ -40,8 +40,8 @@ akka {
enabled-transports = [akka.remote.netty.ssl]
netty.ssl.security {
key-store = "jks/121000005l35120456.node1.jks"
trust-store = "jks/mytruststore.jks"
key-store = "pfx/215159697776981712.node1.pfx"
trust-store = "pfx/mytruststore.pfx"
key-store-password = "123"
key-password = "123"

View File

@ -28,16 +28,16 @@ import scala.collection.mutable
* RepChain启动单机超5个节点以上配合https://gitee.com/BTAJL/RCJava/blob/dev_sdk_preview/src/main/java/com/Example/cert/GenerateJksFiles.java使用
* @author zyf
*/
class RepChain_Multi {
object RepChain_Multi {
def main(args: Array[String]): Unit = {
val fileDir = new File("jks")
val fileDir = new File("pfx")
// 过滤掉非节点node的jks
val files = fileDir.listFiles(new FileFilter {
override def accept(file: File): Boolean = {
val fileName = file.getName
if (fileName.endsWith("jks") && fileName.indexOf("node") != -1) {
if (fileName.endsWith("pfx") && fileName.indexOf("node") != -1) {
true
} else {
false

View File

@ -30,12 +30,12 @@ object Repchain {
//创建系统实例
var nodelist : Array[String] = new Array[String] (4)
nodelist(0) = "12110107bi45jh675g.node2"
nodelist(1) = "122000002n00123567.node3"
nodelist(2) = "921000005k36123789.node4"
nodelist(3) = "921000006e0012v696.node5"
nodelist(0) = "904703631549900672.node2"
nodelist(1) = "989038588418990208.node3"
nodelist(2) = "645377164372772928.node4"
nodelist(3) = "379552050023903168.node5"
val sys1 = new ClusterSystem("121000005l35120456.node1",InitType.MULTI_INIT,true)
val sys1 = new ClusterSystem("215159697776981712.node1",InitType.MULTI_INIT,true)
sys1.init//初始化参数和配置信息
val joinAddress = sys1.getClusterAddr//获取组网地址
sys1.joinCluster(joinAddress)//加入网络

View File

@ -121,8 +121,7 @@ class ClusterSystem(sysTag: String, initType: Int, sysStart: Boolean) {
*/
def getConfigBySys(sysName: String): Config = {
val myConfig =
ConfigFactory.parseString("akka.remote.netty.ssl.security.key-store = \"jks/" + sysName +
".jks\"")
ConfigFactory.parseString("akka.remote.netty.ssl.security.key-store = \"pfx/" + sysName + ".pfx\"")
val regularConfig = getUserCombinedConf(USER_CONFIG_PATH)
val combined =
myConfig.withFallback(regularConfig)

View File

@ -0,0 +1,57 @@
/*
* Copyright 2019 Blockchain Technology and Application Joint Lab, Linkel Technology Co., Ltd, Beijing, Fintech Research Center of ISCAS.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BA SIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package rep.crypto
import java.security.{MessageDigest, Security}
import cn.com.tsg.jce.provider.TsgJceProvider
import com.google.protobuf.ByteString
import org.bouncycastle.jce.provider.BouncyCastleProvider
/**
* @author zyf
*/
// TODO 直接使用java实现
object Sm3 extends CryptographicHash {
override val DigestSize: Int = 32
def hash(input: Array[Byte]): Array[Byte] = MessageDigest.getInstance("SM3", "TsgJCE").digest(input)
def hashstr(input: Array[Byte]): String = {
BytesHex.bytes2hex(hash(input))
}
def hashstr(input: String): String = {
val iptb = ByteString.copyFromUtf8(input)
BytesHex.bytes2hex(hash(iptb.toByteArray()))
}
def hashToBytes(input: String): Array[Byte] = {
val iptb = ByteString.copyFromUtf8(input)
hash(iptb.toByteArray())
}
}
class Sm3 {
{
Security.insertProviderAt(new BouncyCastleProvider(), 1)
Security.addProvider(new TsgJceProvider())
}
}

View File

@ -0,0 +1,86 @@
/*
* Copyright 2019 Blockchain Technology and Application Joint Lab, Linkel Technology Co., Ltd, Beijing, Fintech Research Center of ISCAS.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BA SIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package rep.crypto.cert
import java.security.cert.{Certificate, X509Certificate}
import java.security.{PrivateKey, PublicKey, Security, Signature}
import cn.com.tsg.jce.provider.TsgJceProvider
import org.bouncycastle.jce.provider.BouncyCastleProvider
import rep.app.conf.SystemProfile
/**
* 使用SM2进行签名与验签
*
* @author zyf
*/
class ImpSM2Signer extends ISigner {
{
Security.insertProviderAt(new BouncyCastleProvider(), 1)
Security.addProvider(new TsgJceProvider())
}
private val alg = "SM3withSM2"
override def sign(privateKey: PrivateKey, message: Array[Byte]): Array[Byte] = {
if (privateKey == null) throw new RuntimeException("签名时私钥为空!")
if (message == null || message.length <= 0) throw new RuntimeException("待签名内容为空!")
val s1 = Signature.getInstance(alg, "TsgJCE")
// println(s1.getProvider)
s1.initSign(privateKey)
s1.update(message)
s1.sign()
}
override def verify(signature: Array[Byte], message: Array[Byte], publicKey: PublicKey): Boolean = {
if (publicKey == null) throw new RuntimeException("验证签名时公钥为空!")
if (signature == null || signature.length <= 0) throw new RuntimeException("待验证的签名信息为空!")
if (message == null || message.length <= 0) throw new RuntimeException("待签名内容为空!")
val s2 = Signature.getInstance(alg, "TsgJCE")
// println(s2.getProvider)
s2.initVerify(publicKey)
s2.update(message)
s2.verify(signature)
}
override def CertificateIsValid(date: java.util.Date, cert: Certificate): Boolean = {
var isValid: Boolean = false
var start = System.currentTimeMillis()
try {
if (cert == null) {
isValid = false
} else {
if (SystemProfile.getCheckCertValidate == 1) {
if (cert.isInstanceOf[X509Certificate]) {
val x509cert: X509Certificate = cert.asInstanceOf[X509Certificate]
x509cert.checkValidity(date)
isValid = true
}
} else {
isValid = true
}
}
} catch {
case e: Exception => isValid = false
}
var end = System.currentTimeMillis()
//println("check cert validate,spent time="+(end-start))
isValid
}
}

View File

@ -37,7 +37,7 @@ import org.bouncycastle.util.io.pem.PemReader
*/
object SignTool {
private var signer: ISigner = null
private var SignType: String = "ECDSA"
private var SignType: String = "SM2"
private var keypassword = mutable.HashMap[String, String]()
private var keyStores = mutable.HashMap[String, KeyStore]()
private var PublickeyCerts = mutable.HashMap[String, Certificate]()
@ -46,7 +46,13 @@ object SignTool {
synchronized {
if (this.signer == null) {
signer = new ImpECDSASigner()
if (SignType.equalsIgnoreCase("ecdsa")) {
signer = new ImpECDSASigner()
} else if (SignType.equalsIgnoreCase("sm2")) {
signer = new ImpSM2Signer()
} else {
throw new RuntimeException("无效的算法")
}
}
}
@ -114,7 +120,8 @@ object SignTool {
if (keyStores.contains(pkeyname)) {
keyStores(pkeyname).load(fis, pwd)
} else {
val pkeys = KeyStore.getInstance(KeyStore.getDefaultType)
val pkeys = KeyStore.getInstance("PKCS12", "BC")
// print(pkeys.getProvider)
pkeys.load(fis, pwd)
keyStores(pkeyname) = pkeys
}
@ -132,7 +139,8 @@ object SignTool {
if (!this.isAddPublicKey) {
val fis = new FileInputStream(new File(path))
val pwd = password.toCharArray()
var trustKeyStore = KeyStore.getInstance(KeyStore.getDefaultType)
val trustKeyStore = KeyStore.getInstance("PKCS12","BC")
// print(trustKeyStore.getProvider)
trustKeyStore.load(fis, pwd)
val enums = trustKeyStore.aliases()
while (enums.hasMoreElements) {

View File

@ -143,7 +143,7 @@ class PeerHelper(name: String) extends ModuleBase(name) {
//val si1 = scala.io.Source.fromFile("scripts/example_invoke_" + pe.getSysTag + ".js")
//val li1 = try si1.mkString finally si1.close()
val si2 = scala.io.Source.fromFile("api_req/json/transfer_" + pe.getSysTag + ".json")
val si2 = scala.io.Source.fromFile("api_req/json/gm/transfer_" + pe.getSysTag + ".json")
val li2 = try si2.mkString finally si2.close()
//val sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -188,8 +188,8 @@ class PeerHelper(name: String) extends ModuleBase(name) {
//自动循环不间断提交交易到系统用于压力测试或者tps测试时使用
def createTransForLoop = {
var count: Int = 0;
if (pe.getSysTag == "121000005l35120456.node1"|| pe.getSysTag == "12110107bi45jh675g.node2" || pe.getSysTag=="122000002n00123567.node3" ||
pe.getSysTag=="921000005k36123789.node4" || pe.getSysTag=="921000006e0012v696.node5")
if (pe.getSysTag == "215159697776981712.node1"|| pe.getSysTag == "904703631549900672.node2" || pe.getSysTag=="989038588418990208.node3" ||
pe.getSysTag=="645377164372772928.node4" || pe.getSysTag=="379552050023903168.node5")
while (true) {
try {
val start = System.currentTimeMillis()

View File

@ -38,7 +38,7 @@ import rep.utils.GlobalUtils.ActorType
import rep.utils._
import scala.collection.mutable
import akka.pattern.AskTimeoutException
import rep.crypto.Sha256
import rep.crypto.Sm3
import rep.log.RepLogger
import rep.sc.TypeOfSender
@ -99,7 +99,7 @@ class PreloaderForTransaction(moduleName: String) extends ModuleBase(moduleName)
if(newTranList.size > 0){
val tmpblk = block.withTransactions(newTranList)
var rblock = tmpblk.withTransactionResults(transResult)
val statehashstr = Sha256.hashstr(Array.concat(pe.getSystemCurrentChainStatus.currentStateHash.toByteArray() , SerializeUtils.serialise(transResult)))
val statehashstr = Sm3.hashstr(Array.concat(pe.getSystemCurrentChainStatus.currentStateHash.toByteArray() , SerializeUtils.serialise(transResult)))
rblock = rblock.withStateHash(ByteString.copyFromUtf8(statehashstr))
//RepLogger.error(RepLogger.Business_Logger, this.getLogMsgPrefix( s" current block height=${block.height},trans create serial: ${outputTransSerialOfBlock(block,rblock)}"))
Some(rblock)

View File

@ -20,7 +20,7 @@ import com.google.protobuf.ByteString
import com.google.protobuf.timestamp.Timestamp
import scalapb.json4s.JsonFormat
import rep.app.conf.SystemProfile
import rep.crypto.{ Sha256 }
import rep.crypto.Sm3
import rep.protos.peer.{ Block, Signature, Transaction, ChaincodeId, CertId }
import rep.utils.TimeUtils
import rep.storage.IdxPrefix
@ -95,7 +95,7 @@ object BlockHelp {
try {
val blkOutEndorse = block.clearEndorsements
val blkOutBlockHash = blkOutEndorse.withHashOfBlock(ByteString.EMPTY)
Sha256.hashstr(blkOutBlockHash.toByteArray)
Sm3.hashstr(blkOutBlockHash.toByteArray)
} catch {
case e: RuntimeException => throw e
}

View File

@ -19,7 +19,7 @@ package rep.network.consensus.util
import rep.protos.peer._
import rep.crypto.cert.SignTool
import scala.util.control.Breaks._
import rep.crypto.Sha256
import rep.crypto.Sm3
import com.google.protobuf.ByteString
import rep.utils.IdTool
@ -125,7 +125,7 @@ object BlockVerify {
val oldhash = block.hashOfBlock.toStringUtf8()
val blkOutEndorse = block.clearEndorsements
val blkOutBlockHash = blkOutEndorse.withHashOfBlock(ByteString.EMPTY)
val hash = Sha256.hashstr(blkOutBlockHash.toByteArray)
val hash = Sm3.hashstr(blkOutBlockHash.toByteArray)
if (oldhash.equals(hash)) {
result = true
}

View File

@ -18,7 +18,7 @@ package rep.network.consensus.vote
import akka.actor.{ Actor, Address, Props }
import rep.app.conf.{ SystemProfile, TimePolicy, SystemCertList }
import rep.crypto.Sha256
import rep.crypto.Sm3
import rep.network.base.ModuleBase
import rep.protos.peer.BlockchainInfo
import rep.storage.ImpDataAccess
@ -75,7 +75,7 @@ class Voter(moduleName: String) extends ModuleBase(moduleName) with CRFDVoter {
private def resetCandidator(currentblockhash:String) = {
//this.BlockHashOfVote = pe.getCurrentBlockHash
candidator = candidators(pe.getSysTag,currentblockhash,SystemCertList.getSystemCertList, Sha256.hash(currentblockhash))
candidator = candidators(pe.getSysTag,currentblockhash,SystemCertList.getSystemCertList, Sm3.hash(currentblockhash))
//pe.getNodeMgr.resetCandidator(candidatorCur)
}

View File

@ -163,15 +163,15 @@ class ConfigerHelper(conf: Config, tag: String, dbTag: String) {
/**
* Authorization module init
*
* @param jksFilePath
* @param pfxFilePath
* @param pwd
* @param trustJksFilePath
* @param trustPfxFilePath
* @param trustPwd
*/
private def authInit(sysTag: String, jksFilePath: String, pwd: String, trustJksFilePath: String, trustPwd: String): Unit = {
private def authInit(sysTag: String, pfxFilePath: String, pwd: String, trustPfxFilePath: String, trustPwd: String): Unit = {
//init the ECDSA param
SignTool.loadPrivateKey(sysTag, pwd, jksFilePath)
SignTool.loadNodeCertList(trustPwd, trustJksFilePath)
SignTool.loadPrivateKey(sysTag, pwd, pfxFilePath)
SignTool.loadNodeCertList(trustPwd, trustPfxFilePath)
//ECDSASign.apply(sysTag, jksFilePath, pwd, trustJksFilePath, trustPwd)
//ECDSASign.preLoadKey(sysTag)
}
@ -180,7 +180,7 @@ class ConfigerHelper(conf: Config, tag: String, dbTag: String) {
* 根据配置初始化本地安全配置
*/
private def authInitByCfg(sysTag: String): Unit = {
val mykeyPath = conf.getString("akka.remote.netty.ssl.security.base-path") + sysTag + ".jks"
val mykeyPath = conf.getString("akka.remote.netty.ssl.security.base-path") + sysTag + ".pfx"
val psw = conf.getString("akka.remote.netty.ssl.security.key-store-password")
val trustPath = conf.getString("akka.remote.netty.ssl.security.trust-store")
val trustPwd = conf.getString("akka.remote.netty.ssl.security.trust-store-password")

View File

@ -24,7 +24,7 @@ import collection.mutable
import java.io._
import org.json4s._
import org.json4s.jackson.JsonMethods._
import rep.crypto.Sha256
import rep.crypto.Sm3
import rep.app.conf.SystemProfile
import scala.reflect.runtime.currentMirror
import scala.tools.reflect.ToolBox
@ -201,7 +201,7 @@ class Compiler(targetDir: Option[File], bDebug:Boolean) {
* @return 类名字符串
*/
protected def classNameForCode(code: String): String = {
PRE_CLS_NAME + Sha256.hashstr(code)
PRE_CLS_NAME + Sm3.hashstr(code)
}
}

View File

@ -2,7 +2,7 @@ package rep.sc.scalax
import org.json4s._
import org.json4s.jackson.JsonMethods._
import rep.crypto.Sha256
import rep.crypto.Sm3
import rep.app.conf.SystemProfile
import collection.mutable
import rep.storage.util.pathUtil
@ -234,7 +234,7 @@ class CompilerOfSourceCode(targetDir: Option[File], bDebug: Boolean) {
* @return 类名字符串
*/
protected def classNameForCode(code: String): String = {
PRE_CLS_NAME + Sha256.hashstr(code)
PRE_CLS_NAME + Sm3.hashstr(code)
}
}

View File

@ -17,7 +17,8 @@
package rep.storage.util
import scala.collection.mutable.ArrayBuffer
import rep.crypto._
import rep.crypto.Sm3
import scala.collection.mutable
import scala.collection.immutable
import rep.utils._
@ -76,8 +77,8 @@ object StoreUtil {
value = Array.concat(value , src(i))
}
j += 1
}
value = Sha256.hash(value)
}
value = Sm3.hash(value)
i+=1
nextlist += value
}
@ -111,7 +112,7 @@ object StoreUtil {
}
j += 1
}
value = Sha256.hash(value)
value = Sm3.hash(value)
i+=1
cmerkledata.update(UpdateNextIdx, value)
}
@ -152,7 +153,7 @@ object StoreUtil {
}
j += 1
}
value = Sha256.hash(value)
value = Sm3.hash(value)
cmerkledata += value
i+=1
}
@ -202,7 +203,7 @@ object StoreUtil {
}
j += 1
}
value = Sha256.hash(value)
value = Sm3.hash(value)
var tmpidx = loop/MaxGroup
if(tmpidx > cmerkledata.size-1){
cmerkledata += value

View File

@ -44,10 +44,10 @@ object GenesisBuilder {
implicit val formats = DefaultFormats
def main(args: Array[String]): Unit = {
SignTool.loadPrivateKey("121000005l35120456.node1", "123", "jks/121000005l35120456.node1.jks")
SignTool.loadNodeCertList("changeme", "jks/mytruststore.jks")
SignTool.loadPrivateKey("951002007l78123233.super_admin", "super_admin", "jks/951002007l78123233.super_admin.jks")
val sysName = "121000005l35120456.node1"
SignTool.loadPrivateKey("215159697776981712.node1", "123", "pfx/215159697776981712.node1.pfx")
SignTool.loadNodeCertList("changeme", "pfx/mytruststore.pfx")
SignTool.loadPrivateKey("257091603041653856.super_admin", "super_admin", "pfx/257091603041653856.super_admin.pfx")
val sysName = "215159697776981712.node1"
//交易发起人是超级管理员
//增加scala的资产管理合约
// read deploy funcs
@ -61,7 +61,7 @@ object GenesisBuilder {
//val dep_trans = PeerHelper.createTransaction4Deploy(sysName, cid,
// l1, "",5000, rep.protos.peer.ChaincodeDeploy.CodeType.CODE_SCALA)
val dep_trans = PeerHelper.createTransaction4Deploy("951002007l78123233.super_admin", cid,
val dep_trans = PeerHelper.createTransaction4Deploy("257091603041653856.super_admin", cid,
l1, "",5000, rep.protos.peer.ChaincodeDeploy.CodeType.CODE_SCALA)
translist(0) = dep_trans
@ -71,31 +71,31 @@ object GenesisBuilder {
//System.out.println(Json4s.compactJson(dep_trans))
var signers : Array[Signer] = new Array[Signer](6)
signers(0) = Signer("node1","121000005l35120456","18912345678",List("node1"))
signers(1) = Signer("node2","12110107bi45jh675g","18912345678",List("node2"))
signers(2) = Signer("node3","122000002n00123567","18912345678",List("node3"))
signers(3) = Signer("node4","921000005k36123789","18912345678",List("node4"))
signers(4) = Signer("node5","921000006e0012v696","18912345678",List("node5"))
signers(5) = Signer("super_admin","951002007l78123233","18912345678",List("super_admin"))
signers(0) = Signer("node1","215159697776981712","18912345678",List("node1"))
signers(1) = Signer("node2","904703631549900672","18912345678",List("node2"))
signers(2) = Signer("node3","989038588418990208","18912345678",List("node3"))
signers(3) = Signer("node4","645377164372772928","18912345678",List("node4"))
signers(4) = Signer("node5","379552050023903168","18912345678",List("node5"))
signers(5) = Signer("super_admin","257091603041653856","18912345678",List("super_admin"))
for(i<-0 to 5){
translist(i+1) = PeerHelper.createTransaction4Invoke("951002007l78123233.super_admin", cid,
translist(i+1) = PeerHelper.createTransaction4Invoke("257091603041653856.super_admin", cid,
"SignUpSigner", Seq(SerializeUtils.compactJson(signers(i))))
}
for(i<-0 to 5){
val certfile = scala.io.Source.fromFile("jks/"+signers(i).creditCode+"."+signers(i).name+".cer")
val certfile = scala.io.Source.fromFile("pfx/"+signers(i).creditCode+"."+signers(i).name+".cer")
val certstr = try certfile.mkString finally certfile.close()
// val cert = SignTool.getCertByFile("jks/"+signers(i).creditCode+"."+signers(i).name+".cer")
val millis = System.currentTimeMillis()
val tmp = rep.protos.peer.Certificate(certstr,"SHA1withECDSA",true,Option(Timestamp(millis/1000 , ((millis % 1000) * 1000000).toInt)))
val tmp = rep.protos.peer.Certificate(certstr,"SM3withSM2",true,Option(Timestamp(millis/1000 , ((millis % 1000) * 1000000).toInt)))
//val aa = new ContractCert
val a : CertInfo = CertInfo(signers(i).creditCode,signers(i).name,tmp)
translist(i+7) = PeerHelper.createTransaction4Invoke("951002007l78123233.super_admin", cid,
translist(i+7) = PeerHelper.createTransaction4Invoke("257091603041653856.super_admin", cid,
"SignUpCert", Seq(SerializeUtils.compactJson(a)))
}
@ -108,10 +108,10 @@ object GenesisBuilder {
translist(13) = dep_asserts_trans
// read invoke scala contract
val s3 = scala.io.Source.fromFile("api_req/json/set.json")
val s3 = scala.io.Source.fromFile("api_req/json/gm/setGm.json")
val ct1 = try s3.mkString finally s3.close()
translist(14) = PeerHelper.createTransaction4Invoke("951002007l78123233.super_admin", cid2,
translist(14) = PeerHelper.createTransaction4Invoke("257091603041653856.super_admin", cid2,
"set", Seq(ct1))

View File

@ -23,7 +23,7 @@ import rep.protos.peer.CertId
import rep.protos.peer.Signature
import java.util.Date
import rep.crypto.Sha256
import rep.crypto.Sm3
import scala.collection.mutable
import rep.storage.util.pathUtil
import scala.math._
@ -368,7 +368,7 @@ object blockDataCheck extends App {
nodes(4) = "921000006e0012v696.node5"
val b = da.getBlock4ObjectByHeight(h)
val candidatorCur = candidators(da.getSystemName, b.hashOfBlock.toStringUtf8(), nodes.toSet, Sha256.hash(b.hashOfBlock.toStringUtf8()))
val candidatorCur = candidators(da.getSystemName, b.hashOfBlock.toStringUtf8(), nodes.toSet, Sm3.hash(b.hashOfBlock.toStringUtf8()))
println(s"height=$h,systemname=${da.SystemName},${candidatorCur.mkString("|")}")
}