├── .gitignore ├── LICENSE ├── README.md ├── application ├── connprofile.json ├── package-lock.json ├── package.json └── vstest4.js ├── chaincode ├── META-INF │ └── statedb │ │ └── couchdb │ │ └── indexes │ │ ├── indexBrand.json │ │ └── indexId.json ├── collections_config.json └── vehiclesharing.go ├── configtx.yaml ├── configtx_onlinepay └── configtx.yaml ├── deployed ├── client │ ├── chaincode │ │ └── vehiclesharing │ │ │ ├── META-INF │ │ │ └── statedb │ │ │ │ └── couchdb │ │ │ │ └── indexes │ │ │ │ ├── indexBrand.json │ │ │ │ └── indexId.json │ │ │ ├── collections_config.json │ │ │ └── vehiclesharing.go │ ├── channel-artifacts │ │ ├── onlinepayorg.json │ │ └── vehiclesharing_channel.tx │ ├── docker-compose-prod-client.yaml │ ├── mymsp │ │ ├── localmsp │ │ │ ├── admin@bctest.example.com │ │ │ │ ├── msp │ │ │ │ │ ├── admincerts │ │ │ │ │ │ └── admin@bctest.example.com.pem │ │ │ │ │ ├── cacerts │ │ │ │ │ │ └── ca.bctest.example.com.pem │ │ │ │ │ ├── keystore │ │ │ │ │ │ └── admin@bctest.example.com.key │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── admin@bctest.example.com.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.bctest.example.com.pem │ │ │ │ └── tls │ │ │ │ │ ├── tls-admin@bctest.example.com.key │ │ │ │ │ ├── tls-admin@bctest.example.com.pem │ │ │ │ │ └── tlsca.bctest.example.com.pem │ │ │ ├── admin@onlinepay.example.com │ │ │ │ ├── msp │ │ │ │ │ ├── admincerts │ │ │ │ │ │ └── admin@onlinepay.example.com.pem │ │ │ │ │ ├── cacerts │ │ │ │ │ │ └── ca.onlinepay.example.com.pem │ │ │ │ │ ├── keystore │ │ │ │ │ │ └── admin@onlinepay.example.com.key │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── admin@onlinepay.example.com.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.onlinepay.example.com.pem │ │ │ │ └── tls │ │ │ │ │ ├── tls-admin@onlinepay.example.com.key │ │ │ │ │ ├── tls-admin@onlinepay.example.com.pem │ │ │ │ │ └── tlsca.onlinepay.example.com.pem │ │ │ ├── admin@sharing.example.com │ │ │ │ ├── msp │ │ │ │ │ ├── admincerts │ │ │ │ │ │ └── admin@sharing.example.com.pem │ │ │ │ │ ├── cacerts │ │ │ │ │ │ └── ca.sharing.example.com.pem │ │ │ │ │ ├── keystore │ │ │ │ │ │ └── admin@sharing.example.com.key │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── admin@sharing.example.com.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.sharing.example.com.pem │ │ │ │ └── tls │ │ │ │ │ ├── tls-admin@sharing.example.com.key │ │ │ │ │ ├── tls-admin@sharing.example.com.pem │ │ │ │ │ └── tlsca.sharing.example.com.pem │ │ │ ├── admin@vehicle.example.com │ │ │ │ ├── msp │ │ │ │ │ ├── admincerts │ │ │ │ │ │ └── admin@vehicle.example.com.pem │ │ │ │ │ ├── cacerts │ │ │ │ │ │ └── ca.vehicle.example.com.pem │ │ │ │ │ ├── keystore │ │ │ │ │ │ └── admin@vehicle.example.com.key │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── admin@vehicle.example.com.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.vehicle.example.com.pem │ │ │ │ └── tls │ │ │ │ │ ├── tls-admin@vehicle.example.com.key │ │ │ │ │ ├── tls-admin@vehicle.example.com.pem │ │ │ │ │ └── tlsca.vehicle.example.com.pem │ │ │ └── alice@sharing.example.com │ │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── alice@sharing.example.com.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.sharing.example.com.pem │ │ │ │ ├── keystore │ │ │ │ │ └── alice@sharing.example.com.key │ │ │ │ ├── signcerts │ │ │ │ │ └── alice@sharing.example.com.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.sharing.example.com.pem │ │ │ │ └── tls │ │ │ │ ├── tls-alice@sharing.example.com.key │ │ │ │ ├── tls-alice@sharing.example.com.pem │ │ │ │ └── tlsca.sharing.example.com.pem │ │ └── orgmsp │ │ │ ├── orderer.bctest.example.com │ │ │ └── msp │ │ │ │ ├── admincerts │ │ │ │ └── admin@bctest.example.com.pem │ │ │ │ ├── cacerts │ │ │ │ └── ca.bctest.example.com.pem │ │ │ │ └── tlscacerts │ │ │ │ └── tlsca.bctest.example.com.pem │ │ │ ├── peer0.onlinepay.example.com │ │ │ └── msp │ │ │ │ ├── admincerts │ │ │ │ └── admin@onlinepay.example.com.pem │ │ │ │ ├── cacerts │ │ │ │ └── ca.onlinepay.example.com.pem │ │ │ │ ├── config.yaml │ │ │ │ └── tlscacerts │ │ │ │ └── tlsca.onlinepay.example.com.pem │ │ │ ├── peer0.sharing.example.com │ │ │ └── msp │ │ │ │ ├── admincerts │ │ │ │ └── admin@sharing.example.com.pem │ │ │ │ ├── cacerts │ │ │ │ └── ca.sharing.example.com.pem │ │ │ │ ├── config.yaml │ │ │ │ └── tlscacerts │ │ │ │ └── tlsca.sharing.example.com.pem │ │ │ └── peer0.vehicle.example.com │ │ │ └── msp │ │ │ ├── admincerts │ │ │ └── admin@vehicle.example.com.pem │ │ │ ├── cacerts │ │ │ └── ca.vehicle.example.com.pem │ │ │ ├── config.yaml │ │ │ └── tlscacerts │ │ │ └── tlsca.vehicle.example.com.pem │ └── utils │ │ └── setparas.sh ├── orderer │ ├── channel-artifacts │ │ └── vehiclesharing_genesis.block │ ├── docker-compose-prod-orderer.yaml │ └── mymsp │ │ └── localmsp │ │ └── orderer.bctest.example.com │ │ ├── msp │ │ ├── admincerts │ │ │ └── admin@bctest.example.com.pem │ │ ├── cacerts │ │ │ └── ca.bctest.example.com.pem │ │ ├── keystore │ │ │ └── orderer.bctest.example.com.key │ │ ├── signcerts │ │ │ └── orderer.bctest.example.com.pem │ │ └── tlscacerts │ │ │ └── tlsca.bctest.example.com.pem │ │ └── tls │ │ ├── tls-orderer.bctest.example.com.key │ │ ├── tls-orderer.bctest.example.com.pem │ │ └── tlsca.bctest.example.com.pem ├── peer0.onlinepay │ ├── docker-compose-prod-peer0-onlinepay.yaml │ └── mymsp │ │ └── localmsp │ │ └── peer0.onlinepay.example.com │ │ ├── msp │ │ ├── admincerts │ │ │ └── admin@onlinepay.example.com.pem │ │ ├── cacerts │ │ │ └── ca.onlinepay.example.com.pem │ │ ├── config.yaml │ │ ├── keystore │ │ │ └── peer0.onlinepay.example.com.key │ │ ├── signcerts │ │ │ └── peer0.onlinepay.example.com.pem │ │ └── tlscacerts │ │ │ └── tlsca.onlinepay.example.com.pem │ │ └── tls │ │ ├── tls-peer0.onlinepay.example.com.key │ │ ├── tls-peer0.onlinepay.example.com.pem │ │ └── tlsca.onlinepay.example.com.pem ├── peer0.sharing │ ├── docker-compose-prod-peer0-sharing.yaml │ └── mymsp │ │ └── localmsp │ │ └── peer0.sharing.example.com │ │ ├── msp │ │ ├── admincerts │ │ │ └── admin@sharing.example.com.pem │ │ ├── cacerts │ │ │ └── ca.sharing.example.com.pem │ │ ├── config.yaml │ │ ├── keystore │ │ │ └── peer0.sharing.example.com.key │ │ ├── signcerts │ │ │ └── peer0.sharing.example.com.pem │ │ └── tlscacerts │ │ │ └── tlsca.sharing.example.com.pem │ │ └── tls │ │ ├── tls-peer0.sharing.example.com.key │ │ ├── tls-peer0.sharing.example.com.pem │ │ └── tlsca.sharing.example.com.pem └── peer0.vehicle │ ├── docker-compose-prod-peer0-vehicle.yaml │ └── mymsp │ └── localmsp │ └── peer0.vehicle.example.com │ ├── msp │ ├── admincerts │ │ └── admin@vehicle.example.com.pem │ ├── cacerts │ │ └── ca.vehicle.example.com.pem │ ├── config.yaml │ ├── keystore │ │ └── peer0.vehicle.example.com.key │ ├── signcerts │ │ └── peer0.vehicle.example.com.pem │ └── tlscacerts │ │ └── tlsca.vehicle.example.com.pem │ └── tls │ ├── tls-peer0.vehicle.example.com.key │ ├── tls-peer0.vehicle.example.com.pem │ └── tlsca.vehicle.example.com.pem ├── docker-compose-prod-client.yaml ├── docker-compose-prod-orderer.yaml ├── docker-compose-prod-peer0-onlinepay.yaml ├── docker-compose-prod-peer0-sharing.yaml ├── docker-compose-prod-peer0-vehicle.yaml ├── prodchannel.sh ├── prodmsp.sh ├── prodmsp_onlinepay.sh └── utils ├── mymsputils.sh └── setparas.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /application/node_modules 2 | /.vscode 3 | /application/test.js 4 | /mymsp 5 | /channel-artifacts -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vehicle Sharing 2 | A testing Fabric blockchain project. 3 | - Chaincode 4 | - Application 5 | - Deployment 6 | 7 | Prerequisite: 8 | - Fabric Samples 1.4.0 9 | - Fabric SDK Node 1.4 (https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4) 10 | - Fabric Network npm module 1.4 11 | 12 | **Branch pub_1.4_2.2** 13 | Materials for publication series 2 article 2, with Fabric Samples and SDK 1.4 (source code). 14 | 这是一篇区块链文章使用的代码与素材(系列之二). 15 | 它以Fabric Sample为基础,部署在单机多个Docker Container上。 16 | [Branch pub_1.4_2.2](https://github.com/tomxucnxa/vehiclesharing/tree/pub_1.4_2.2) 17 | [IBM DeveloperWorks - 《Fabric 区块链智能合约 Chaincode 与客户端程序开发全新实例教程》](https://www.ibm.com/developerworks/cn/cloud/library/cl-lo-hyperledger-fabric-practice-analysis2/index.html) 18 | 19 | **Branch pub_1.4_2.3** 20 | Materials for publication series 2 article 3, with Fabric Images and Fabric Network npm module 1.4. 21 | 这是另一篇区块链文章使用的代码与素材(系列之三). 22 | 它不再以Fabric Sample为基础。而是完全独立生成证书、私钥等MSP元素;并在多节点(1 solo order, 2 peers for 2 orgs, 1 client)上完成部署。 23 | [Branch pub_1.4_2.3](https://github.com/tomxucnxa/vehiclesharing/tree/pub_1.4_2.3) 24 | [IBM DeveloperWorks - 《Fabric 区块链的多节点部署》](https://www.ibm.com/developerworks/cn/cloud/library/cl-lo-hyperledger-fabric-practice-analysis3/index.html) 25 | 26 | -------------------------------------------------------------------------------- /application/connprofile.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"vehiclesharing-network", 3 | "description":"This is a common connection profile. @see https://fabric-sdk-node.github.io/master/tutorial-network-config.html", 4 | "version":"1.0", 5 | "channels":{ 6 | "vschannel":{ 7 | "orderers":[ 8 | "orderer.bctest.example.com" 9 | ], 10 | "peers":{ 11 | "peer0.sharing.example.com":{ 12 | "endorsingPeer":true, 13 | "chaincodeQuery":true, 14 | "ledgerQuery":true, 15 | "eventSource":true 16 | }, 17 | "peer0.vehicle.example.com":{ 18 | "endorsingPeer":true, 19 | "chaincodeQuery":true, 20 | "ledgerQuery":true, 21 | "eventSource":true 22 | }, 23 | "peer0.onlinepay.example.com":{ 24 | "endorsingPeer":true, 25 | "chaincodeQuery":true, 26 | "ledgerQuery":true, 27 | "eventSource":true 28 | } 29 | }, 30 | "chaincodes":[ 31 | "vehiclesharing:1.1" 32 | ] 33 | } 34 | }, 35 | "organizations":{ 36 | "SharingOrg":{ 37 | "mspid":"SharingMSP", 38 | "peers":[ 39 | "peer0.sharing.example.com" 40 | ] 41 | }, 42 | "VehicleOrg":{ 43 | "mspid":"VehicleMSP", 44 | "peers":[ 45 | "peer0.vehicle.example.com" 46 | ] 47 | }, 48 | 49 | "OnlinePayOrg":{ 50 | "mspid":"OnlinePayMSP", 51 | "peers":[ 52 | "peer0.onlinepay.example.com" 53 | ] 54 | } 55 | }, 56 | "orderers":{ 57 | "orderer.bctest.example.com":{ 58 | "url":"grpcs://orderer.bctest.example.com:7050", 59 | "grpcOptions":{ 60 | "ssl-target-name-override":"orderer.bctest.example.com" 61 | }, 62 | "tlsCACerts":{ 63 | "path":"../deployed/client/mymsp/orgmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem" 64 | } 65 | } 66 | }, 67 | "peers":{ 68 | "peer0.sharing.example.com":{ 69 | "url":"grpcs://peer0.sharing.example.com:7051", 70 | "grpcOptions":{ 71 | "ssl-target-name-override":"peer0.sharing.example.com" 72 | }, 73 | "tlsCACerts":{ 74 | "path":"../deployed/client/mymsp/orgmsp/peer0.sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem" 75 | } 76 | }, 77 | "peer0.vehicle.example.com":{ 78 | "url":"grpcs://peer0.vehicle.example.com:7051", 79 | "grpcOptions":{ 80 | "ssl-target-name-override":"peer0.vehicle.example.com" 81 | }, 82 | "tlsCACerts":{ 83 | "path":"../deployed/client/mymsp/orgmsp/peer0.vehicle.example.com/msp/tlscacerts/tlsca.vehicle.example.com.pem" 84 | } 85 | }, 86 | "peer0.onlinepay.example.com":{ 87 | "url":"grpcs://peer0.onlinepay.example.com:7051", 88 | "grpcOptions":{ 89 | "ssl-target-name-override":"peer0.onlinepay.example.com" 90 | }, 91 | "tlsCACerts":{ 92 | "path":"../deployed/client/mymsp/orgmsp/peer0.onlinepay.example.com/msp/tlscacerts/tlsca.onlinepay.example.com.pem" 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /application/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vehiclesharing-application", 3 | "version": "1.1.0", 4 | "homepage": "https://github.com/tomxucnxa/vehiclesharing", 5 | "devDependencies": { 6 | "fabric-network": "^1.4.0" 7 | }, 8 | "license": "Apache-2.0", 9 | "licenses": [ 10 | { 11 | "type": "Apache-2.0", 12 | "url": "https://github.com/tomxucnxa/vehiclesharing/blob/master/LICENSE" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /application/vstest4.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-License-Identifier: Apache-2.0 3 | */ 4 | 5 | /** 6 | * This is an example based on fabric-sdk-node, it refers content of: 7 | * https://fabric-sdk-node.github.io/master/index.html 8 | * https://github.com/hyperledger/fabric-sdk-node 9 | * https://fabric-sdk-node.github.io/master/tutorial-network-config.html 10 | * 11 | * This program uses connprofile.json, what is a common connection profile. 12 | * It will utilze InMemoryWallet and Gateway, what is from fabric-network module. 13 | */ 14 | 15 | 'use strict'; 16 | const fs = require('fs'); 17 | const path = require('path'); 18 | const winston = require('winston'); 19 | const {Gateway, FileSystemWallet, InMemoryWallet, X509WalletMixin} = require('fabric-network'); 20 | 21 | var logger = new (winston.Logger)({transports: [new (winston.transports.Console)()]}); 22 | 23 | let arg = process.argv[2]; 24 | switch (arg) { 25 | case 'query' : queryFindVehicle(process.argv[3]); break; 26 | case 'add' : invokeAddVehicle(getRandomId(), 'FBC'); break; 27 | default: logger.error(`Please run command likes: 'node vstest4.js query [id]' or 'node vstest4.js add'`); 28 | } 29 | 30 | async function queryFindVehicle(vid) { 31 | if (vid == undefined) { 32 | logger.info('Please speficy a vehicle id for search.') 33 | return; 34 | } 35 | const identityLabel = 'alice@sharing.example.com'; 36 | const wallet = await initUserWallet(identityLabel); 37 | const gateway = new Gateway(); 38 | 39 | await gateway.connect(path.join(__dirname, './connprofile.json'), 40 | { 41 | wallet: wallet, 42 | identity: identityLabel, 43 | discovery: { 44 | enabled: false, 45 | } 46 | }); 47 | 48 | logger.info('Gateway connects get succeed.'); 49 | 50 | const network = await gateway.getNetwork('vschannel'); 51 | const contract = await network.getContract('vehiclesharing'); 52 | let result = await contract.evaluateTransaction('findVehicle', vid); 53 | gateway.disconnect(); 54 | 55 | result = Buffer.from(result).toString() 56 | logger.info(result == '' ? vid + ' not found' : result) 57 | } 58 | 59 | async function invokeAddVehicle(vehicleId, brand) { 60 | logger.info('Begin to add vehicle [%s-%s]', vehicleId, brand); 61 | const identityLabel = 'alice@sharing.example.com'; 62 | const wallet = await initUserWallet(identityLabel); 63 | const gateway = new Gateway(); 64 | await gateway.connect(path.join(__dirname, './connprofile.json'), 65 | { 66 | wallet: wallet, 67 | identity: identityLabel, 68 | discovery: { 69 | enabled: false, 70 | } 71 | }); 72 | 73 | logger.info('Gateway connects get succeed.'); 74 | 75 | try { 76 | const network = await gateway.getNetwork('vschannel'); 77 | const contract = await network.getContract('vehiclesharing'); 78 | const transaction = contract.createTransaction('createVehicle'); 79 | const transactionId = transaction.getTransactionID().getTransactionID(); 80 | 81 | logger.info('Create a transaction ID: ', transactionId); 82 | 83 | const sharingOrgEventHub = await getFirstEventHubForOrg(network, 'SharingMSP'); 84 | //const vehicleEventHub = await getFirstEventHubForOrg(network, 'VehicleMSP'); 85 | //const onlinePayEventHub = await getFirstEventHubForOrg(network, 'OnlinePayMSP'); 86 | 87 | let eventFired = 0; 88 | sharingOrgEventHub.registerTxEvent('all', (txId, code) => { 89 | logger.info('Event', txId, code); 90 | if (code === 'VALID' && txId === transactionId) { 91 | eventFired++; 92 | } 93 | }, 94 | () => { 95 | //logger.info('EventHub error.'); 96 | }); 97 | 98 | const response = await transaction.submit(vehicleId, brand); 99 | const succ = (eventFired == 1); 100 | if (succ) { 101 | logger.info('A new vehicle [%s] was created. Response: %s', vehicleId, response.toString()); 102 | } 103 | else { 104 | logger.error('Adding vehicle got failed.'); 105 | } 106 | 107 | } 108 | catch (err) { 109 | logger.error('Failed to invoke transaction chaincode on channel. ' + err.stack ? err.stack : err); 110 | } 111 | finally { 112 | gateway.disconnect(); 113 | logger.info('Gateway disconnected.'); 114 | } 115 | 116 | } 117 | 118 | async function getFirstEventHubForOrg(network, orgMSP) { 119 | const channel = network.getChannel(); 120 | const orgPeer = channel.getPeersForOrg(orgMSP)[0]; 121 | return channel.getChannelEventHub(orgPeer.getName()); 122 | } 123 | 124 | function getRandomId() { 125 | return Math.random().toString().substring(2).substring(0,8); 126 | } 127 | 128 | async function initUserWallet(identityLabel) { 129 | // Hardcode crypto materials of user alice@sharing.example.com. 130 | const keyPath = path.join(__dirname, "../deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/keystore/alice@sharing.example.com.key"); 131 | const keyPEM = Buffer.from(fs.readFileSync(keyPath)).toString(); 132 | const certPath = path.join(__dirname, "../deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/signcerts/alice@sharing.example.com.pem"); 133 | const certPEM = Buffer.from(fs.readFileSync(certPath)).toString(); 134 | 135 | const mspId = 'SharingMSP'; 136 | const identity = X509WalletMixin.createIdentity(mspId, certPEM, keyPEM) 137 | 138 | //const wallet = new FileSystemWallet('/tmp/wallet/alice.sharing'); 139 | const wallet = new InMemoryWallet(); 140 | await wallet.import(identityLabel, identity); 141 | 142 | if (await wallet.exists(identityLabel)) { 143 | logger.info('Identity %s exists.', identityLabel); 144 | } 145 | else { 146 | logger.error('Identity %s does not exist.', identityLabel); 147 | } 148 | return wallet; 149 | } -------------------------------------------------------------------------------- /chaincode/META-INF/statedb/couchdb/indexes/indexBrand.json: -------------------------------------------------------------------------------- 1 | {"index":{"fields":["objectType","brand"]},"ddoc":"indexBrandDoc", "name":"indexBrand","type":"json"} 2 | -------------------------------------------------------------------------------- /chaincode/META-INF/statedb/couchdb/indexes/indexId.json: -------------------------------------------------------------------------------- 1 | {"index":{"fields":["objectType","id"]},"ddoc":"indexIdDoc", "name":"indexId","type":"json"} 2 | -------------------------------------------------------------------------------- /chaincode/collections_config.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "leaseRecords", 4 | "policy": "OR('Org1MSP.member', 'Org2MSP.member')", 5 | "requiredPeerCount": 2, 6 | "maxPeerCount": 4, 7 | "blockToLive":3, 8 | "memberOnlyRead": true 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /chaincode/vehiclesharing.go: -------------------------------------------------------------------------------- 1 | // This is another chaincode based on Fabric tutorial. 2 | // It will be deployed based on the example first-network. 3 | 4 | package main 5 | 6 | import ( 7 | "encoding/json" 8 | "fmt" 9 | "log" 10 | "math/rand" 11 | "strconv" 12 | "strings" 13 | "time" 14 | 15 | "github.com/hyperledger/fabric/core/chaincode/shim" 16 | "github.com/hyperledger/fabric/protos/peer" 17 | ) 18 | 19 | const OBJECTTYPE_JSON = "objectType" 20 | const OBJECTTYPE_VEHICLE = "VEHICLE" 21 | const OBJECTTYPE_LEASE = "LEASE" 22 | 23 | const PRIVATE_COLLECTION_LEASE = "leaseRecords" 24 | 25 | func init() { 26 | log.SetPrefix("VehicleSharing: ") 27 | log.SetFlags(log.Ldate | log.Lmicroseconds | log.Lshortfile) 28 | } 29 | 30 | type VehicleSharing struct { 31 | } 32 | 33 | type Vehicle struct { 34 | ObjectType string `json:"objectType"` 35 | CreateTime int64 `json:"createTime"` 36 | Id string `json:"id"` 37 | Brand string `json:"brand"` 38 | Price float64 `json:"price"` 39 | OwnerId string `json:"ownerId"` 40 | Status int32 `json:"status"` 41 | UserId string `json:"userId"` 42 | } 43 | 44 | type Lease struct { 45 | ObjectType string `json:"objectType"` 46 | CreateTime int64 `json:"createTime"` 47 | Id string `json:"id"` 48 | VehicleId string `json:"vehicleId"` 49 | UserId string `json:"UserId"` 50 | BeginTime int64 `json:"beginTime"` 51 | EndTime int64 `json:"endTime"` 52 | } 53 | 54 | func (t *VehicleSharing) Init(stub shim.ChaincodeStubInterface) peer.Response { 55 | log.Printf("The chaincode VehicleSharing is instantiated.") 56 | return shim.Success(nil) 57 | } 58 | 59 | func (t *VehicleSharing) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 60 | fn, args := stub.GetFunctionAndParameters() 61 | var res string 62 | var err error 63 | 64 | fn = strings.TrimSpace(fn) 65 | log.Printf("Invoke %s %v", fn, args) 66 | 67 | var FUNCMAP = map[string]func(shim.ChaincodeStubInterface, []string) (string, error){ 68 | // Vehicle functions 69 | "createVehicle": createVehicle, 70 | "findVehicle": findVehicle, 71 | "deleteVehicle": deleteVehicle, 72 | "updateVehiclePrice": updateVehiclePrice, 73 | "updateVehicleDynPrice": updateVehicleDynPrice, 74 | "queryVehiclesByBrand": queryVehiclesByBrand, 75 | "queryVehicles": queryVehicles, 76 | "getVehicleHistory": getVehicleHistory, 77 | "wronglyTxRandValue": wronglyTxRandValue, 78 | // Lease functions 79 | "createLease": createLease, 80 | "findLease": findLease} 81 | 82 | var ccAction = FUNCMAP[fn] 83 | if ccAction == nil { 84 | var errStr = fmt.Sprintf("Function %s doesn't exist.", fn) 85 | log.Printf(errStr) 86 | return shim.Error(errStr) 87 | } 88 | 89 | // TODO To handle the function if it doesn't exist. 90 | res, err = ccAction(stub, args) 91 | 92 | if err == nil { 93 | log.Printf("Invoke %s %s get succeed. Result: %s", fn, args, res) 94 | return shim.Success([]byte(res)) 95 | } else { 96 | log.Printf("Invoke %s %s get failed. Reason: %s", fn, args, err.Error()) 97 | return shim.Error(err.Error()) 98 | } 99 | } 100 | 101 | func createVehicle(stub shim.ChaincodeStubInterface, args []string) (string, error) { 102 | // Id, Brand is required currently. 103 | if len(args) < 2 { 104 | return "", fmt.Errorf("There is not enough 2 arguments in this function createVehicle.") 105 | } 106 | var id = strings.TrimSpace(args[0]) 107 | var brand = strings.TrimSpace(args[1]) 108 | 109 | var v = Vehicle{ObjectType: OBJECTTYPE_VEHICLE, Id: id, Brand: brand} 110 | return addVehicle(stub, &v) 111 | } 112 | 113 | func addVehicle(stub shim.ChaincodeStubInterface, v *Vehicle) (string, error) { 114 | var res []byte 115 | var err error 116 | var jByte []byte 117 | 118 | if v.Id == "" || v.Brand == "" { 119 | return "", fmt.Errorf("The id and brand cannot be blank.") 120 | } 121 | 122 | res, err = stub.GetState(v.Id) 123 | if err != nil { 124 | return "", err 125 | } else if res != nil { 126 | return "", fmt.Errorf("The vehicle %s has already existed.", v.Id) 127 | } 128 | 129 | jByte, err = json.Marshal(v) 130 | if err != nil { 131 | return "", err 132 | } 133 | err = stub.PutState(v.Id, jByte) 134 | if err != nil { 135 | return "", err 136 | } 137 | 138 | return v.Id, nil 139 | } 140 | 141 | // Find Vehicle by the state key (Id). 142 | func findVehicle(stub shim.ChaincodeStubInterface, args []string) (string, error) { 143 | if len(args) < 1 { 144 | return "", fmt.Errorf("There is not enough 1 argument in this function findVehicle.") 145 | } 146 | var id = strings.TrimSpace(args[0]) 147 | if id == "" { 148 | return "", fmt.Errorf("The id cannot be blank.") 149 | } 150 | 151 | var res, err = stub.GetState(id) 152 | if err != nil { 153 | return "", fmt.Errorf("The vehicle %s doesn't exist.", id) 154 | } 155 | 156 | return string(res), nil 157 | } 158 | 159 | func deleteVehicle(stub shim.ChaincodeStubInterface, args []string) (string, error) { 160 | if len(args) < 1 { 161 | return "", fmt.Errorf("There is not enough 1 argument in this function deleteVehicle.") 162 | } 163 | var id = strings.TrimSpace(args[0]) 164 | if id == "" { 165 | return "", fmt.Errorf("The id cannot be blank.") 166 | } 167 | 168 | var err = stub.DelState(id) 169 | if err != nil { 170 | return "", err 171 | } 172 | 173 | return id, nil 174 | } 175 | 176 | func updateVehiclePrice(stub shim.ChaincodeStubInterface, args []string) (string, error) { 177 | var res []byte 178 | var err error 179 | var v *Vehicle = new(Vehicle) 180 | var price float64 181 | var j []byte 182 | 183 | // Id, Price is required currently. 184 | if len(args) < 2 { 185 | return "", fmt.Errorf("There is not enough 2 arguments in this function updateVehiclePrice.") 186 | } 187 | var id = strings.TrimSpace(args[0]) 188 | price, err = strconv.ParseFloat(args[1], 64) 189 | if err != nil { 190 | return "", err 191 | } 192 | 193 | res, err = stub.GetState(id) 194 | if err != nil { 195 | return "", err 196 | } else if res == nil { 197 | return "", fmt.Errorf("The vehicle %s does not exist.", id) 198 | } 199 | 200 | err = json.Unmarshal(res, v) 201 | if err != nil { 202 | return "", err 203 | } 204 | 205 | v.Price = price 206 | 207 | j, err = json.Marshal(v) 208 | if err != nil { 209 | return "", err 210 | } 211 | 212 | // Cannot use addVehicle. 213 | err = stub.PutState(v.Id, j) 214 | if err != nil { 215 | return "", err 216 | } 217 | 218 | return v.Id, nil 219 | } 220 | 221 | func updateVehicleDynPrice(stub shim.ChaincodeStubInterface, args []string) (string, error) { 222 | var res []byte 223 | var err error 224 | var v *Vehicle = new(Vehicle) 225 | var j []byte 226 | 227 | // Id, Price is required currently. 228 | if len(args) < 1 { 229 | return "", fmt.Errorf("There is not enough 1 arguments in this function updateVehicleDynPrice.") 230 | } 231 | var id = strings.TrimSpace(args[0]) 232 | 233 | res, err = stub.GetState(id) 234 | if err != nil { 235 | return "", err 236 | } else if res == nil { 237 | return "", fmt.Errorf("The vehicle %s does not exist.", id) 238 | } 239 | 240 | err = json.Unmarshal(res, v) 241 | if err != nil { 242 | return "", err 243 | } 244 | 245 | // Update the price as original price * 2 246 | v.Price = v.Price * 2 247 | 248 | j, err = json.Marshal(v) 249 | if err != nil { 250 | return "", err 251 | } 252 | 253 | // Cannot use addVehicle. 254 | err = stub.PutState(v.Id, j) 255 | if err != nil { 256 | return "", err 257 | } 258 | 259 | return v.Id, nil 260 | } 261 | 262 | // The wronglyTxRandValue trying won't work, since the proposal response will be different on different chaincode env, for each execution. 263 | // Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:... 264 | func wronglyTxRandValue(stub shim.ChaincodeStubInterface, args []string) (string, error) { 265 | // Create a random value Vehicle. 266 | var brandChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 267 | var r = rand.New(rand.NewSource(time.Now().UnixNano())) 268 | var id = "R" + strconv.FormatUint(r.Uint64(), 10)[0:6] 269 | var p = r.Intn(len(brandChars) - 2) 270 | var brand = brandChars[p : p+3] 271 | 272 | var v Vehicle = Vehicle{ 273 | ObjectType: OBJECTTYPE_VEHICLE, 274 | Id: id, 275 | Brand: brand, 276 | Price: r.Float64() * 1000.0} 277 | 278 | return addVehicle(stub, &v) 279 | } 280 | 281 | func queryVehiclesByBrand(stub shim.ChaincodeStubInterface, args []string) (string, error) { 282 | if len(args) < 1 { 283 | return "", fmt.Errorf("There should be at least one arg of queryVehiclesByBrand.") 284 | } 285 | // There should be only 1 arg for brand. 286 | var brand = strings.TrimSpace(args[0]) 287 | if brand == "" { 288 | return "", fmt.Errorf("The brand cannot be blank.") 289 | } 290 | return queryVehicles(stub, []string{fmt.Sprintf(`{"selector":{"%s":"%s","brand":"%s"}}`, OBJECTTYPE_JSON, OBJECTTYPE_VEHICLE, brand)}) 291 | } 292 | 293 | func queryVehicles(stub shim.ChaincodeStubInterface, args []string) (string, error) { 294 | if len(args) < 1 { 295 | return "", fmt.Errorf("There is at least one query.") 296 | } 297 | var query = strings.TrimSpace(args[0]) 298 | if query == "" { 299 | return "", fmt.Errorf("The query string cannot be blank.") 300 | } 301 | log.Printf(query) 302 | 303 | // There should be only 1 query string. 304 | var stateIterator shim.StateQueryIteratorInterface 305 | var err error 306 | 307 | stateIterator, err = stub.GetQueryResult(query) 308 | if err != nil { 309 | return "", err 310 | } 311 | defer stateIterator.Close() 312 | return joinKVList(stateIterator) 313 | } 314 | 315 | func joinKVList(stateIterator shim.StateQueryIteratorInterface) (string, error) { 316 | var resList []string 317 | for stateIterator.HasNext() { 318 | var kv, err = stateIterator.Next() 319 | if err != nil { 320 | return "", err 321 | } 322 | //resList = append(resList, fmt.Sprintf(`{"key":%s, "value":%s}`, kv.Key, string(kv.Value))) 323 | resList = append(resList, string(kv.Value)) 324 | } 325 | return "[" + strings.Join(resList, ",") + "]", nil 326 | } 327 | 328 | func getVehicleHistory(stub shim.ChaincodeStubInterface, args []string) (string, error) { 329 | if len(args) < 1 { 330 | return "", fmt.Errorf("There is at least one arg for getVehicleHistory.") 331 | } 332 | var historyIterator shim.HistoryQueryIteratorInterface 333 | var err error 334 | var id = strings.TrimSpace(args[0]) 335 | if id == "" { 336 | return "", fmt.Errorf("The id cannot be blank.") 337 | } 338 | 339 | historyIterator, err = stub.GetHistoryForKey(id) 340 | if err != nil { 341 | return "", err 342 | } 343 | defer historyIterator.Close() 344 | return joinKMList(historyIterator) 345 | } 346 | 347 | func joinKMList(histIterator shim.HistoryQueryIteratorInterface) (string, error) { 348 | var resList []string 349 | var jByte []byte 350 | for histIterator.HasNext() { 351 | var km, err = histIterator.Next() 352 | if err != nil { 353 | return "", err 354 | } 355 | jByte, err = json.Marshal(map[string]interface{}{ 356 | "TxId": km.TxId, 357 | "Timestamp": km.Timestamp, 358 | "IsDelete": km.IsDelete, 359 | "Value": km.Value}) 360 | if err != nil { 361 | return "", err 362 | } 363 | resList = append(resList, string(jByte)) 364 | } 365 | return "[" + strings.Join(resList, ",") + "]", nil 366 | } 367 | 368 | func createLease(stub shim.ChaincodeStubInterface, args []string) (string, error) { 369 | // Id, Brand is required currently. 370 | // Only for demo purpose, no any validation of existance of VehicleId, UserId. 371 | if len(args) < 3 { 372 | return "", fmt.Errorf("There is not enough 3 arguments in this function createLease.") 373 | } 374 | var id = strings.TrimSpace(args[0]) 375 | var vehicleId = strings.TrimSpace(args[1]) 376 | var userId = strings.TrimSpace(args[2]) 377 | 378 | var l = Lease{ObjectType: OBJECTTYPE_LEASE, Id: id, VehicleId: vehicleId, UserId: userId} 379 | return addLease(stub, &l) 380 | } 381 | 382 | func addLease(stub shim.ChaincodeStubInterface, l *Lease) (string, error) { 383 | var res []byte 384 | var err error 385 | var jByte []byte 386 | 387 | if l.Id == "" || l.VehicleId == "" || l.UserId == "" { 388 | return "", fmt.Errorf("The id, vehicleId and userId cannot be blank.") 389 | } 390 | 391 | res, err = stub.GetState(l.Id) 392 | if err != nil { 393 | return "", err 394 | } else if res != nil { 395 | return "", fmt.Errorf("The lease %s has already existed.", l.Id) 396 | } 397 | 398 | jByte, err = json.Marshal(l) 399 | if err != nil { 400 | return "", err 401 | } 402 | 403 | err = stub.PutPrivateData(PRIVATE_COLLECTION_LEASE, l.Id, jByte) 404 | if err != nil { 405 | return "", err 406 | } 407 | 408 | return l.Id, nil 409 | } 410 | 411 | // Find Lease by the state key (Id). 412 | func findLease(stub shim.ChaincodeStubInterface, args []string) (string, error) { 413 | if len(args) < 1 { 414 | return "", fmt.Errorf("There is not enough 1 argument in this function findLease.") 415 | } 416 | var id = strings.TrimSpace(args[0]) 417 | if id == "" { 418 | return "", fmt.Errorf("The id cannot be blank.") 419 | } 420 | 421 | var res, err = stub.GetPrivateData(PRIVATE_COLLECTION_LEASE, id) 422 | if err != nil { 423 | return "", fmt.Errorf("The lease %s doesn't exist.", id) 424 | } 425 | 426 | return string(res), nil 427 | } 428 | 429 | func main() { 430 | log.Printf("Begin to start the chaincode VehicleSharing") 431 | var err = shim.Start(new(VehicleSharing)) 432 | if err != nil { 433 | log.Printf("Starting the chaincode VehicleSharing get failed.") 434 | log.Printf(err.Error()) 435 | } 436 | } 437 | -------------------------------------------------------------------------------- /configtx.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | --- 7 | ################################################################################ 8 | # 9 | # Section: Organizations 10 | # 11 | # - This section defines the different organizational identities which will 12 | # be referenced later in the configuration. 13 | # 14 | ################################################################################ 15 | Organizations: 16 | 17 | # SampleOrg defines an MSP using the sampleconfig. It should never be used 18 | # in production but may be used as a template for other definitions 19 | - &OrdererOrg 20 | # DefaultOrg defines the organization which is used in the sampleconfig 21 | # of the fabric.git development environment 22 | Name: OrdererOrg 23 | 24 | # ID to load the MSP definition as 25 | ID: OrdererMSP 26 | 27 | # MSPDir is the filesystem path which contains the MSP configuration 28 | MSPDir: mymsp/orgmsp/orderer.bctest.example.com/msp 29 | 30 | # Policies defines the set of policies at this level of the config tree 31 | # For organization policies, their canonical path is usually 32 | # /Channel/// 33 | Policies: 34 | Readers: 35 | Type: Signature 36 | Rule: "OR('OrdererMSP.member')" 37 | Writers: 38 | Type: Signature 39 | Rule: "OR('OrdererMSP.member')" 40 | Admins: 41 | Type: Signature 42 | Rule: "OR('OrdererMSP.admin')" 43 | 44 | - &VehicleOrg 45 | # DefaultOrg defines the organization which is used in the sampleconfig 46 | # of the fabric.git development environment 47 | Name: VehicleOrg 48 | 49 | # ID to load the MSP definition as 50 | ID: VehicleMSP 51 | 52 | MSPDir: mymsp/orgmsp/peer0.vehicle.example.com/msp 53 | 54 | # Policies defines the set of policies at this level of the config tree 55 | # For organization policies, their canonical path is usually 56 | # /Channel/// 57 | Policies: 58 | Readers: 59 | Type: Signature 60 | Rule: "OR('VehicleMSP.admin', 'VehicleMSP.peer', 'VehicleMSP.client')" 61 | Writers: 62 | Type: Signature 63 | Rule: "OR('VehicleMSP.admin', 'VehicleMSP.client')" 64 | Admins: 65 | Type: Signature 66 | Rule: "OR('VehicleMSP.admin')" 67 | 68 | # leave this flag set to true. 69 | AnchorPeers: 70 | # AnchorPeers defines the location of peers which can be used 71 | # for cross org gossip communication. Note, this value is only 72 | # encoded in the genesis block in the Application section context 73 | - Host: peer0.vehicle.example.com 74 | Port: 7051 75 | 76 | - &SharingOrg 77 | # DefaultOrg defines the organization which is used in the sampleconfig 78 | # of the fabric.git development environment 79 | Name: SharingOrg 80 | 81 | # ID to load the MSP definition as 82 | ID: SharingMSP 83 | 84 | MSPDir: mymsp/orgmsp/peer0.sharing.example.com/msp 85 | 86 | # Policies defines the set of policies at this level of the config tree 87 | # For organization policies, their canonical path is usually 88 | # /Channel/// 89 | Policies: 90 | Readers: 91 | Type: Signature 92 | Rule: "OR('SharingMSP.admin', 'SharingMSP.peer', 'SharingMSP.client')" 93 | Writers: 94 | Type: Signature 95 | Rule: "OR('SharingMSP.admin', 'SharingMSP.client')" 96 | Admins: 97 | Type: Signature 98 | Rule: "OR('SharingMSP.admin')" 99 | 100 | AnchorPeers: 101 | # AnchorPeers defines the location of peers which can be used 102 | # for cross org gossip communication. Note, this value is only 103 | # encoded in the genesis block in the Application section context 104 | - Host: peer0.sharing.example.com 105 | Port: 7051 106 | 107 | ################################################################################ 108 | # 109 | # SECTION: Capabilities 110 | # 111 | # - This section defines the capabilities of fabric network. This is a new 112 | # concept as of v1.1.0 and should not be utilized in mixed networks with 113 | # v1.0.x peers and orderers. Capabilities define features which must be 114 | # present in a fabric binary for that binary to safely participate in the 115 | # fabric network. For instance, if a new MSP type is added, newer binaries 116 | # might recognize and validate the signatures from this type, while older 117 | # binaries without this support would be unable to validate those 118 | # transactions. This could lead to different versions of the fabric binaries 119 | # having different world states. Instead, defining a capability for a channel 120 | # informs those binaries without this capability that they must cease 121 | # processing transactions until they have been upgraded. For v1.0.x if any 122 | # capabilities are defined (including a map with all capabilities turned off) 123 | # then the v1.0.x peer will deliberately crash. 124 | # 125 | ################################################################################ 126 | Capabilities: 127 | # Channel capabilities apply to both the orderers and the peers and must be 128 | # supported by both. 129 | # Set the value of the capability to true to require it. 130 | Channel: &ChannelCapabilities 131 | # V1.3 for Channel is a catchall flag for behavior which has been 132 | # determined to be desired for all orderers and peers running at the v1.3.x 133 | # level, but which would be incompatible with orderers and peers from 134 | # prior releases. 135 | # Prior to enabling V1.3 channel capabilities, ensure that all 136 | # orderers and peers on a channel are at v1.3.0 or later. 137 | V1_3: true 138 | 139 | # Orderer capabilities apply only to the orderers, and may be safely 140 | # used with prior release peers. 141 | # Set the value of the capability to true to require it. 142 | Orderer: &OrdererCapabilities 143 | # V1.1 for Orderer is a catchall flag for behavior which has been 144 | # determined to be desired for all orderers running at the v1.1.x 145 | # level, but which would be incompatible with orderers from prior releases. 146 | # Prior to enabling V1.1 orderer capabilities, ensure that all 147 | # orderers on a channel are at v1.1.0 or later. 148 | V1_1: true 149 | 150 | # Application capabilities apply only to the peer network, and may be safely 151 | # used with prior release orderers. 152 | # Set the value of the capability to true to require it. 153 | Application: &ApplicationCapabilities 154 | # V1.3 for Application enables the new non-backwards compatible 155 | # features and fixes of fabric v1.3. 156 | V1_3: true 157 | # V1.2 for Application enables the new non-backwards compatible 158 | # features and fixes of fabric v1.2 (note, this need not be set if 159 | # later version capabilities are set) 160 | V1_2: false 161 | # V1.1 for Application enables the new non-backwards compatible 162 | # features and fixes of fabric v1.1 (note, this need not be set if 163 | # later version capabilities are set). 164 | V1_1: false 165 | 166 | ################################################################################ 167 | # 168 | # SECTION: Application 169 | # 170 | # - This section defines the values to encode into a config transaction or 171 | # genesis block for application related parameters 172 | # 173 | ################################################################################ 174 | Application: &ApplicationDefaults 175 | 176 | # Organizations is the list of orgs which are defined as participants on 177 | # the application side of the network 178 | Organizations: 179 | 180 | # Policies defines the set of policies at this level of the config tree 181 | # For Application policies, their canonical path is 182 | # /Channel/Application/ 183 | Policies: 184 | Readers: 185 | Type: ImplicitMeta 186 | Rule: "ANY Readers" 187 | Writers: 188 | Type: ImplicitMeta 189 | Rule: "ANY Writers" 190 | Admins: 191 | Type: ImplicitMeta 192 | Rule: "MAJORITY Admins" 193 | 194 | Capabilities: 195 | <<: *ApplicationCapabilities 196 | ################################################################################ 197 | # 198 | # SECTION: Orderer 199 | # 200 | # - This section defines the values to encode into a config transaction or 201 | # genesis block for orderer related parameters 202 | # 203 | ################################################################################ 204 | Orderer: &OrdererDefaults 205 | 206 | # Orderer Type: The orderer implementation to start 207 | # Available types are "solo" and "kafka" 208 | OrdererType: solo 209 | 210 | Addresses: 211 | - orderer.bctest.example.com:7050 212 | 213 | # Batch Timeout: The amount of time to wait before creating a batch 214 | BatchTimeout: 2s 215 | 216 | # Batch Size: Controls the number of messages batched into a block 217 | BatchSize: 218 | 219 | # Max Message Count: The maximum number of messages to permit in a batch 220 | MaxMessageCount: 10 221 | 222 | # Absolute Max Bytes: The absolute maximum number of bytes allowed for 223 | # the serialized messages in a batch. 224 | AbsoluteMaxBytes: 99 MB 225 | 226 | # Preferred Max Bytes: The preferred maximum number of bytes allowed for 227 | # the serialized messages in a batch. A message larger than the preferred 228 | # max bytes will result in a batch larger than preferred max bytes. 229 | PreferredMaxBytes: 512 KB 230 | 231 | Kafka: 232 | # Brokers: A list of Kafka brokers to which the orderer connects 233 | # NOTE: Use IP:port notation 234 | Brokers: 235 | - 127.0.0.1:9092 236 | 237 | # Organizations is the list of orgs which are defined as participants on 238 | # the orderer side of the network 239 | Organizations: 240 | 241 | # Policies defines the set of policies at this level of the config tree 242 | # For Orderer policies, their canonical path is 243 | # /Channel/Orderer/ 244 | Policies: 245 | Readers: 246 | Type: ImplicitMeta 247 | Rule: "ANY Readers" 248 | Writers: 249 | Type: ImplicitMeta 250 | Rule: "ANY Writers" 251 | Admins: 252 | Type: ImplicitMeta 253 | Rule: "MAJORITY Admins" 254 | # BlockValidation specifies what signatures must be included in the block 255 | # from the orderer for the peer to validate it. 256 | BlockValidation: 257 | Type: ImplicitMeta 258 | Rule: "ANY Writers" 259 | 260 | ################################################################################ 261 | # 262 | # CHANNEL 263 | # 264 | # This section defines the values to encode into a config transaction or 265 | # genesis block for channel related parameters. 266 | # 267 | ################################################################################ 268 | Channel: &ChannelDefaults 269 | # Policies defines the set of policies at this level of the config tree 270 | # For Channel policies, their canonical path is 271 | # /Channel/ 272 | Policies: 273 | # Who may invoke the 'Deliver' API 274 | Readers: 275 | Type: ImplicitMeta 276 | Rule: "ANY Readers" 277 | # Who may invoke the 'Broadcast' API 278 | Writers: 279 | Type: ImplicitMeta 280 | Rule: "ANY Writers" 281 | # By default, who may modify elements at this config level 282 | Admins: 283 | Type: ImplicitMeta 284 | Rule: "MAJORITY Admins" 285 | 286 | # Capabilities describes the channel level capabilities, see the 287 | # dedicated Capabilities section elsewhere in this file for a full 288 | # description 289 | Capabilities: 290 | <<: *ChannelCapabilities 291 | 292 | ################################################################################ 293 | # 294 | # Profile 295 | # 296 | # - Different configuration profiles may be encoded here to be specified 297 | # as parameters to the configtxgen tool 298 | # 299 | ################################################################################ 300 | Profiles: 301 | 302 | VehicleSharingOrdererGenesis: 303 | <<: *ChannelDefaults 304 | Orderer: 305 | <<: *OrdererDefaults 306 | Organizations: 307 | - *OrdererOrg 308 | Capabilities: 309 | <<: *OrdererCapabilities 310 | Consortiums: 311 | VehicleSharingConsortium: 312 | Organizations: 313 | - *VehicleOrg 314 | - *SharingOrg 315 | VehicleSharingChannel: 316 | Consortium: VehicleSharingConsortium 317 | Application: 318 | <<: *ApplicationDefaults 319 | Organizations: 320 | - *VehicleOrg 321 | - *SharingOrg 322 | Capabilities: 323 | <<: *ApplicationCapabilities 324 | 325 | SampleDevModeKafka: 326 | <<: *ChannelDefaults 327 | Capabilities: 328 | <<: *ChannelCapabilities 329 | Orderer: 330 | <<: *OrdererDefaults 331 | OrdererType: kafka 332 | Kafka: 333 | Brokers: 334 | - kafka.example.com:9092 335 | 336 | Organizations: 337 | - *OrdererOrg 338 | Capabilities: 339 | <<: *OrdererCapabilities 340 | Application: 341 | <<: *ApplicationDefaults 342 | Organizations: 343 | - <<: *OrdererOrg 344 | Consortiums: 345 | VehicleSharingConsortium: 346 | Organizations: 347 | - *VehicleOrg 348 | - *SharingOrg -------------------------------------------------------------------------------- /configtx_onlinepay/configtx.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | --- 7 | ################################################################################ 8 | # 9 | # Section: Organizations 10 | # 11 | # - This section defines the different organizational identities which will 12 | # be referenced later in the configuration. 13 | # 14 | ################################################################################ 15 | Organizations: 16 | 17 | - &OnlinePayOrg 18 | # DefaultOrg defines the organization which is used in the sampleconfig 19 | # of the fabric.git development environment 20 | Name: OnlinePayOrg 21 | 22 | # ID to load the MSP definition as 23 | ID: OnlinePayMSP 24 | 25 | MSPDir: ../mymsp/orgmsp/peer0.onlinepay.example.com/msp 26 | 27 | # Policies defines the set of policies at this level of the config tree 28 | # For organization policies, their canonical path is usually 29 | # /Channel/// 30 | Policies: 31 | Readers: 32 | Type: Signature 33 | Rule: "OR('OnlinePayMSP.admin', 'OnlinePayMSP.peer', 'OnlinePayMSP.client')" 34 | Writers: 35 | Type: Signature 36 | Rule: "OR('OnlinePayMSP.admin', 'OnlinePayMSP.client')" 37 | Admins: 38 | Type: Signature 39 | Rule: "OR('OnlinePayMSP.admin')" 40 | 41 | AnchorPeers: 42 | # AnchorPeers defines the location of peers which can be used 43 | # for cross org gossip communication. Note, this value is only 44 | # encoded in the genesis block in the Application section context 45 | - Host: peer0.onlinepay.example.com 46 | Port: 7051 47 | -------------------------------------------------------------------------------- /deployed/client/chaincode/vehiclesharing/META-INF/statedb/couchdb/indexes/indexBrand.json: -------------------------------------------------------------------------------- 1 | {"index":{"fields":["objectType","brand"]},"ddoc":"indexBrandDoc", "name":"indexBrand","type":"json"} 2 | -------------------------------------------------------------------------------- /deployed/client/chaincode/vehiclesharing/META-INF/statedb/couchdb/indexes/indexId.json: -------------------------------------------------------------------------------- 1 | {"index":{"fields":["objectType","id"]},"ddoc":"indexIdDoc", "name":"indexId","type":"json"} 2 | -------------------------------------------------------------------------------- /deployed/client/chaincode/vehiclesharing/collections_config.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "leaseRecords", 4 | "policy": "OR('Org1MSP.member', 'Org2MSP.member')", 5 | "requiredPeerCount": 2, 6 | "maxPeerCount": 4, 7 | "blockToLive":3, 8 | "memberOnlyRead": true 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /deployed/client/chaincode/vehiclesharing/vehiclesharing.go: -------------------------------------------------------------------------------- 1 | // This is another chaincode based on Fabric tutorial. 2 | // It will be deployed based on the example first-network. 3 | 4 | package main 5 | 6 | import ( 7 | "encoding/json" 8 | "fmt" 9 | "log" 10 | "math/rand" 11 | "strconv" 12 | "strings" 13 | "time" 14 | 15 | "github.com/hyperledger/fabric/core/chaincode/shim" 16 | "github.com/hyperledger/fabric/protos/peer" 17 | ) 18 | 19 | const OBJECTTYPE_JSON = "objectType" 20 | const OBJECTTYPE_VEHICLE = "VEHICLE" 21 | const OBJECTTYPE_LEASE = "LEASE" 22 | 23 | const PRIVATE_COLLECTION_LEASE = "leaseRecords" 24 | 25 | func init() { 26 | log.SetPrefix("VehicleSharing: ") 27 | log.SetFlags(log.Ldate | log.Lmicroseconds | log.Lshortfile) 28 | } 29 | 30 | type VehicleSharing struct { 31 | } 32 | 33 | type Vehicle struct { 34 | ObjectType string `json:"objectType"` 35 | CreateTime int64 `json:"createTime"` 36 | Id string `json:"id"` 37 | Brand string `json:"brand"` 38 | Price float64 `json:"price"` 39 | OwnerId string `json:"ownerId"` 40 | Status int32 `json:"status"` 41 | UserId string `json:"userId"` 42 | } 43 | 44 | type Lease struct { 45 | ObjectType string `json:"objectType"` 46 | CreateTime int64 `json:"createTime"` 47 | Id string `json:"id"` 48 | VehicleId string `json:"vehicleId"` 49 | UserId string `json:"UserId"` 50 | BeginTime int64 `json:"beginTime"` 51 | EndTime int64 `json:"endTime"` 52 | } 53 | 54 | func (t *VehicleSharing) Init(stub shim.ChaincodeStubInterface) peer.Response { 55 | log.Printf("The chaincode VehicleSharing is instantiated.") 56 | return shim.Success(nil) 57 | } 58 | 59 | func (t *VehicleSharing) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 60 | fn, args := stub.GetFunctionAndParameters() 61 | var res string 62 | var err error 63 | 64 | fn = strings.TrimSpace(fn) 65 | log.Printf("Invoke %s %v", fn, args) 66 | 67 | var FUNCMAP = map[string]func(shim.ChaincodeStubInterface, []string) (string, error){ 68 | // Vehicle functions 69 | "createVehicle": createVehicle, 70 | "findVehicle": findVehicle, 71 | "deleteVehicle": deleteVehicle, 72 | "updateVehiclePrice": updateVehiclePrice, 73 | "updateVehicleDynPrice": updateVehicleDynPrice, 74 | "queryVehiclesByBrand": queryVehiclesByBrand, 75 | "queryVehicles": queryVehicles, 76 | "getVehicleHistory": getVehicleHistory, 77 | "wronglyTxRandValue": wronglyTxRandValue, 78 | // Lease functions 79 | "createLease": createLease, 80 | "findLease": findLease} 81 | 82 | var ccAction = FUNCMAP[fn] 83 | if ccAction == nil { 84 | var errStr = fmt.Sprintf("Function %s doesn't exist.", fn) 85 | log.Printf(errStr) 86 | return shim.Error(errStr) 87 | } 88 | 89 | // TODO To handle the function if it doesn't exist. 90 | res, err = ccAction(stub, args) 91 | 92 | if err == nil { 93 | log.Printf("Invoke %s %s get succeed. Result: %s", fn, args, res) 94 | return shim.Success([]byte(res)) 95 | } else { 96 | log.Printf("Invoke %s %s get failed. Reason: %s", fn, args, err.Error()) 97 | return shim.Error(err.Error()) 98 | } 99 | } 100 | 101 | func createVehicle(stub shim.ChaincodeStubInterface, args []string) (string, error) { 102 | // Id, Brand is required currently. 103 | if len(args) < 2 { 104 | return "", fmt.Errorf("There is not enough 2 arguments in this function createVehicle.") 105 | } 106 | var id = strings.TrimSpace(args[0]) 107 | var brand = strings.TrimSpace(args[1]) 108 | 109 | var v = Vehicle{ObjectType: OBJECTTYPE_VEHICLE, Id: id, Brand: brand} 110 | return addVehicle(stub, &v) 111 | } 112 | 113 | func addVehicle(stub shim.ChaincodeStubInterface, v *Vehicle) (string, error) { 114 | var res []byte 115 | var err error 116 | var jByte []byte 117 | 118 | if v.Id == "" || v.Brand == "" { 119 | return "", fmt.Errorf("The id and brand cannot be blank.") 120 | } 121 | 122 | res, err = stub.GetState(v.Id) 123 | if err != nil { 124 | return "", err 125 | } else if res != nil { 126 | return "", fmt.Errorf("The vehicle %s has already existed.", v.Id) 127 | } 128 | 129 | jByte, err = json.Marshal(v) 130 | if err != nil { 131 | return "", err 132 | } 133 | err = stub.PutState(v.Id, jByte) 134 | if err != nil { 135 | return "", err 136 | } 137 | 138 | return v.Id, nil 139 | } 140 | 141 | // Find Vehicle by the state key (Id). 142 | func findVehicle(stub shim.ChaincodeStubInterface, args []string) (string, error) { 143 | if len(args) < 1 { 144 | return "", fmt.Errorf("There is not enough 1 argument in this function findVehicle.") 145 | } 146 | var id = strings.TrimSpace(args[0]) 147 | if id == "" { 148 | return "", fmt.Errorf("The id cannot be blank.") 149 | } 150 | 151 | var res, err = stub.GetState(id) 152 | if err != nil { 153 | return "", fmt.Errorf("The vehicle %s doesn't exist.", id) 154 | } 155 | 156 | return string(res), nil 157 | } 158 | 159 | func deleteVehicle(stub shim.ChaincodeStubInterface, args []string) (string, error) { 160 | if len(args) < 1 { 161 | return "", fmt.Errorf("There is not enough 1 argument in this function deleteVehicle.") 162 | } 163 | var id = strings.TrimSpace(args[0]) 164 | if id == "" { 165 | return "", fmt.Errorf("The id cannot be blank.") 166 | } 167 | 168 | var err = stub.DelState(id) 169 | if err != nil { 170 | return "", err 171 | } 172 | 173 | return id, nil 174 | } 175 | 176 | func updateVehiclePrice(stub shim.ChaincodeStubInterface, args []string) (string, error) { 177 | var res []byte 178 | var err error 179 | var v *Vehicle = new(Vehicle) 180 | var price float64 181 | var j []byte 182 | 183 | // Id, Price is required currently. 184 | if len(args) < 2 { 185 | return "", fmt.Errorf("There is not enough 2 arguments in this function updateVehiclePrice.") 186 | } 187 | var id = strings.TrimSpace(args[0]) 188 | price, err = strconv.ParseFloat(args[1], 64) 189 | if err != nil { 190 | return "", err 191 | } 192 | 193 | res, err = stub.GetState(id) 194 | if err != nil { 195 | return "", err 196 | } else if res == nil { 197 | return "", fmt.Errorf("The vehicle %s does not exist.", id) 198 | } 199 | 200 | err = json.Unmarshal(res, v) 201 | if err != nil { 202 | return "", err 203 | } 204 | 205 | v.Price = price 206 | 207 | j, err = json.Marshal(v) 208 | if err != nil { 209 | return "", err 210 | } 211 | 212 | // Cannot use addVehicle. 213 | err = stub.PutState(v.Id, j) 214 | if err != nil { 215 | return "", err 216 | } 217 | 218 | return v.Id, nil 219 | } 220 | 221 | func updateVehicleDynPrice(stub shim.ChaincodeStubInterface, args []string) (string, error) { 222 | var res []byte 223 | var err error 224 | var v *Vehicle = new(Vehicle) 225 | var j []byte 226 | 227 | // Id, Price is required currently. 228 | if len(args) < 1 { 229 | return "", fmt.Errorf("There is not enough 1 arguments in this function updateVehicleDynPrice.") 230 | } 231 | var id = strings.TrimSpace(args[0]) 232 | 233 | res, err = stub.GetState(id) 234 | if err != nil { 235 | return "", err 236 | } else if res == nil { 237 | return "", fmt.Errorf("The vehicle %s does not exist.", id) 238 | } 239 | 240 | err = json.Unmarshal(res, v) 241 | if err != nil { 242 | return "", err 243 | } 244 | 245 | // Update the price as original price * 2 246 | v.Price = v.Price * 2 247 | 248 | j, err = json.Marshal(v) 249 | if err != nil { 250 | return "", err 251 | } 252 | 253 | // Cannot use addVehicle. 254 | err = stub.PutState(v.Id, j) 255 | if err != nil { 256 | return "", err 257 | } 258 | 259 | return v.Id, nil 260 | } 261 | 262 | // The wronglyTxRandValue trying won't work, since the proposal response will be different on different chaincode env, for each execution. 263 | // Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:... 264 | func wronglyTxRandValue(stub shim.ChaincodeStubInterface, args []string) (string, error) { 265 | // Create a random value Vehicle. 266 | var brandChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 267 | var r = rand.New(rand.NewSource(time.Now().UnixNano())) 268 | var id = "R" + strconv.FormatUint(r.Uint64(), 10)[0:6] 269 | var p = r.Intn(len(brandChars) - 2) 270 | var brand = brandChars[p : p+3] 271 | 272 | var v Vehicle = Vehicle{ 273 | ObjectType: OBJECTTYPE_VEHICLE, 274 | Id: id, 275 | Brand: brand, 276 | Price: r.Float64() * 1000.0} 277 | 278 | return addVehicle(stub, &v) 279 | } 280 | 281 | func queryVehiclesByBrand(stub shim.ChaincodeStubInterface, args []string) (string, error) { 282 | if len(args) < 1 { 283 | return "", fmt.Errorf("There should be at least one arg of queryVehiclesByBrand.") 284 | } 285 | // There should be only 1 arg for brand. 286 | var brand = strings.TrimSpace(args[0]) 287 | if brand == "" { 288 | return "", fmt.Errorf("The brand cannot be blank.") 289 | } 290 | return queryVehicles(stub, []string{fmt.Sprintf(`{"selector":{"%s":"%s","brand":"%s"}}`, OBJECTTYPE_JSON, OBJECTTYPE_VEHICLE, brand)}) 291 | } 292 | 293 | func queryVehicles(stub shim.ChaincodeStubInterface, args []string) (string, error) { 294 | if len(args) < 1 { 295 | return "", fmt.Errorf("There is at least one query.") 296 | } 297 | var query = strings.TrimSpace(args[0]) 298 | if query == "" { 299 | return "", fmt.Errorf("The query string cannot be blank.") 300 | } 301 | log.Printf(query) 302 | 303 | // There should be only 1 query string. 304 | var stateIterator shim.StateQueryIteratorInterface 305 | var err error 306 | 307 | stateIterator, err = stub.GetQueryResult(query) 308 | if err != nil { 309 | return "", err 310 | } 311 | defer stateIterator.Close() 312 | return joinKVList(stateIterator) 313 | } 314 | 315 | func joinKVList(stateIterator shim.StateQueryIteratorInterface) (string, error) { 316 | var resList []string 317 | for stateIterator.HasNext() { 318 | var kv, err = stateIterator.Next() 319 | if err != nil { 320 | return "", err 321 | } 322 | //resList = append(resList, fmt.Sprintf(`{"key":%s, "value":%s}`, kv.Key, string(kv.Value))) 323 | resList = append(resList, string(kv.Value)) 324 | } 325 | return "[" + strings.Join(resList, ",") + "]", nil 326 | } 327 | 328 | func getVehicleHistory(stub shim.ChaincodeStubInterface, args []string) (string, error) { 329 | if len(args) < 1 { 330 | return "", fmt.Errorf("There is at least one arg for getVehicleHistory.") 331 | } 332 | var historyIterator shim.HistoryQueryIteratorInterface 333 | var err error 334 | var id = strings.TrimSpace(args[0]) 335 | if id == "" { 336 | return "", fmt.Errorf("The id cannot be blank.") 337 | } 338 | 339 | historyIterator, err = stub.GetHistoryForKey(id) 340 | if err != nil { 341 | return "", err 342 | } 343 | defer historyIterator.Close() 344 | return joinKMList(historyIterator) 345 | } 346 | 347 | func joinKMList(histIterator shim.HistoryQueryIteratorInterface) (string, error) { 348 | var resList []string 349 | var jByte []byte 350 | for histIterator.HasNext() { 351 | var km, err = histIterator.Next() 352 | if err != nil { 353 | return "", err 354 | } 355 | jByte, err = json.Marshal(map[string]interface{}{ 356 | "TxId": km.TxId, 357 | "Timestamp": km.Timestamp, 358 | "IsDelete": km.IsDelete, 359 | "Value": km.Value}) 360 | if err != nil { 361 | return "", err 362 | } 363 | resList = append(resList, string(jByte)) 364 | } 365 | return "[" + strings.Join(resList, ",") + "]", nil 366 | } 367 | 368 | func createLease(stub shim.ChaincodeStubInterface, args []string) (string, error) { 369 | // Id, Brand is required currently. 370 | // Only for demo purpose, no any validation of existance of VehicleId, UserId. 371 | if len(args) < 3 { 372 | return "", fmt.Errorf("There is not enough 3 arguments in this function createLease.") 373 | } 374 | var id = strings.TrimSpace(args[0]) 375 | var vehicleId = strings.TrimSpace(args[1]) 376 | var userId = strings.TrimSpace(args[2]) 377 | 378 | var l = Lease{ObjectType: OBJECTTYPE_LEASE, Id: id, VehicleId: vehicleId, UserId: userId} 379 | return addLease(stub, &l) 380 | } 381 | 382 | func addLease(stub shim.ChaincodeStubInterface, l *Lease) (string, error) { 383 | var res []byte 384 | var err error 385 | var jByte []byte 386 | 387 | if l.Id == "" || l.VehicleId == "" || l.UserId == "" { 388 | return "", fmt.Errorf("The id, vehicleId and userId cannot be blank.") 389 | } 390 | 391 | res, err = stub.GetState(l.Id) 392 | if err != nil { 393 | return "", err 394 | } else if res != nil { 395 | return "", fmt.Errorf("The lease %s has already existed.", l.Id) 396 | } 397 | 398 | jByte, err = json.Marshal(l) 399 | if err != nil { 400 | return "", err 401 | } 402 | 403 | err = stub.PutPrivateData(PRIVATE_COLLECTION_LEASE, l.Id, jByte) 404 | if err != nil { 405 | return "", err 406 | } 407 | 408 | return l.Id, nil 409 | } 410 | 411 | // Find Lease by the state key (Id). 412 | func findLease(stub shim.ChaincodeStubInterface, args []string) (string, error) { 413 | if len(args) < 1 { 414 | return "", fmt.Errorf("There is not enough 1 argument in this function findLease.") 415 | } 416 | var id = strings.TrimSpace(args[0]) 417 | if id == "" { 418 | return "", fmt.Errorf("The id cannot be blank.") 419 | } 420 | 421 | var res, err = stub.GetPrivateData(PRIVATE_COLLECTION_LEASE, id) 422 | if err != nil { 423 | return "", fmt.Errorf("The lease %s doesn't exist.", id) 424 | } 425 | 426 | return string(res), nil 427 | } 428 | 429 | func main() { 430 | log.Printf("Begin to start the chaincode VehicleSharing") 431 | var err = shim.Start(new(VehicleSharing)) 432 | if err != nil { 433 | log.Printf("Starting the chaincode VehicleSharing get failed.") 434 | log.Printf(err.Error()) 435 | } 436 | } 437 | -------------------------------------------------------------------------------- /deployed/client/channel-artifacts/onlinepayorg.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": {}, 3 | "mod_policy": "Admins", 4 | "policies": { 5 | "Admins": { 6 | "mod_policy": "Admins", 7 | "policy": { 8 | "type": 1, 9 | "value": { 10 | "identities": [ 11 | { 12 | "principal": { 13 | "msp_identifier": "OnlinePayMSP", 14 | "role": "ADMIN" 15 | }, 16 | "principal_classification": "ROLE" 17 | } 18 | ], 19 | "rule": { 20 | "n_out_of": { 21 | "n": 1, 22 | "rules": [ 23 | { 24 | "signed_by": 0 25 | } 26 | ] 27 | } 28 | }, 29 | "version": 0 30 | } 31 | }, 32 | "version": "0" 33 | }, 34 | "Readers": { 35 | "mod_policy": "Admins", 36 | "policy": { 37 | "type": 1, 38 | "value": { 39 | "identities": [ 40 | { 41 | "principal": { 42 | "msp_identifier": "OnlinePayMSP", 43 | "role": "ADMIN" 44 | }, 45 | "principal_classification": "ROLE" 46 | }, 47 | { 48 | "principal": { 49 | "msp_identifier": "OnlinePayMSP", 50 | "role": "PEER" 51 | }, 52 | "principal_classification": "ROLE" 53 | }, 54 | { 55 | "principal": { 56 | "msp_identifier": "OnlinePayMSP", 57 | "role": "CLIENT" 58 | }, 59 | "principal_classification": "ROLE" 60 | } 61 | ], 62 | "rule": { 63 | "n_out_of": { 64 | "n": 1, 65 | "rules": [ 66 | { 67 | "signed_by": 0 68 | }, 69 | { 70 | "signed_by": 1 71 | }, 72 | { 73 | "signed_by": 2 74 | } 75 | ] 76 | } 77 | }, 78 | "version": 0 79 | } 80 | }, 81 | "version": "0" 82 | }, 83 | "Writers": { 84 | "mod_policy": "Admins", 85 | "policy": { 86 | "type": 1, 87 | "value": { 88 | "identities": [ 89 | { 90 | "principal": { 91 | "msp_identifier": "OnlinePayMSP", 92 | "role": "ADMIN" 93 | }, 94 | "principal_classification": "ROLE" 95 | }, 96 | { 97 | "principal": { 98 | "msp_identifier": "OnlinePayMSP", 99 | "role": "CLIENT" 100 | }, 101 | "principal_classification": "ROLE" 102 | } 103 | ], 104 | "rule": { 105 | "n_out_of": { 106 | "n": 1, 107 | "rules": [ 108 | { 109 | "signed_by": 0 110 | }, 111 | { 112 | "signed_by": 1 113 | } 114 | ] 115 | } 116 | }, 117 | "version": 0 118 | } 119 | }, 120 | "version": "0" 121 | } 122 | }, 123 | "values": { 124 | "MSP": { 125 | "mod_policy": "Admins", 126 | "value": { 127 | "config": { 128 | "admins": [ 129 | "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI4ekNDQVprQ0ZRRHl2cThsNE9ISXIrMC81b25OM050OUlaM2JmVEFLQmdncWhrak9QUVFEQWpCeE1Rc3cKQ1FZRFZRUUdFd0pEVGpFUk1BOEdBMVVFQ0F3SVUyaGhZVzRnV0dreERqQU1CZ05WQkFjTUJWaHBJRUZ1TVJ3dwpHZ1lEVlFRS0RCTkJJRTl1YkdsdVpWQmhlU0JEYjIxd1lXNTVNU0V3SHdZRFZRUUREQmhqWVM1dmJteHBibVZ3CllYa3VaWGhoYlhCc1pTNWpiMjB3SGhjTk1Ua3dNakV3TURVd016SXdXaGNOTWprd01qQTNNRFV3TXpJd1dqQ0IKaFRFTE1Ba0dBMVVFQmhNQ1EwNHhFVEFQQmdOVkJBZ01DRk5vWVdGdUlGaHBNUTR3REFZRFZRUUhEQVZZYVNCQgpiakVjTUJvR0ExVUVDZ3dUUVNCUGJteHBibVZRWVhrZ1EyOXRjR0Z1ZVRFUE1BMEdBMVVFQ3d3R1kyeHBaVzUwCk1TUXdJZ1lEVlFRRERCdGhaRzFwYmtCdmJteHBibVZ3WVhrdVpYaGhiWEJzWlM1amIyMHdXVEFUQmdjcWhrak8KUFFJQkJnZ3Foa2pPUFFNQkJ3TkNBQVFYbkVTaGZkYkswdStnUEhUeERBaDVkSkFPRmNmUGttRkVITWhWd0w4VgpISm1uZTRMZlhNdktCZTYvRWNQL1pvSnFoRXFOY0dIMStIZkJ3WEZGN1NyME1Bb0dDQ3FHU000OUJBTUNBMGdBCk1FVUNJUUN3cDByN0tvYzF6bHN0MzVGZlBQUHQ4TFZnN09xR3Q5VUZKRTU0UHc5aW1RSWdBK0hEeGlwZW1zSXkKYjU5WVM4VHlCY3dqbmdNcVZnc0dUa05MUlp3b1NKZz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=" 130 | ], 131 | "crypto_config": { 132 | "identity_identifier_hash_function": "SHA256", 133 | "signature_hash_family": "SHA2" 134 | }, 135 | "fabric_node_ous": { 136 | "client_ou_identifier": { 137 | "certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNOVENDQWRxZ0F3SUJBZ0lVRk9ML0QyamVYZTJoeXNyYzFPc0YzTDRDcUE0d0NnWUlLb1pJemowRUF3SXcKY1RFTE1Ba0dBMVVFQmhNQ1EwNHhFVEFQQmdOVkJBZ01DRk5vWVdGdUlGaHBNUTR3REFZRFZRUUhEQVZZYVNCQgpiakVjTUJvR0ExVUVDZ3dUUVNCUGJteHBibVZRWVhrZ1EyOXRjR0Z1ZVRFaE1COEdBMVVFQXd3WVkyRXViMjVzCmFXNWxjR0Y1TG1WNFlXMXdiR1V1WTI5dE1CNFhEVEU1TURJeE1EQTFNRE15TUZvWERUSTVNREl3TnpBMU1ETXkKTUZvd2NURUxNQWtHQTFVRUJoTUNRMDR4RVRBUEJnTlZCQWdNQ0ZOb1lXRnVJRmhwTVE0d0RBWURWUVFIREFWWQphU0JCYmpFY01Cb0dBMVVFQ2d3VFFTQlBibXhwYm1WUVlYa2dRMjl0Y0dGdWVURWhNQjhHQTFVRUF3d1lZMkV1CmIyNXNhVzVsY0dGNUxtVjRZVzF3YkdVdVkyOXRNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUKOXRUUU54RmJXdXM1Wm1YdDlVbW11VE1HOFdWZmpGWVNSSXhzdWFpVitPVi9PLzNSNnAxSjJTZFdmdFM1L3M5aQpXSjBIQ2JBMWpVdnF6SlpIZGRYcTM2TlFNRTR3SFFZRFZSME9CQllFRk55ZXUvZTZDclZreFpjeWN0YXNjWXVtCkd6MWVNQjhHQTFVZEl3UVlNQmFBRk55ZXUvZTZDclZreFpjeWN0YXNjWXVtR3oxZU1Bd0dBMVVkRXdRRk1BTUIKQWY4d0NnWUlLb1pJemowRUF3SURTUUF3UmdJaEFMcXk1R0k3STh0eWJGY2xpZHIvYXMreDErSlQ0WWJvUGQrMQpqdlF1Q212aUFpRUF1aVVGL3VVeDk3NHUrWnV4YTZoaEpsNXJwRnJ6KzN5K0ZXNFZ5ckdvMGNzPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==", 138 | "organizational_unit_identifier": "client" 139 | }, 140 | "enable": true, 141 | "peer_ou_identifier": { 142 | "certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNOVENDQWRxZ0F3SUJBZ0lVRk9ML0QyamVYZTJoeXNyYzFPc0YzTDRDcUE0d0NnWUlLb1pJemowRUF3SXcKY1RFTE1Ba0dBMVVFQmhNQ1EwNHhFVEFQQmdOVkJBZ01DRk5vWVdGdUlGaHBNUTR3REFZRFZRUUhEQVZZYVNCQgpiakVjTUJvR0ExVUVDZ3dUUVNCUGJteHBibVZRWVhrZ1EyOXRjR0Z1ZVRFaE1COEdBMVVFQXd3WVkyRXViMjVzCmFXNWxjR0Y1TG1WNFlXMXdiR1V1WTI5dE1CNFhEVEU1TURJeE1EQTFNRE15TUZvWERUSTVNREl3TnpBMU1ETXkKTUZvd2NURUxNQWtHQTFVRUJoTUNRMDR4RVRBUEJnTlZCQWdNQ0ZOb1lXRnVJRmhwTVE0d0RBWURWUVFIREFWWQphU0JCYmpFY01Cb0dBMVVFQ2d3VFFTQlBibXhwYm1WUVlYa2dRMjl0Y0dGdWVURWhNQjhHQTFVRUF3d1lZMkV1CmIyNXNhVzVsY0dGNUxtVjRZVzF3YkdVdVkyOXRNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUKOXRUUU54RmJXdXM1Wm1YdDlVbW11VE1HOFdWZmpGWVNSSXhzdWFpVitPVi9PLzNSNnAxSjJTZFdmdFM1L3M5aQpXSjBIQ2JBMWpVdnF6SlpIZGRYcTM2TlFNRTR3SFFZRFZSME9CQllFRk55ZXUvZTZDclZreFpjeWN0YXNjWXVtCkd6MWVNQjhHQTFVZEl3UVlNQmFBRk55ZXUvZTZDclZreFpjeWN0YXNjWXVtR3oxZU1Bd0dBMVVkRXdRRk1BTUIKQWY4d0NnWUlLb1pJemowRUF3SURTUUF3UmdJaEFMcXk1R0k3STh0eWJGY2xpZHIvYXMreDErSlQ0WWJvUGQrMQpqdlF1Q212aUFpRUF1aVVGL3VVeDk3NHUrWnV4YTZoaEpsNXJwRnJ6KzN5K0ZXNFZ5ckdvMGNzPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==", 143 | "organizational_unit_identifier": "peer" 144 | } 145 | }, 146 | "intermediate_certs": [], 147 | "name": "OnlinePayMSP", 148 | "organizational_unit_identifiers": [], 149 | "revocation_list": [], 150 | "root_certs": [ 151 | "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNOVENDQWRxZ0F3SUJBZ0lVRk9ML0QyamVYZTJoeXNyYzFPc0YzTDRDcUE0d0NnWUlLb1pJemowRUF3SXcKY1RFTE1Ba0dBMVVFQmhNQ1EwNHhFVEFQQmdOVkJBZ01DRk5vWVdGdUlGaHBNUTR3REFZRFZRUUhEQVZZYVNCQgpiakVjTUJvR0ExVUVDZ3dUUVNCUGJteHBibVZRWVhrZ1EyOXRjR0Z1ZVRFaE1COEdBMVVFQXd3WVkyRXViMjVzCmFXNWxjR0Y1TG1WNFlXMXdiR1V1WTI5dE1CNFhEVEU1TURJeE1EQTFNRE15TUZvWERUSTVNREl3TnpBMU1ETXkKTUZvd2NURUxNQWtHQTFVRUJoTUNRMDR4RVRBUEJnTlZCQWdNQ0ZOb1lXRnVJRmhwTVE0d0RBWURWUVFIREFWWQphU0JCYmpFY01Cb0dBMVVFQ2d3VFFTQlBibXhwYm1WUVlYa2dRMjl0Y0dGdWVURWhNQjhHQTFVRUF3d1lZMkV1CmIyNXNhVzVsY0dGNUxtVjRZVzF3YkdVdVkyOXRNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUKOXRUUU54RmJXdXM1Wm1YdDlVbW11VE1HOFdWZmpGWVNSSXhzdWFpVitPVi9PLzNSNnAxSjJTZFdmdFM1L3M5aQpXSjBIQ2JBMWpVdnF6SlpIZGRYcTM2TlFNRTR3SFFZRFZSME9CQllFRk55ZXUvZTZDclZreFpjeWN0YXNjWXVtCkd6MWVNQjhHQTFVZEl3UVlNQmFBRk55ZXUvZTZDclZreFpjeWN0YXNjWXVtR3oxZU1Bd0dBMVVkRXdRRk1BTUIKQWY4d0NnWUlLb1pJemowRUF3SURTUUF3UmdJaEFMcXk1R0k3STh0eWJGY2xpZHIvYXMreDErSlQ0WWJvUGQrMQpqdlF1Q212aUFpRUF1aVVGL3VVeDk3NHUrWnV4YTZoaEpsNXJwRnJ6KzN5K0ZXNFZ5ckdvMGNzPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" 152 | ], 153 | "signing_identity": null, 154 | "tls_intermediate_certs": [], 155 | "tls_root_certs": [ 156 | "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNQRENDQWVHZ0F3SUJBZ0lWQU4vWUJmRDgrMXY2dmhtK2xMTkZKUGkyL1F6Rk1Bb0dDQ3FHU000OUJBTUMKTUhReEN6QUpCZ05WQkFZVEFrTk9NUkV3RHdZRFZRUUlEQWhUYUdGaGJpQllhVEVPTUF3R0ExVUVCd3dGV0drZwpRVzR4SERBYUJnTlZCQW9NRTBFZ1QyNXNhVzVsVUdGNUlFTnZiWEJoYm5reEpEQWlCZ05WQkFNTUczUnNjMk5oCkxtOXViR2x1WlhCaGVTNWxlR0Z0Y0d4bExtTnZiVEFlRncweE9UQXlNVEF3TlRBek1qQmFGdzB5T1RBeU1EY3cKTlRBek1qQmFNSFF4Q3pBSkJnTlZCQVlUQWtOT01SRXdEd1lEVlFRSURBaFRhR0ZoYmlCWWFURU9NQXdHQTFVRQpCd3dGV0drZ1FXNHhIREFhQmdOVkJBb01FMEVnVDI1c2FXNWxVR0Y1SUVOdmJYQmhibmt4SkRBaUJnTlZCQU1NCkczUnNjMk5oTG05dWJHbHVaWEJoZVM1bGVHRnRjR3hsTG1OdmJUQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDkKQXdFSEEwSUFCQVdwaXorbWxmL1k2eDVoSGs4Q0lmRHpSMzEwUy85NjdnTDY0anZVemxzbnlxSTJ2Mi9jMEVvQQpZWXNHcHJOdHBXZzJtOTlHOUxoMXFFMDM3UUJ5bnFHalVEQk9NQjBHQTFVZERnUVdCQlRDVEU4NmM3WmYzYmlwCnpoV1NEdEhUSWRncUREQWZCZ05WSFNNRUdEQVdnQlRDVEU4NmM3WmYzYmlwemhXU0R0SFRJZGdxRERBTUJnTlYKSFJNRUJUQURBUUgvTUFvR0NDcUdTTTQ5QkFNQ0Ewa0FNRVlDSVFEd21Rcjk2aUI5L01rQ2cxREtaUm5VVWJSRgpoNlNEUFhUSng4Y29najFTandJaEFOWHZKTFFOeVhrYXZqK2dqQzdiMVB6dWEwK3dnUHJsTHZ6U2JSUVhoNGJnCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K" 157 | ] 158 | }, 159 | "type": 0 160 | }, 161 | "version": "0" 162 | } 163 | }, 164 | "version": "0" 165 | } 166 | -------------------------------------------------------------------------------- /deployed/client/channel-artifacts/vehiclesharing_channel.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomxucnxa/vehiclesharing/5e26fa6d2ad7198cfc6def52c9796423c3d05ffa/deployed/client/channel-artifacts/vehiclesharing_channel.tx -------------------------------------------------------------------------------- /deployed/client/docker-compose-prod-client.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | services: 9 | client: 10 | container_name: client 11 | image: hyperledger/fabric-tools:latest 12 | tty: true 13 | stdin_open: true 14 | environment: 15 | - GOPATH=/opt/gopath 16 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 17 | #- FABRIC_LOGGING_SPEC=DEBUG 18 | - FABRIC_LOGGING_SPEC=INFO 19 | - CORE_PEER_ID=client 20 | - CORE_PEER_ADDRESS=peer0.vehicle.example.com:7051 21 | #- CORE_PEER_LOCALMSPID=VehicleMSP 22 | - CORE_PEER_TLS_ENABLED=true 23 | #- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/peer0.vehicle.example.com.pem 24 | #- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/peer0.vehicle.example.com.key 25 | #- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.vehicle.example.com.pem 26 | #- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp 27 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 28 | command: /bin/bash 29 | volumes: 30 | - /var/run/:/host/var/run/ 31 | - /bin/ping:/bin/ping 32 | - /usr/bin/telnet:/usr/bin/telnet 33 | - ./chaincode/:/opt/gopath/src/github.com/chaincode 34 | - ./utils:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/ 35 | - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts 36 | - ./mymsp/localmsp:/etc/hyperledger/fabric/localmsp 37 | - ./mymsp/orgmsp:/etc/hyperledger/fabric/orgmsp 38 | network_mode: "host" 39 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/msp/admincerts/admin@bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB0jCCAXkCFQD4Rp8JI6iszdQFXROug+183nHeNjAKBggqhkjOPQQDAjBqMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 5 | cGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG0xCzAJBgNV 6 | BAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAWBgNV 7 | BAoMD0Jsb2NrY2hhaW4gVGVzdDEhMB8GA1UEAwwYYWRtaW5AYmN0ZXN0LmV4YW1w 8 | bGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEU+KZ0QN6gaeTb5XfQ3aT 9 | TbeVBhxEMz4cN29igVbxy8J9SZvz/2YmDN/wXdFn/6TFqre6+fWF2UFzGR+Ox8bu 10 | LDAKBggqhkjOPQQDAgNHADBEAiAsrceRQ5u9DFG5+X6QpwWe66qpbpWQCHg2Xsxl 11 | aVgdbgIgPepcfIWl8nxXXwCLzpgBmmQvDWTYZBBj+eXAVN6NF0E= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/msp/cacerts/ca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICJjCCAcygAwIBAgIUG77Gr/0s+Q0XK5t1FhPQxl77RY8wCgYIKoZIzj0EAwIw 3 | ajELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MR4wHAYDVQQDDBVjYS5iY3Rlc3Qu 5 | ZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBqMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 7 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABA7WF+cMckSaCVxCU+8P 9 | lhi79vVVd3kaObcdxG33zAEKcolJBdfSL3HvpsMg36QdMsnIoi5nuoRwA8dTZuzI 10 | s6WjUDBOMB0GA1UdDgQWBBT6Mmy5v2BJ6lGBSdUgaS1s7sXNfDAfBgNVHSMEGDAW 11 | gBT6Mmy5v2BJ6lGBSdUgaS1s7sXNfDAMBgNVHRMEBTADAQH/MAoGCCqGSM49BAMC 12 | A0gAMEUCIQD+aA79p0PuaOHNJPyrxkYSvHuLr+V5fEram37UZE0GaQIgL2kItYK7 13 | 2AmD2mox6BUeQek/us3x74qc3Qcq+oKH+IA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/msp/keystore/admin@bctest.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgMqscH0FdEKAEv2P9 3 | b5UYRz8IyTUYTTF/BfVI8f1tal6hRANCAART4pnRA3qBp5Nvld9DdpNNt5UGHEQz 4 | Phw3b2KBVvHLwn1Jm/P/ZiYM3/Bd0Wf/pMWqt7r59YXZQXMZH47Hxu4s 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/msp/signcerts/admin@bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB0jCCAXkCFQD4Rp8JI6iszdQFXROug+183nHeNjAKBggqhkjOPQQDAjBqMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 5 | cGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG0xCzAJBgNV 6 | BAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAWBgNV 7 | BAoMD0Jsb2NrY2hhaW4gVGVzdDEhMB8GA1UEAwwYYWRtaW5AYmN0ZXN0LmV4YW1w 8 | bGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEU+KZ0QN6gaeTb5XfQ3aT 9 | TbeVBhxEMz4cN29igVbxy8J9SZvz/2YmDN/wXdFn/6TFqre6+fWF2UFzGR+Ox8bu 10 | LDAKBggqhkjOPQQDAgNHADBEAiAsrceRQ5u9DFG5+X6QpwWe66qpbpWQCHg2Xsxl 11 | aVgdbgIgPepcfIWl8nxXXwCLzpgBmmQvDWTYZBBj+eXAVN6NF0E= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdKgAwIBAgIUP1xrG779Dy/ta2Dv1xscT73Xb84wCgYIKoZIzj0EAwIw 3 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MSEwHwYDVQQDDBh0bHNjYS5iY3Rl 5 | c3QuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBt 6 | MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFu 7 | MRgwFgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVz 8 | dC5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK9MO9U9dVCp 9 | d6bsBhrMIKagKYAZ6zmYNK86luMP98qn6gOfwmWJ0/sH2RsG6TslZ6TVgNUwpPp8 10 | yFRYGxfhJAijUDBOMB0GA1UdDgQWBBRt/a4SF47h6lkGPfGOwiOMcRsJIDAfBgNV 11 | HSMEGDAWgBRt/a4SF47h6lkGPfGOwiOMcRsJIDAMBgNVHRMEBTADAQH/MAoGCCqG 12 | SM49BAMCA0gAMEUCIQCpKG/AJEcrfil1x2Gm+am+QWrLXw7/QWCNv361Im+tJQIg 13 | A8U2WgJb+uOgPl2JUUdjXZxrwjQCytNaouLhEVejN8M= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/tls/tls-admin@bctest.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgdK9QM8mg+4rz4+B9 3 | jLAFEoAALRaTZB3Q9m4zwqWiiuihRANCAAQGR5Q7rRXI2hqPwIcmXh4SwM9lAEPt 4 | xw1AHCxRzZs/w/aNOPs9bz/HuBYszMucgiBInYp2YV+n3MLP2xXdNP3E 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/tls/tls-admin@bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB1jCCAXwCFQDttJfW+8azvS7Xq6APLuWAwp/OLjAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVzdC5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG0xCzAJ 6 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAW 7 | BgNVBAoMD0Jsb2NrY2hhaW4gVGVzdDEhMB8GA1UEAwwYYWRtaW5AYmN0ZXN0LmV4 8 | YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBkeUO60VyNoaj8CH 9 | Jl4eEsDPZQBD7ccNQBwsUc2bP8P2jTj7PW8/x7gWLMzLnIIgSJ2KdmFfp9zCz9sV 10 | 3TT9xDAKBggqhkjOPQQDAgNIADBFAiAkCfhbu64LA0QRfQjE1uwayehlvfhopJ9r 11 | ZcfSM11HMQIhANgy/JFKqkw4BxRsW2f7xVirh7s3FBkqaghnACYdZWQC 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@bctest.example.com/tls/tlsca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdKgAwIBAgIUP1xrG779Dy/ta2Dv1xscT73Xb84wCgYIKoZIzj0EAwIw 3 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MSEwHwYDVQQDDBh0bHNjYS5iY3Rl 5 | c3QuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBt 6 | MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFu 7 | MRgwFgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVz 8 | dC5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK9MO9U9dVCp 9 | d6bsBhrMIKagKYAZ6zmYNK86luMP98qn6gOfwmWJ0/sH2RsG6TslZ6TVgNUwpPp8 10 | yFRYGxfhJAijUDBOMB0GA1UdDgQWBBRt/a4SF47h6lkGPfGOwiOMcRsJIDAfBgNV 11 | HSMEGDAWgBRt/a4SF47h6lkGPfGOwiOMcRsJIDAMBgNVHRMEBTADAQH/MAoGCCqG 12 | SM49BAMCA0gAMEUCIQCpKG/AJEcrfil1x2Gm+am+QWrLXw7/QWCNv361Im+tJQIg 13 | A8U2WgJb+uOgPl2JUUdjXZxrwjQCytNaouLhEVejN8M= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/msp/admincerts/admin@onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB8zCCAZkCFQDyvq8l4OHIr+0/5onN3Nt9IZ3bfTAKBggqhkjOPQQDAjBxMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSEwHwYDVQQDDBhjYS5vbmxpbmVw 5 | YXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIwWjCB 6 | hTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50 8 | MSQwIgYDVQQDDBthZG1pbkBvbmxpbmVwYXkuZXhhbXBsZS5jb20wWTATBgcqhkjO 9 | PQIBBggqhkjOPQMBBwNCAAQXnEShfdbK0u+gPHTxDAh5dJAOFcfPkmFEHMhVwL8V 10 | HJmne4LfXMvKBe6/EcP/ZoJqhEqNcGH1+HfBwXFF7Sr0MAoGCCqGSM49BAMCA0gA 11 | MEUCIQCwp0r7Koc1zlst35FfPPPt8LVg7OqGt9UFJE54Pw9imQIgA+HDxipemsIy 12 | b59YS8TyBcwjngMqVgsGTkNLRZwoSJg= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/msp/cacerts/ca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdqgAwIBAgIUFOL/D2jeXe2hysrc1OsF3L4CqA4wCgYIKoZIzj0EAwIw 3 | cTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEhMB8GA1UEAwwYY2Eub25s 5 | aW5lcGF5LmV4YW1wbGUuY29tMB4XDTE5MDIxMDA1MDMyMFoXDTI5MDIwNzA1MDMy 6 | MFowcTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEhMB8GA1UEAwwYY2Eu 8 | b25saW5lcGF5LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 9tTQNxFbWus5ZmXt9UmmuTMG8WVfjFYSRIxsuaiV+OV/O/3R6p1J2SdWftS5/s9i 10 | WJ0HCbA1jUvqzJZHddXq36NQME4wHQYDVR0OBBYEFNyeu/e6CrVkxZcyctascYum 11 | Gz1eMB8GA1UdIwQYMBaAFNyeu/e6CrVkxZcyctascYumGz1eMAwGA1UdEwQFMAMB 12 | Af8wCgYIKoZIzj0EAwIDSQAwRgIhALqy5GI7I8tybFclidr/as+x1+JT4YboPd+1 13 | jvQuCmviAiEAuiUF/uUx974u+Zuxa6hhJl5rpFrz+3y+FW4VyrGo0cs= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/msp/keystore/admin@onlinepay.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgwaNyNDuTfE6Sdv8q 3 | oA+cRgu4kO13E/f2FlqEoHwFX0ihRANCAAQXnEShfdbK0u+gPHTxDAh5dJAOFcfP 4 | kmFEHMhVwL8VHJmne4LfXMvKBe6/EcP/ZoJqhEqNcGH1+HfBwXFF7Sr0 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/msp/signcerts/admin@onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB8zCCAZkCFQDyvq8l4OHIr+0/5onN3Nt9IZ3bfTAKBggqhkjOPQQDAjBxMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSEwHwYDVQQDDBhjYS5vbmxpbmVw 5 | YXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIwWjCB 6 | hTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50 8 | MSQwIgYDVQQDDBthZG1pbkBvbmxpbmVwYXkuZXhhbXBsZS5jb20wWTATBgcqhkjO 9 | PQIBBggqhkjOPQMBBwNCAAQXnEShfdbK0u+gPHTxDAh5dJAOFcfPkmFEHMhVwL8V 10 | HJmne4LfXMvKBe6/EcP/ZoJqhEqNcGH1+HfBwXFF7Sr0MAoGCCqGSM49BAMCA0gA 11 | MEUCIQCwp0r7Koc1zlst35FfPPPt8LVg7OqGt9UFJE54Pw9imQIgA+HDxipemsIy 12 | b59YS8TyBcwjngMqVgsGTkNLRZwoSJg= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/msp/tlscacerts/tlsca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeGgAwIBAgIVAN/YBfD8+1v6vhm+lLNFJPi2/QzFMAoGCCqGSM49BAMC 3 | MHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMMG3Rsc2Nh 5 | Lm9ubGluZXBheS5leGFtcGxlLmNvbTAeFw0xOTAyMTAwNTAzMjBaFw0yOTAyMDcw 6 | NTAzMjBaMHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UE 7 | BwwFWGkgQW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMM 8 | G3Rsc2NhLm9ubGluZXBheS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAWpiz+mlf/Y6x5hHk8CIfDzR310S/967gL64jvUzlsnyqI2v2/c0EoA 10 | YYsGprNtpWg2m99G9Lh1qE037QBynqGjUDBOMB0GA1UdDgQWBBTCTE86c7Zf3bip 11 | zhWSDtHTIdgqDDAfBgNVHSMEGDAWgBTCTE86c7Zf3bipzhWSDtHTIdgqDDAMBgNV 12 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0kAMEYCIQDwmQr96iB9/MkCg1DKZRnUUbRF 13 | h6SDPXTJx8cogj1SjwIhANXvJLQNyXkavj+gjC7b1Pzua0+wgPrlLvzSbRQXh4bg 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/tls/tls-admin@onlinepay.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgxxSSa0QtvJJjOyA7 3 | WpVetTIp+/HXOY5EisR/5f963zKhRANCAATb6qYlkXlTFevg5rEGIXtbMk8poKSI 4 | VSLbXei0Hd3Yg/8JMHF0NMIyppxNWKbGhmDEIzyDmqOT9ZCHpeD+Eipt 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/tls/tls-admin@onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB9zCCAZwCFQD8e63tOYX6/FmQ7e/syaNeEWzUyjAKBggqhkjOPQQDAjB0MQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSQwIgYDVQQDDBt0bHNjYS5vbmxp 5 | bmVwYXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIw 6 | WjCBhTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEPMA0GA1UECwwGY2xp 8 | ZW50MSQwIgYDVQQDDBthZG1pbkBvbmxpbmVwYXkuZXhhbXBsZS5jb20wWTATBgcq 9 | hkjOPQIBBggqhkjOPQMBBwNCAATb6qYlkXlTFevg5rEGIXtbMk8poKSIVSLbXei0 10 | Hd3Yg/8JMHF0NMIyppxNWKbGhmDEIzyDmqOT9ZCHpeD+EiptMAoGCCqGSM49BAMC 11 | A0kAMEYCIQCaPihyqC1V58Jw6tmMWop4E2K/oKl/QfctumS94BSVxAIhAP0keDvb 12 | GMcy//s3vQfV7aHmFlQ9V8YIeYkW3u9L6G9g 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@onlinepay.example.com/tls/tlsca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeGgAwIBAgIVAN/YBfD8+1v6vhm+lLNFJPi2/QzFMAoGCCqGSM49BAMC 3 | MHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMMG3Rsc2Nh 5 | Lm9ubGluZXBheS5leGFtcGxlLmNvbTAeFw0xOTAyMTAwNTAzMjBaFw0yOTAyMDcw 6 | NTAzMjBaMHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UE 7 | BwwFWGkgQW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMM 8 | G3Rsc2NhLm9ubGluZXBheS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAWpiz+mlf/Y6x5hHk8CIfDzR310S/967gL64jvUzlsnyqI2v2/c0EoA 10 | YYsGprNtpWg2m99G9Lh1qE037QBynqGjUDBOMB0GA1UdDgQWBBTCTE86c7Zf3bip 11 | zhWSDtHTIdgqDDAfBgNVHSMEGDAWgBTCTE86c7Zf3bipzhWSDtHTIdgqDDAMBgNV 12 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0kAMEYCIQDwmQr96iB9/MkCg1DKZRnUUbRF 13 | h6SDPXTJx8cogj1SjwIhANXvJLQNyXkavj+gjC7b1Pzua0+wgPrlLvzSbRQXh4bg 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/msp/admincerts/admin@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6zCCAZECFQCypybYrS5EH1VEFY8NRq7bfL3CvzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEfMB0GA1UEAwwWY2Euc2hhcmluZy5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDdaFw0yOTAxMzEwMDI5MDdaMIGBMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 7 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIwIAYD 8 | VQQDDBlhZG1pbkBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEhxEV2APhd0W2/x8cLnW3IzXGNmy5kGI9bq16QB3vrhO3rRLxikJk 10 | jBA1sCC8EPjEPVCB7O6XLuf/nEZr4AlW/jAKBggqhkjOPQQDAgNIADBFAiACU6kP 11 | uDQV7vu3Ork1n22b2g1OQmYgQ9HMnfxFQpRaJgIhAOI4ZLjc+SjgeeoICdSr3WKx 12 | 0kwDCJ3Zc6LYRCBFVydP 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/msp/cacerts/ca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAK1uvOzN2vvPUgNI0FIYDT3PQgrLMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgU2hhcmluZyBDb21wYW55MR8wHQYDVQQDDBZjYS5zaGFy 5 | aW5nLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1ow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxHzAdBgNVBAMMFmNhLnNoYXJp 8 | bmcuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARRDcucVpp/ 9 | IQZymjzyNRzw2hIhNfIUT9JnmwgpMifJDBK4KS0flgHyq6s2CLka9+Wagk+tVMqw 10 | whkKG/kBiF5Go1AwTjAdBgNVHQ4EFgQU/bvbGehbLAsATelIQd5fYuEQ0aAwHwYD 11 | VR0jBBgwFoAU/bvbGehbLAsATelIQd5fYuEQ0aAwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiEAgYXrvpYQPOGLOZeImCVmRb7PwoijivoJNyGnG8nOYUwC 13 | IG2EICn5SxeAwWrf4j5zcJk4b9l7vDTmvwqTmeoJrJe1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/msp/keystore/admin@sharing.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgfM37ZY6kT0CEQSEX 3 | PRp6BC+hllStGUQ9XuqV/7ihen2hRANCAASHERXYA+F3Rbb/HxwudbcjNcY2bLmQ 4 | Yj1urXpAHe+uE7etEvGKQmSMEDWwILwQ+MQ9UIHs7pcu5/+cRmvgCVb+ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/msp/signcerts/admin@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6zCCAZECFQCypybYrS5EH1VEFY8NRq7bfL3CvzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEfMB0GA1UEAwwWY2Euc2hhcmluZy5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDdaFw0yOTAxMzEwMDI5MDdaMIGBMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 7 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIwIAYD 8 | VQQDDBlhZG1pbkBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEhxEV2APhd0W2/x8cLnW3IzXGNmy5kGI9bq16QB3vrhO3rRLxikJk 10 | jBA1sCC8EPjEPVCB7O6XLuf/nEZr4AlW/jAKBggqhkjOPQQDAgNIADBFAiACU6kP 11 | uDQV7vu3Ork1n22b2g1OQmYgQ9HMnfxFQpRaJgIhAOI4ZLjc+SjgeeoICdSr3WKx 12 | 0kwDCJ3Zc6LYRCBFVydP 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/tls/tls-admin@sharing.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgVHDuNS5uZE6mbige 3 | ZIJR8SNDkjvxueU8+TsVbJ1DyeKhRANCAASVwL6HPa0wvOW/ZJB70bEneh5cUZdG 4 | 7j+vh+yZp+6pjnRzCMP77ecX/v1FwatYSHnCA5V91K9HRY4UVVVQ4blM 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/tls/tls-admin@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB7jCCAZMCFBRc8juNUOz3z/hVyofQHgLdv+4mMAoGCCqGSM49BAMCMHAxCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgU2hhcmluZyBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS5zaGFyaW5n 5 | LmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1owgYEx 6 | CzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4x 7 | GjAYBgNVBAoMEUEgU2hhcmluZyBDb21wYW55MQ8wDQYDVQQLDAZjbGllbnQxIjAg 8 | BgNVBAMMGWFkbWluQHNoYXJpbmcuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggq 9 | hkjOPQMBBwNCAASVwL6HPa0wvOW/ZJB70bEneh5cUZdG7j+vh+yZp+6pjnRzCMP7 10 | 7ecX/v1FwatYSHnCA5V91K9HRY4UVVVQ4blMMAoGCCqGSM49BAMCA0kAMEYCIQD6 11 | u4aXShvKeNCZ2Ec7aH3OlqSXYQa+8bBWFBNXUM6UqwIhAOT5FEECa8/mO6gKjDbM 12 | byxd+vWSnOhBG212C/8isFFK 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@sharing.example.com/tls/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/msp/admincerts/admin@vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6jCCAZACFEw6KOjnzqtDGcmu28eS+5Gvv75vMAoGCCqGSM49BAMCMG0xCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhpY2xlLmV4 5 | YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlowgYExCzAJ 6 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 7 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MQ8wDQYDVQQLDAZjbGllbnQxIjAgBgNV 8 | BAMMGWFkbWluQHZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjO 9 | PQMBBwNCAARpHAGZ8oN2uGzRzDfK1uFr2rq3FyRPRYvUaWI8fhM3h4MgbovgRDcV 10 | FK8zSUzzH2Eerw59cytEX5P78XjjhtJTMAoGCCqGSM49BAMCA0gAMEUCIGoLgAcM 11 | Dd4V3e8brGXEV6D9rdwDO/WxaTtkO4zLWO9dAiEAymTLgjrFHSjJp8lwsJv2y2ua 12 | WYzMRLXQ4dhp2WKUBws= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/msp/cacerts/ca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAOdvXd9Kzh11a9ts7aXjNZPBsR3TMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhp 5 | Y2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxHzAdBgNVBAMMFmNhLnZlaGlj 8 | bGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAShnfqU/Lh9 9 | fS+1S5rIeRRzQwSnJeKUOHJC0nJlbklB9LRJj66eiTOBqPw7WRIqJE3NvGLkjO1s 10 | Ju6BiQTyJQZ8o1AwTjAdBgNVHQ4EFgQUpQvjorf767dgp4GqfHs6XNksNrYwHwYD 11 | VR0jBBgwFoAUpQvjorf767dgp4GqfHs6XNksNrYwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiBdgsa7qlobmbksoTi3ovd47Kgfc6HsYaqQwzZssR27HQIh 13 | APUKT/DxOP6lyEzn5gp8Ux0Sob7QXRCGmW/qZOXgsSyk 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/msp/keystore/admin@vehicle.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg/1jjMHNrTJ6rfQft 3 | cEZCVpn01Di7IPr0v9zWEGxqnLOhRANCAARpHAGZ8oN2uGzRzDfK1uFr2rq3FyRP 4 | RYvUaWI8fhM3h4MgbovgRDcVFK8zSUzzH2Eerw59cytEX5P78XjjhtJT 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/msp/signcerts/admin@vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6jCCAZACFEw6KOjnzqtDGcmu28eS+5Gvv75vMAoGCCqGSM49BAMCMG0xCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhpY2xlLmV4 5 | YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlowgYExCzAJ 6 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 7 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MQ8wDQYDVQQLDAZjbGllbnQxIjAgBgNV 8 | BAMMGWFkbWluQHZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjO 9 | PQMBBwNCAARpHAGZ8oN2uGzRzDfK1uFr2rq3FyRPRYvUaWI8fhM3h4MgbovgRDcV 10 | FK8zSUzzH2Eerw59cytEX5P78XjjhtJTMAoGCCqGSM49BAMCA0gAMEUCIGoLgAcM 11 | Dd4V3e8brGXEV6D9rdwDO/WxaTtkO4zLWO9dAiEAymTLgjrFHSjJp8lwsJv2y2ua 12 | WYzMRLXQ4dhp2WKUBws= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/msp/tlscacerts/tlsca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdmgAwIBAgIVAM4qty3lbfTd/sdLhBsF48gY6o0qMAoGCCqGSM49BAMC 3 | MHAxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS52 5 | ZWhpY2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkw 6 | NlowcDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxIjAgBgNVBAMMGXRsc2Nh 8 | LnZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATQ 9 | KeEp9xKeFI2VmVaPvSlP5JMewlEe2zMQppg1FXwPxARJRahbvNixXZgeONM8xPGu 10 | 5PwfTHFAdoxolfOa7j6Ko1AwTjAdBgNVHQ4EFgQUGwP7HtTYWhCMrfPXKaWQdR0m 11 | XaAwHwYDVR0jBBgwFoAUGwP7HtTYWhCMrfPXKaWQdR0mXaAwDAYDVR0TBAUwAwEB 12 | /zAKBggqhkjOPQQDAgNHADBEAiAWpmVZRnXGVYeX8jrh/klY8afxxywslKXkN6hY 13 | EbLgyAIgVpzjBQSD2bWeJlmDb6hktEYPgqMe9yhPkLBInc1sEG0= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/tls/tls-admin@vehicle.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgREBXvCnoinxYoVKW 3 | SqSRIuuy6WS2/P3+jdPIVcH9oLOhRANCAAToo+qIu1+3ogW1kPIUqBbmkRzmaCnF 4 | IvVEhA/SueykUGLt5fTkBnFrLklUwmGLaotL3/HUPY4+xG21ApgNady+ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/tls/tls-admin@vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB7jCCAZMCFB8+79a2o7tV6N+s3t3yGk0ERLFfMAoGCCqGSM49BAMCMHAxCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS52ZWhpY2xl 5 | LmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlowgYEx 6 | CzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4x 7 | GjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MQ8wDQYDVQQLDAZjbGllbnQxIjAg 8 | BgNVBAMMGWFkbWluQHZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggq 9 | hkjOPQMBBwNCAAToo+qIu1+3ogW1kPIUqBbmkRzmaCnFIvVEhA/SueykUGLt5fTk 10 | BnFrLklUwmGLaotL3/HUPY4+xG21ApgNady+MAoGCCqGSM49BAMCA0kAMEYCIQDe 11 | AwmLE34rm7EJr4zUc/qBBVuZIz8GND2HwGt4az2n8AIhALRCREJq7WUBkvcMeQ02 12 | EXSRxDa5X29NFavAHivdLT+W 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/admin@vehicle.example.com/tls/tlsca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdmgAwIBAgIVAM4qty3lbfTd/sdLhBsF48gY6o0qMAoGCCqGSM49BAMC 3 | MHAxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS52 5 | ZWhpY2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkw 6 | NlowcDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxIjAgBgNVBAMMGXRsc2Nh 8 | LnZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATQ 9 | KeEp9xKeFI2VmVaPvSlP5JMewlEe2zMQppg1FXwPxARJRahbvNixXZgeONM8xPGu 10 | 5PwfTHFAdoxolfOa7j6Ko1AwTjAdBgNVHQ4EFgQUGwP7HtTYWhCMrfPXKaWQdR0m 11 | XaAwHwYDVR0jBBgwFoAUGwP7HtTYWhCMrfPXKaWQdR0mXaAwDAYDVR0TBAUwAwEB 12 | /zAKBggqhkjOPQQDAgNHADBEAiAWpmVZRnXGVYeX8jrh/klY8afxxywslKXkN6hY 13 | EbLgyAIgVpzjBQSD2bWeJlmDb6hktEYPgqMe9yhPkLBInc1sEG0= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/admincerts/alice@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6jCCAZECFQD50rVIr+hWKj4l7bRHJd+4lF6vpzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEfMB0GA1UEAwwWY2Euc2hhcmluZy5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMTAwMjIwNTFaFw0yOTAyMDcwMjIwNTFaMIGBMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 7 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIwIAYD 8 | VQQDDBlhbGljZUBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEToJcCekRDYt5soLH1v1RJxK3QTqemK+fJGPd5PeGmRIPEHUTpYty 10 | wvLMKqoinSF8N7qxZrpggRkHB+owoiE5jzAKBggqhkjOPQQDAgNHADBEAiA2rwBj 11 | 9RdO3c2Fsr/Hr4OtI/7AiQgNqo8mq2bxi3+H1gIgEUnI5RFmkitGntZHSZy5/yof 12 | 3mlEpx2mPpJxM/7o22s= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/cacerts/ca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAK1uvOzN2vvPUgNI0FIYDT3PQgrLMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgU2hhcmluZyBDb21wYW55MR8wHQYDVQQDDBZjYS5zaGFy 5 | aW5nLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1ow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxHzAdBgNVBAMMFmNhLnNoYXJp 8 | bmcuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARRDcucVpp/ 9 | IQZymjzyNRzw2hIhNfIUT9JnmwgpMifJDBK4KS0flgHyq6s2CLka9+Wagk+tVMqw 10 | whkKG/kBiF5Go1AwTjAdBgNVHQ4EFgQU/bvbGehbLAsATelIQd5fYuEQ0aAwHwYD 11 | VR0jBBgwFoAU/bvbGehbLAsATelIQd5fYuEQ0aAwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiEAgYXrvpYQPOGLOZeImCVmRb7PwoijivoJNyGnG8nOYUwC 13 | IG2EICn5SxeAwWrf4j5zcJk4b9l7vDTmvwqTmeoJrJe1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/keystore/alice@sharing.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgaVS2yS+UjDEcobjx 3 | WR/F7/2SUvZeCruME724km4t1SyhRANCAAROglwJ6RENi3mygsfW/VEnErdBOp6Y 4 | r58kY93k94aZEg8QdROli3LC8swqqiKdIXw3urFmumCBGQcH6jCiITmP 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/signcerts/alice@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6jCCAZECFQD50rVIr+hWKj4l7bRHJd+4lF6vpzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEfMB0GA1UEAwwWY2Euc2hhcmluZy5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMTAwMjIwNTFaFw0yOTAyMDcwMjIwNTFaMIGBMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 7 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIwIAYD 8 | VQQDDBlhbGljZUBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEToJcCekRDYt5soLH1v1RJxK3QTqemK+fJGPd5PeGmRIPEHUTpYty 10 | wvLMKqoinSF8N7qxZrpggRkHB+owoiE5jzAKBggqhkjOPQQDAgNHADBEAiA2rwBj 11 | 9RdO3c2Fsr/Hr4OtI/7AiQgNqo8mq2bxi3+H1gIgEUnI5RFmkitGntZHSZy5/yof 12 | 3mlEpx2mPpJxM/7o22s= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/tls/tls-alice@sharing.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgwTpA2eDI6z9Bg95r 3 | Gw5HBRvqhmaE1oRXKMQ9OOaDLfOhRANCAAQpsa19ggHsimM2FkorlNlaMopPo+nN 4 | Ug7S4sfZvlbWudhasDDulr7fbz7luf8MFt+G6MjWNidsQUnPTzVIqXz1 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/tls/tls-alice@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB7jCCAZQCFQCu6ZtM30S8/LLopCzmPvGL8LKmTDAKBggqhkjOPQQDAjBwMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Euc2hhcmlu 5 | Zy5leGFtcGxlLmNvbTAeFw0xOTAyMTAwMjIwNTFaFw0yOTAyMDcwMjIwNTFaMIGB 6 | MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFu 7 | MRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIw 8 | IAYDVQQDDBlhbGljZUBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI 9 | KoZIzj0DAQcDQgAEKbGtfYIB7IpjNhZKK5TZWjKKT6PpzVIO0uLH2b5W1rnYWrAw 10 | 7pa+328+5bn/DBbfhujI1jYnbEFJz081SKl89TAKBggqhkjOPQQDAgNIADBFAiEA 11 | 737cGhdVI/+mafJ/CTddAfSufdPtXr8SWS5JYWI8rCICID5LZVkOjhqdc6VJt+dB 12 | Gdn/5/ZaxcLJVb5qrxWMYE3R 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/localmsp/alice@sharing.example.com/tls/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/orderer.bctest.example.com/msp/admincerts/admin@bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB0jCCAXkCFQD4Rp8JI6iszdQFXROug+183nHeNjAKBggqhkjOPQQDAjBqMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 5 | cGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG0xCzAJBgNV 6 | BAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAWBgNV 7 | BAoMD0Jsb2NrY2hhaW4gVGVzdDEhMB8GA1UEAwwYYWRtaW5AYmN0ZXN0LmV4YW1w 8 | bGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEU+KZ0QN6gaeTb5XfQ3aT 9 | TbeVBhxEMz4cN29igVbxy8J9SZvz/2YmDN/wXdFn/6TFqre6+fWF2UFzGR+Ox8bu 10 | LDAKBggqhkjOPQQDAgNHADBEAiAsrceRQ5u9DFG5+X6QpwWe66qpbpWQCHg2Xsxl 11 | aVgdbgIgPepcfIWl8nxXXwCLzpgBmmQvDWTYZBBj+eXAVN6NF0E= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/orderer.bctest.example.com/msp/cacerts/ca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICJjCCAcygAwIBAgIUG77Gr/0s+Q0XK5t1FhPQxl77RY8wCgYIKoZIzj0EAwIw 3 | ajELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MR4wHAYDVQQDDBVjYS5iY3Rlc3Qu 5 | ZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBqMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 7 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABA7WF+cMckSaCVxCU+8P 9 | lhi79vVVd3kaObcdxG33zAEKcolJBdfSL3HvpsMg36QdMsnIoi5nuoRwA8dTZuzI 10 | s6WjUDBOMB0GA1UdDgQWBBT6Mmy5v2BJ6lGBSdUgaS1s7sXNfDAfBgNVHSMEGDAW 11 | gBT6Mmy5v2BJ6lGBSdUgaS1s7sXNfDAMBgNVHRMEBTADAQH/MAoGCCqGSM49BAMC 12 | A0gAMEUCIQD+aA79p0PuaOHNJPyrxkYSvHuLr+V5fEram37UZE0GaQIgL2kItYK7 13 | 2AmD2mox6BUeQek/us3x74qc3Qcq+oKH+IA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdKgAwIBAgIUP1xrG779Dy/ta2Dv1xscT73Xb84wCgYIKoZIzj0EAwIw 3 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MSEwHwYDVQQDDBh0bHNjYS5iY3Rl 5 | c3QuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBt 6 | MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFu 7 | MRgwFgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVz 8 | dC5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK9MO9U9dVCp 9 | d6bsBhrMIKagKYAZ6zmYNK86luMP98qn6gOfwmWJ0/sH2RsG6TslZ6TVgNUwpPp8 10 | yFRYGxfhJAijUDBOMB0GA1UdDgQWBBRt/a4SF47h6lkGPfGOwiOMcRsJIDAfBgNV 11 | HSMEGDAWgBRt/a4SF47h6lkGPfGOwiOMcRsJIDAMBgNVHRMEBTADAQH/MAoGCCqG 12 | SM49BAMCA0gAMEUCIQCpKG/AJEcrfil1x2Gm+am+QWrLXw7/QWCNv361Im+tJQIg 13 | A8U2WgJb+uOgPl2JUUdjXZxrwjQCytNaouLhEVejN8M= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.onlinepay.example.com/msp/admincerts/admin@onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB8zCCAZkCFQDyvq8l4OHIr+0/5onN3Nt9IZ3bfTAKBggqhkjOPQQDAjBxMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSEwHwYDVQQDDBhjYS5vbmxpbmVw 5 | YXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIwWjCB 6 | hTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50 8 | MSQwIgYDVQQDDBthZG1pbkBvbmxpbmVwYXkuZXhhbXBsZS5jb20wWTATBgcqhkjO 9 | PQIBBggqhkjOPQMBBwNCAAQXnEShfdbK0u+gPHTxDAh5dJAOFcfPkmFEHMhVwL8V 10 | HJmne4LfXMvKBe6/EcP/ZoJqhEqNcGH1+HfBwXFF7Sr0MAoGCCqGSM49BAMCA0gA 11 | MEUCIQCwp0r7Koc1zlst35FfPPPt8LVg7OqGt9UFJE54Pw9imQIgA+HDxipemsIy 12 | b59YS8TyBcwjngMqVgsGTkNLRZwoSJg= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.onlinepay.example.com/msp/cacerts/ca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdqgAwIBAgIUFOL/D2jeXe2hysrc1OsF3L4CqA4wCgYIKoZIzj0EAwIw 3 | cTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEhMB8GA1UEAwwYY2Eub25s 5 | aW5lcGF5LmV4YW1wbGUuY29tMB4XDTE5MDIxMDA1MDMyMFoXDTI5MDIwNzA1MDMy 6 | MFowcTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEhMB8GA1UEAwwYY2Eu 8 | b25saW5lcGF5LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 9tTQNxFbWus5ZmXt9UmmuTMG8WVfjFYSRIxsuaiV+OV/O/3R6p1J2SdWftS5/s9i 10 | WJ0HCbA1jUvqzJZHddXq36NQME4wHQYDVR0OBBYEFNyeu/e6CrVkxZcyctascYum 11 | Gz1eMB8GA1UdIwQYMBaAFNyeu/e6CrVkxZcyctascYumGz1eMAwGA1UdEwQFMAMB 12 | Af8wCgYIKoZIzj0EAwIDSQAwRgIhALqy5GI7I8tybFclidr/as+x1+JT4YboPd+1 13 | jvQuCmviAiEAuiUF/uUx974u+Zuxa6hhJl5rpFrz+3y+FW4VyrGo0cs= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.onlinepay.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.onlinepay.example.com.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.onlinepay.example.com.pem 8 | OrganizationalUnitIdentifier: peer 9 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.onlinepay.example.com/msp/tlscacerts/tlsca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeGgAwIBAgIVAN/YBfD8+1v6vhm+lLNFJPi2/QzFMAoGCCqGSM49BAMC 3 | MHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMMG3Rsc2Nh 5 | Lm9ubGluZXBheS5leGFtcGxlLmNvbTAeFw0xOTAyMTAwNTAzMjBaFw0yOTAyMDcw 6 | NTAzMjBaMHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UE 7 | BwwFWGkgQW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMM 8 | G3Rsc2NhLm9ubGluZXBheS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAWpiz+mlf/Y6x5hHk8CIfDzR310S/967gL64jvUzlsnyqI2v2/c0EoA 10 | YYsGprNtpWg2m99G9Lh1qE037QBynqGjUDBOMB0GA1UdDgQWBBTCTE86c7Zf3bip 11 | zhWSDtHTIdgqDDAfBgNVHSMEGDAWgBTCTE86c7Zf3bipzhWSDtHTIdgqDDAMBgNV 12 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0kAMEYCIQDwmQr96iB9/MkCg1DKZRnUUbRF 13 | h6SDPXTJx8cogj1SjwIhANXvJLQNyXkavj+gjC7b1Pzua0+wgPrlLvzSbRQXh4bg 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.sharing.example.com/msp/admincerts/admin@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6zCCAZECFQCypybYrS5EH1VEFY8NRq7bfL3CvzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEfMB0GA1UEAwwWY2Euc2hhcmluZy5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDdaFw0yOTAxMzEwMDI5MDdaMIGBMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 7 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIwIAYD 8 | VQQDDBlhZG1pbkBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEhxEV2APhd0W2/x8cLnW3IzXGNmy5kGI9bq16QB3vrhO3rRLxikJk 10 | jBA1sCC8EPjEPVCB7O6XLuf/nEZr4AlW/jAKBggqhkjOPQQDAgNIADBFAiACU6kP 11 | uDQV7vu3Ork1n22b2g1OQmYgQ9HMnfxFQpRaJgIhAOI4ZLjc+SjgeeoICdSr3WKx 12 | 0kwDCJ3Zc6LYRCBFVydP 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.sharing.example.com/msp/cacerts/ca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAK1uvOzN2vvPUgNI0FIYDT3PQgrLMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgU2hhcmluZyBDb21wYW55MR8wHQYDVQQDDBZjYS5zaGFy 5 | aW5nLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1ow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxHzAdBgNVBAMMFmNhLnNoYXJp 8 | bmcuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARRDcucVpp/ 9 | IQZymjzyNRzw2hIhNfIUT9JnmwgpMifJDBK4KS0flgHyq6s2CLka9+Wagk+tVMqw 10 | whkKG/kBiF5Go1AwTjAdBgNVHQ4EFgQU/bvbGehbLAsATelIQd5fYuEQ0aAwHwYD 11 | VR0jBBgwFoAU/bvbGehbLAsATelIQd5fYuEQ0aAwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiEAgYXrvpYQPOGLOZeImCVmRb7PwoijivoJNyGnG8nOYUwC 13 | IG2EICn5SxeAwWrf4j5zcJk4b9l7vDTmvwqTmeoJrJe1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.sharing.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.sharing.example.com.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.sharing.example.com.pem 8 | OrganizationalUnitIdentifier: peer 9 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.vehicle.example.com/msp/admincerts/admin@vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6jCCAZACFEw6KOjnzqtDGcmu28eS+5Gvv75vMAoGCCqGSM49BAMCMG0xCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhpY2xlLmV4 5 | YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlowgYExCzAJ 6 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 7 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MQ8wDQYDVQQLDAZjbGllbnQxIjAgBgNV 8 | BAMMGWFkbWluQHZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjO 9 | PQMBBwNCAARpHAGZ8oN2uGzRzDfK1uFr2rq3FyRPRYvUaWI8fhM3h4MgbovgRDcV 10 | FK8zSUzzH2Eerw59cytEX5P78XjjhtJTMAoGCCqGSM49BAMCA0gAMEUCIGoLgAcM 11 | Dd4V3e8brGXEV6D9rdwDO/WxaTtkO4zLWO9dAiEAymTLgjrFHSjJp8lwsJv2y2ua 12 | WYzMRLXQ4dhp2WKUBws= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.vehicle.example.com/msp/cacerts/ca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAOdvXd9Kzh11a9ts7aXjNZPBsR3TMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhp 5 | Y2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxHzAdBgNVBAMMFmNhLnZlaGlj 8 | bGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAShnfqU/Lh9 9 | fS+1S5rIeRRzQwSnJeKUOHJC0nJlbklB9LRJj66eiTOBqPw7WRIqJE3NvGLkjO1s 10 | Ju6BiQTyJQZ8o1AwTjAdBgNVHQ4EFgQUpQvjorf767dgp4GqfHs6XNksNrYwHwYD 11 | VR0jBBgwFoAUpQvjorf767dgp4GqfHs6XNksNrYwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiBdgsa7qlobmbksoTi3ovd47Kgfc6HsYaqQwzZssR27HQIh 13 | APUKT/DxOP6lyEzn5gp8Ux0Sob7QXRCGmW/qZOXgsSyk 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.vehicle.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.vehicle.example.com.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.vehicle.example.com.pem 8 | OrganizationalUnitIdentifier: peer 9 | -------------------------------------------------------------------------------- /deployed/client/mymsp/orgmsp/peer0.vehicle.example.com/msp/tlscacerts/tlsca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdmgAwIBAgIVAM4qty3lbfTd/sdLhBsF48gY6o0qMAoGCCqGSM49BAMC 3 | MHAxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS52 5 | ZWhpY2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkw 6 | NlowcDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxIjAgBgNVBAMMGXRsc2Nh 8 | LnZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATQ 9 | KeEp9xKeFI2VmVaPvSlP5JMewlEe2zMQppg1FXwPxARJRahbvNixXZgeONM8xPGu 10 | 5PwfTHFAdoxolfOa7j6Ko1AwTjAdBgNVHQ4EFgQUGwP7HtTYWhCMrfPXKaWQdR0m 11 | XaAwHwYDVR0jBBgwFoAUGwP7HtTYWhCMrfPXKaWQdR0mXaAwDAYDVR0TBAUwAwEB 12 | /zAKBggqhkjOPQQDAgNHADBEAiAWpmVZRnXGVYeX8jrh/klY8afxxywslKXkN6hY 13 | EbLgyAIgVpzjBQSD2bWeJlmDb6hktEYPgqMe9yhPkLBInc1sEG0= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/client/utils/setparas.sh: -------------------------------------------------------------------------------- 1 | # This is to be used in cli container, to connect peer and execute peer commands. 2 | # This is only for example of the vehiclesharing channel, and there are many assumptions. 3 | 4 | export CLI_TIMEOUT=10 5 | export CLI_DELAY=3 6 | 7 | export CRYPTO_PATH="/etc/hyperledger/fabric" 8 | export CHANNEL_NAME="vschannel" 9 | 10 | # To export the environment variables for orderer. It is identical for all commands, in this case. 11 | export ORDERER_CA="${CRYPTO_PATH}/orgmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem" 12 | export ORDERER_ADDRESS="orderer.bctest.example.com:7050" 13 | 14 | # To export the environment variables for admin@bctest.example.com. 15 | envAdminBctest() { 16 | export CORE_PEER_LOCALMSPID="OrdererMSP" 17 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem" 18 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@bctest.example.com/msp" 19 | } 20 | 21 | # To export the environment variables for admin@onlinepay.example.com. 22 | envAdminOnlinePay() { 23 | export CORE_PEER_LOCALMSPID="OnlinePayMSP" 24 | export CORE_PEER_ADDRESS="peer0.onlinepay.example.com:7051" 25 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/peer0.onlinepay.example.com/msp/tlscacerts/tlsca.onlinepay.example.com.pem" 26 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@onlinepay.example.com/msp" 27 | } 28 | 29 | # To export the environment variables for admin@sharing.example.com. 30 | envAdminSharing() { 31 | export CORE_PEER_LOCALMSPID="SharingMSP" 32 | export CORE_PEER_ADDRESS="peer0.sharing.example.com:7051" 33 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/peer0.sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem" 34 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@sharing.example.com/msp" 35 | } 36 | 37 | # To export the environment variables for admin@vehicle.example.com. 38 | envAdminVehicle() { 39 | export CORE_PEER_LOCALMSPID="VehicleMSP" 40 | export CORE_PEER_ADDRESS="peer0.vehicle.example.com:7051" 41 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/peer0.vehicle.example.com/msp/tlscacerts/tlsca.vehicle.example.com.pem" 42 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@vehicle.example.com/msp" 43 | } 44 | 45 | opt=$1 46 | 47 | if [ "${opt}" == "adminBctest" ]; then 48 | envAdminBctest 49 | elif [ "${opt}" == "adminOnlinePay" ]; then 50 | envAdminOnlinePay 51 | elif [ "${opt}" == "adminSharing" ]; then 52 | envAdminSharing 53 | elif [ "${opt}" == "adminVehicle" ]; then 54 | envAdminVehicle 55 | else 56 | echo "Please specify the identity." 57 | fi 58 | 59 | # env | grep CORE_PEER -------------------------------------------------------------------------------- /deployed/orderer/channel-artifacts/vehiclesharing_genesis.block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomxucnxa/vehiclesharing/5e26fa6d2ad7198cfc6def52c9796423c3d05ffa/deployed/orderer/channel-artifacts/vehiclesharing_genesis.block -------------------------------------------------------------------------------- /deployed/orderer/docker-compose-prod-orderer.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-orderer.bctest.example.com: 10 | 11 | services: 12 | orderer.bctest.example.com: 13 | container_name: orderer.bctest.example.com 14 | image: hyperledger/fabric-orderer:latest 15 | environment: 16 | - FABRIC_LOGGING_SPEC=DEBUG 17 | - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 18 | - ORDERER_GENERAL_GENESISMETHOD=file 19 | - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/vehiclesharing_genesis.block 20 | - ORDERER_GENERAL_LOCALMSPID=OrdererMSP 21 | - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/localmsp/orderer.bctest.example.com/msp 22 | - ORDERER_GENERAL_TLS_ENABLED=true 23 | - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/localmsp/orderer.bctest.example.com/tls/tls-orderer.bctest.example.com.key 24 | - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/localmsp/orderer.bctest.example.com/tls/tls-orderer.bctest.example.com.pem 25 | - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/localmsp/orderer.bctest.example.com/tls/tlsca.bctest.example.com.pem] 26 | - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1 27 | - ORDERER_KAFKA_VERBOSE=true 28 | volumes: 29 | - /bin/ping:/bin/ping 30 | - /usr/bin/telnet:/usr/bin/telnet 31 | - ./channel-artifacts/vehiclesharing_genesis.block:/var/hyperledger/orderer/vehiclesharing_genesis.block 32 | - ./mymsp/localmsp/orderer.bctest.example.com/msp:/var/hyperledger/localmsp/orderer.bctest.example.com/msp 33 | - ./mymsp/localmsp/orderer.bctest.example.com/tls:/var/hyperledger/localmsp/orderer.bctest.example.com/tls 34 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 35 | command: orderer 36 | network_mode: "host" 37 | ports: 38 | - 7050:7050 39 | 40 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/msp/admincerts/admin@bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB0jCCAXkCFQD4Rp8JI6iszdQFXROug+183nHeNjAKBggqhkjOPQQDAjBqMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 5 | cGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG0xCzAJBgNV 6 | BAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAWBgNV 7 | BAoMD0Jsb2NrY2hhaW4gVGVzdDEhMB8GA1UEAwwYYWRtaW5AYmN0ZXN0LmV4YW1w 8 | bGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEU+KZ0QN6gaeTb5XfQ3aT 9 | TbeVBhxEMz4cN29igVbxy8J9SZvz/2YmDN/wXdFn/6TFqre6+fWF2UFzGR+Ox8bu 10 | LDAKBggqhkjOPQQDAgNHADBEAiAsrceRQ5u9DFG5+X6QpwWe66qpbpWQCHg2Xsxl 11 | aVgdbgIgPepcfIWl8nxXXwCLzpgBmmQvDWTYZBBj+eXAVN6NF0E= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/msp/cacerts/ca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICJjCCAcygAwIBAgIUG77Gr/0s+Q0XK5t1FhPQxl77RY8wCgYIKoZIzj0EAwIw 3 | ajELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MR4wHAYDVQQDDBVjYS5iY3Rlc3Qu 5 | ZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBqMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 7 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABA7WF+cMckSaCVxCU+8P 9 | lhi79vVVd3kaObcdxG33zAEKcolJBdfSL3HvpsMg36QdMsnIoi5nuoRwA8dTZuzI 10 | s6WjUDBOMB0GA1UdDgQWBBT6Mmy5v2BJ6lGBSdUgaS1s7sXNfDAfBgNVHSMEGDAW 11 | gBT6Mmy5v2BJ6lGBSdUgaS1s7sXNfDAMBgNVHRMEBTADAQH/MAoGCCqGSM49BAMC 12 | A0gAMEUCIQD+aA79p0PuaOHNJPyrxkYSvHuLr+V5fEram37UZE0GaQIgL2kItYK7 13 | 2AmD2mox6BUeQek/us3x74qc3Qcq+oKH+IA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/msp/keystore/orderer.bctest.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgJpyJiBT2+JyWRm5P 3 | dRKE3aL+LmQ7DAWoC6y0AcxHgeKhRANCAATGkOTm76sGADFnUXUl+uRYkLEFngFT 4 | Jnq1mn0JfZ4Z6NV3e1m+3KCWSOH9RRMyrePgRbTsuFIArEmMUSGaKeDv 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/msp/signcerts/orderer.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB1DCCAXsCFQCuBPr+zPo717IxzGO4rQsKtnBIwDAKBggqhkjOPQQDAjBqMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxHjAcBgNVBAMMFWNhLmJjdGVzdC5leGFt 5 | cGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG8xCzAJBgNV 6 | BAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAWBgNV 7 | BAoMD0Jsb2NrY2hhaW4gVGVzdDEjMCEGA1UEAwwab3JkZXJlci5iY3Rlc3QuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATGkOTm76sGADFnUXUl 9 | +uRYkLEFngFTJnq1mn0JfZ4Z6NV3e1m+3KCWSOH9RRMyrePgRbTsuFIArEmMUSGa 10 | KeDvMAoGCCqGSM49BAMCA0cAMEQCIDv0VUYEsNDhg+GmpRx4JzvBSP6KRxsHRUmX 11 | 2/RcApVlAiAGGGNBxHF+LHcpLY4LSkWD7+kp6gpwGR1x136CqgnA0Q== 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdKgAwIBAgIUP1xrG779Dy/ta2Dv1xscT73Xb84wCgYIKoZIzj0EAwIw 3 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MSEwHwYDVQQDDBh0bHNjYS5iY3Rl 5 | c3QuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBt 6 | MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFu 7 | MRgwFgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVz 8 | dC5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK9MO9U9dVCp 9 | d6bsBhrMIKagKYAZ6zmYNK86luMP98qn6gOfwmWJ0/sH2RsG6TslZ6TVgNUwpPp8 10 | yFRYGxfhJAijUDBOMB0GA1UdDgQWBBRt/a4SF47h6lkGPfGOwiOMcRsJIDAfBgNV 11 | HSMEGDAWgBRt/a4SF47h6lkGPfGOwiOMcRsJIDAMBgNVHRMEBTADAQH/MAoGCCqG 12 | SM49BAMCA0gAMEUCIQCpKG/AJEcrfil1x2Gm+am+QWrLXw7/QWCNv361Im+tJQIg 13 | A8U2WgJb+uOgPl2JUUdjXZxrwjQCytNaouLhEVejN8M= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/tls/tls-orderer.bctest.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgnkOJqQ90ZHBEP14a 3 | h2OyO8x9TJ2lHLkc89LiDe3Ro96hRANCAATdbMDN/rqzm8iaIQldMzWXHwy9Q0A3 4 | 2Mr6RFxHNB/EVgfeahq+WkDp+k3jAl1oNat+9ZMyeR3p8M1pp8nxwA0/ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/tls/tls-orderer.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB2TCCAX4CFQCUAb13TIDuwMervdekHa+bqAzxPzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRgw 4 | FgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVzdC5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDZaFw0yOTAxMzEwMDI5MDZaMG8xCzAJ 6 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGDAW 7 | BgNVBAoMD0Jsb2NrY2hhaW4gVGVzdDEjMCEGA1UEAwwab3JkZXJlci5iY3Rlc3Qu 8 | ZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATdbMDN/rqzm8ia 9 | IQldMzWXHwy9Q0A32Mr6RFxHNB/EVgfeahq+WkDp+k3jAl1oNat+9ZMyeR3p8M1p 10 | p8nxwA0/MAoGCCqGSM49BAMCA0kAMEYCIQD0Lcsz96G58BZ6beNEo7Y2w+x+Px1R 11 | GuVOPgW84UmILwIhAL462XU1DS6BiWLGR+Cy7eXK3I+YMGdw36yEgpDcL4+T 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /deployed/orderer/mymsp/localmsp/orderer.bctest.example.com/tls/tlsca.bctest.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdKgAwIBAgIUP1xrG779Dy/ta2Dv1xscT73Xb84wCgYIKoZIzj0EAwIw 3 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEYMBYGA1UECgwPQmxvY2tjaGFpbiBUZXN0MSEwHwYDVQQDDBh0bHNjYS5iY3Rl 5 | c3QuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA2WhcNMjkwMTMxMDAyOTA2WjBt 6 | MQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFu 7 | MRgwFgYDVQQKDA9CbG9ja2NoYWluIFRlc3QxITAfBgNVBAMMGHRsc2NhLmJjdGVz 8 | dC5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK9MO9U9dVCp 9 | d6bsBhrMIKagKYAZ6zmYNK86luMP98qn6gOfwmWJ0/sH2RsG6TslZ6TVgNUwpPp8 10 | yFRYGxfhJAijUDBOMB0GA1UdDgQWBBRt/a4SF47h6lkGPfGOwiOMcRsJIDAfBgNV 11 | HSMEGDAWgBRt/a4SF47h6lkGPfGOwiOMcRsJIDAMBgNVHRMEBTADAQH/MAoGCCqG 12 | SM49BAMCA0gAMEUCIQCpKG/AJEcrfil1x2Gm+am+QWrLXw7/QWCNv361Im+tJQIg 13 | A8U2WgJb+uOgPl2JUUdjXZxrwjQCytNaouLhEVejN8M= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/docker-compose-prod-peer0-onlinepay.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-peer0.onlinepay.example.com: 10 | 11 | services: 12 | couchdb_peer0_onlinepay: 13 | container_name: couchdb_peer0_onlinepay 14 | image: hyperledger/fabric-couchdb 15 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 16 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 17 | environment: 18 | - COUCHDB_USER= 19 | - COUCHDB_PASSWORD= 20 | # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 21 | # for example map it to utilize Fauxton User Interface in dev environments. 22 | network_mode: "host" 23 | ports: 24 | - "5984:5984" 25 | 26 | peer0.onlinepay.example.com: 27 | container_name: peer0.onlinepay.example.com 28 | image: hyperledger/fabric-peer:latest 29 | environment: 30 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 31 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host 32 | - FABRIC_LOGGING_SPEC=INFO 33 | - CORE_PEER_TLS_ENABLED=true 34 | - CORE_PEER_GOSSIP_USELEADERELECTION=true 35 | - CORE_PEER_GOSSIP_ORGLEADER=false 36 | - CORE_PEER_PROFILE_ENABLED=true 37 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.onlinepay.example.com.pem 38 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.onlinepay.example.com.key 39 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.onlinepay.example.com.pem 40 | - CORE_PEER_ID=peer0.onlinepay.example.com 41 | - CORE_PEER_ADDRESS=peer0.onlinepay.example.com:7051 42 | # - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 43 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.onlinepay.example.com:7051 44 | - CORE_PEER_LOCALMSPID=OnlinePayMSP 45 | # Below for CouchDB 46 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 47 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984 48 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 49 | # provide the credentials for ledger to connect to CouchDB. The username and password must 50 | # match the username and password set for the associated CouchDB. 51 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 52 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 53 | volumes: 54 | - /var/run/:/host/var/run/ 55 | - /bin/ping:/bin/ping 56 | - /usr/bin/telnet:/usr/bin/telnet 57 | # The msp folder is requied 58 | - ./mymsp/localmsp/peer0.onlinepay.example.com/msp:/etc/hyperledger/fabric/msp 59 | - ./mymsp/localmsp/peer0.onlinepay.example.com/tls:/etc/hyperledger/fabric/tls 60 | - prod-peer0.onlinepay.example.com:/var/hyperledger/production 61 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 62 | command: peer node start 63 | network_mode: "host" 64 | ports: 65 | - 7051:7051 66 | - 7053:7053 67 | depends_on: 68 | - couchdb_peer0_onlinepay 69 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/msp/admincerts/admin@onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB8zCCAZkCFQDyvq8l4OHIr+0/5onN3Nt9IZ3bfTAKBggqhkjOPQQDAjBxMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSEwHwYDVQQDDBhjYS5vbmxpbmVw 5 | YXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIwWjCB 6 | hTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50 8 | MSQwIgYDVQQDDBthZG1pbkBvbmxpbmVwYXkuZXhhbXBsZS5jb20wWTATBgcqhkjO 9 | PQIBBggqhkjOPQMBBwNCAAQXnEShfdbK0u+gPHTxDAh5dJAOFcfPkmFEHMhVwL8V 10 | HJmne4LfXMvKBe6/EcP/ZoJqhEqNcGH1+HfBwXFF7Sr0MAoGCCqGSM49BAMCA0gA 11 | MEUCIQCwp0r7Koc1zlst35FfPPPt8LVg7OqGt9UFJE54Pw9imQIgA+HDxipemsIy 12 | b59YS8TyBcwjngMqVgsGTkNLRZwoSJg= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/msp/cacerts/ca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdqgAwIBAgIUFOL/D2jeXe2hysrc1OsF3L4CqA4wCgYIKoZIzj0EAwIw 3 | cTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEhMB8GA1UEAwwYY2Eub25s 5 | aW5lcGF5LmV4YW1wbGUuY29tMB4XDTE5MDIxMDA1MDMyMFoXDTI5MDIwNzA1MDMy 6 | MFowcTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTEhMB8GA1UEAwwYY2Eu 8 | b25saW5lcGF5LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 9tTQNxFbWus5ZmXt9UmmuTMG8WVfjFYSRIxsuaiV+OV/O/3R6p1J2SdWftS5/s9i 10 | WJ0HCbA1jUvqzJZHddXq36NQME4wHQYDVR0OBBYEFNyeu/e6CrVkxZcyctascYum 11 | Gz1eMB8GA1UdIwQYMBaAFNyeu/e6CrVkxZcyctascYumGz1eMAwGA1UdEwQFMAMB 12 | Af8wCgYIKoZIzj0EAwIDSQAwRgIhALqy5GI7I8tybFclidr/as+x1+JT4YboPd+1 13 | jvQuCmviAiEAuiUF/uUx974u+Zuxa6hhJl5rpFrz+3y+FW4VyrGo0cs= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.onlinepay.example.com.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.onlinepay.example.com.pem 8 | OrganizationalUnitIdentifier: peer 9 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/msp/keystore/peer0.onlinepay.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgNBkKSYDewdc1YbaM 3 | f8/qedW6tsntfVRRWf7E9bKBq/2hRANCAARZER3WKgV+pQ9In9JBu17gIIZGKUw+ 4 | BH+ZE/mMb8ICv4o4InXBN3vQdAFOgElkm8Y8jMJGzCQKLIVz3B1az6ee 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/msp/signcerts/peer0.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB8DCCAZcCFQCW/NTyjf19v9Ibcbx/xZfiLSbv6DAKBggqhkjOPQQDAjBxMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSEwHwYDVQQDDBhjYS5vbmxpbmVw 5 | YXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIwWjCB 6 | gzELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTENMAsGA1UECwwEcGVlcjEk 8 | MCIGA1UEAwwbcGVlcjAub25saW5lcGF5LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0C 9 | AQYIKoZIzj0DAQcDQgAEWREd1ioFfqUPSJ/SQbte4CCGRilMPgR/mRP5jG/CAr+K 10 | OCJ1wTd70HQBToBJZJvGPIzCRswkCiyFc9wdWs+nnjAKBggqhkjOPQQDAgNHADBE 11 | AiAfVu8wnzeK9cutyhywMnS4ZmsCf+eVteYohQrCjKNZAwIgLcUXK5rmTZm8SE/v 12 | G1w58Cqn4un1ZfEkxj0ly0HzxmI= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/msp/tlscacerts/tlsca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeGgAwIBAgIVAN/YBfD8+1v6vhm+lLNFJPi2/QzFMAoGCCqGSM49BAMC 3 | MHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMMG3Rsc2Nh 5 | Lm9ubGluZXBheS5leGFtcGxlLmNvbTAeFw0xOTAyMTAwNTAzMjBaFw0yOTAyMDcw 6 | NTAzMjBaMHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UE 7 | BwwFWGkgQW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMM 8 | G3Rsc2NhLm9ubGluZXBheS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAWpiz+mlf/Y6x5hHk8CIfDzR310S/967gL64jvUzlsnyqI2v2/c0EoA 10 | YYsGprNtpWg2m99G9Lh1qE037QBynqGjUDBOMB0GA1UdDgQWBBTCTE86c7Zf3bip 11 | zhWSDtHTIdgqDDAfBgNVHSMEGDAWgBTCTE86c7Zf3bipzhWSDtHTIdgqDDAMBgNV 12 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0kAMEYCIQDwmQr96iB9/MkCg1DKZRnUUbRF 13 | h6SDPXTJx8cogj1SjwIhANXvJLQNyXkavj+gjC7b1Pzua0+wgPrlLvzSbRQXh4bg 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/tls/tls-peer0.onlinepay.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQguHB6l5kfIWViLaAI 3 | soNGU5kFoa6merc7JjRhY5c0Z2KhRANCAAQg2/EVPqIrFrMWre8kVHcfuGsI5fP2 4 | dqinwb00a4HfnIJ1QlujCE/q9MlWk5KPKLVlLaQ2NtoIWODqF3N1RFkB 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/tls/tls-peer0.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB9DCCAZoCFQCsLM3nnV3qOoXcT/sgTWLhLrf4rTAKBggqhkjOPQQDAjB0MQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRww 4 | GgYDVQQKDBNBIE9ubGluZVBheSBDb21wYW55MSQwIgYDVQQDDBt0bHNjYS5vbmxp 5 | bmVwYXkuZXhhbXBsZS5jb20wHhcNMTkwMjEwMDUwMzIwWhcNMjkwMjA3MDUwMzIw 6 | WjCBgzELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEcMBoGA1UECgwTQSBPbmxpbmVQYXkgQ29tcGFueTENMAsGA1UECwwEcGVl 8 | cjEkMCIGA1UEAwwbcGVlcjAub25saW5lcGF5LmV4YW1wbGUuY29tMFkwEwYHKoZI 9 | zj0CAQYIKoZIzj0DAQcDQgAEINvxFT6iKxazFq3vJFR3H7hrCOXz9naop8G9NGuB 10 | 35yCdUJbowhP6vTJVpOSjyi1ZS2kNjbaCFjg6hdzdURZATAKBggqhkjOPQQDAgNI 11 | ADBFAiEAiGMV6yKe3R048nwLgXrTitg1Qh8PfnX27tXhnXN+J0gCIEpLwbOrr5Q0 12 | 0xK8gyQXBNk2GKSrgoPyGqdBmkM4I3fl 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.onlinepay/mymsp/localmsp/peer0.onlinepay.example.com/tls/tlsca.onlinepay.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeGgAwIBAgIVAN/YBfD8+1v6vhm+lLNFJPi2/QzFMAoGCCqGSM49BAMC 3 | MHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMMG3Rsc2Nh 5 | Lm9ubGluZXBheS5leGFtcGxlLmNvbTAeFw0xOTAyMTAwNTAzMjBaFw0yOTAyMDcw 6 | NTAzMjBaMHQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UE 7 | BwwFWGkgQW4xHDAaBgNVBAoME0EgT25saW5lUGF5IENvbXBhbnkxJDAiBgNVBAMM 8 | G3Rsc2NhLm9ubGluZXBheS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAWpiz+mlf/Y6x5hHk8CIfDzR310S/967gL64jvUzlsnyqI2v2/c0EoA 10 | YYsGprNtpWg2m99G9Lh1qE037QBynqGjUDBOMB0GA1UdDgQWBBTCTE86c7Zf3bip 11 | zhWSDtHTIdgqDDAfBgNVHSMEGDAWgBTCTE86c7Zf3bipzhWSDtHTIdgqDDAMBgNV 12 | HRMEBTADAQH/MAoGCCqGSM49BAMCA0kAMEYCIQDwmQr96iB9/MkCg1DKZRnUUbRF 13 | h6SDPXTJx8cogj1SjwIhANXvJLQNyXkavj+gjC7b1Pzua0+wgPrlLvzSbRQXh4bg 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/docker-compose-prod-peer0-sharing.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-peer0.sharing.example.com: 10 | 11 | services: 12 | couchdb_peer0_sharing: 13 | container_name: couchdb_peer0_sharing 14 | image: hyperledger/fabric-couchdb 15 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 16 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 17 | environment: 18 | - COUCHDB_USER= 19 | - COUCHDB_PASSWORD= 20 | # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 21 | # for example map it to utilize Fauxton User Interface in dev environments. 22 | network_mode: "host" 23 | ports: 24 | - "5984:5984" 25 | 26 | peer0.sharing.example.com: 27 | container_name: peer0.sharing.example.com 28 | image: hyperledger/fabric-peer:latest 29 | environment: 30 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 31 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host 32 | - FABRIC_LOGGING_SPEC=INFO 33 | - CORE_PEER_TLS_ENABLED=true 34 | - CORE_PEER_GOSSIP_USELEADERELECTION=true 35 | - CORE_PEER_GOSSIP_ORGLEADER=false 36 | - CORE_PEER_PROFILE_ENABLED=true 37 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.sharing.example.com.pem 38 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.sharing.example.com.key 39 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.sharing.example.com.pem 40 | - CORE_PEER_ID=peer0.sharing.example.com 41 | - CORE_PEER_ADDRESS=peer0.sharing.example.com:7051 42 | # - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 43 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.sharing.example.com:7051 44 | - CORE_PEER_LOCALMSPID=SharingMSP 45 | # Below for CouchDB 46 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 47 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984 48 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 49 | # provide the credentials for ledger to connect to CouchDB. The username and password must 50 | # match the username and password set for the associated CouchDB. 51 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 52 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 53 | volumes: 54 | - /var/run/:/host/var/run/ 55 | - /bin/ping:/bin/ping 56 | - /usr/bin/telnet:/usr/bin/telnet 57 | # The msp folder is requied 58 | - ./mymsp/localmsp/peer0.sharing.example.com/msp:/etc/hyperledger/fabric/msp 59 | - ./mymsp/localmsp/peer0.sharing.example.com/tls:/etc/hyperledger/fabric/tls 60 | - prod-peer0.sharing.example.com:/var/hyperledger/production 61 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 62 | command: peer node start 63 | network_mode: "host" 64 | ports: 65 | - 7051:7051 66 | - 7053:7053 67 | depends_on: 68 | - couchdb_peer0_sharing 69 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/msp/admincerts/admin@sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6zCCAZECFQCypybYrS5EH1VEFY8NRq7bfL3CvzAKBggqhkjOPQQDAjBtMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEfMB0GA1UEAwwWY2Euc2hhcmluZy5l 5 | eGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDdaFw0yOTAxMzEwMDI5MDdaMIGBMQsw 6 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 7 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEPMA0GA1UECwwGY2xpZW50MSIwIAYD 8 | VQQDDBlhZG1pbkBzaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEhxEV2APhd0W2/x8cLnW3IzXGNmy5kGI9bq16QB3vrhO3rRLxikJk 10 | jBA1sCC8EPjEPVCB7O6XLuf/nEZr4AlW/jAKBggqhkjOPQQDAgNIADBFAiACU6kP 11 | uDQV7vu3Ork1n22b2g1OQmYgQ9HMnfxFQpRaJgIhAOI4ZLjc+SjgeeoICdSr3WKx 12 | 0kwDCJ3Zc6LYRCBFVydP 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/msp/cacerts/ca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAK1uvOzN2vvPUgNI0FIYDT3PQgrLMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgU2hhcmluZyBDb21wYW55MR8wHQYDVQQDDBZjYS5zaGFy 5 | aW5nLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1ow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxHzAdBgNVBAMMFmNhLnNoYXJp 8 | bmcuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARRDcucVpp/ 9 | IQZymjzyNRzw2hIhNfIUT9JnmwgpMifJDBK4KS0flgHyq6s2CLka9+Wagk+tVMqw 10 | whkKG/kBiF5Go1AwTjAdBgNVHQ4EFgQU/bvbGehbLAsATelIQd5fYuEQ0aAwHwYD 11 | VR0jBBgwFoAU/bvbGehbLAsATelIQd5fYuEQ0aAwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiEAgYXrvpYQPOGLOZeImCVmRb7PwoijivoJNyGnG8nOYUwC 13 | IG2EICn5SxeAwWrf4j5zcJk4b9l7vDTmvwqTmeoJrJe1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.sharing.example.com.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.sharing.example.com.pem 8 | OrganizationalUnitIdentifier: peer 9 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/msp/keystore/peer0.sharing.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgQAayF/chdbthl0G4 3 | MsJ6RY3BF7qltjFFtuwygWfAaX2hRANCAAQwvyIASoFoPypKXBhI05phTxkh7HBP 4 | C2Qen2I5HFbeYn1y8ratbYv+gAjNeQ71Cnw14jMF4n5UaESiqQOHyc/y 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/msp/signcerts/peer0.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB5jCCAY0CFAYSNM/aDOL93xo5wsr4D/ro5Hz0MAoGCCqGSM49BAMCMG0xCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgU2hhcmluZyBDb21wYW55MR8wHQYDVQQDDBZjYS5zaGFyaW5nLmV4 5 | YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1owfzELMAkG 6 | A1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBBbjEaMBgG 7 | A1UECgwRQSBTaGFyaW5nIENvbXBhbnkxDTALBgNVBAsMBHBlZXIxIjAgBgNVBAMM 8 | GXBlZXIwLnNoYXJpbmcuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMB 9 | BwNCAAQwvyIASoFoPypKXBhI05phTxkh7HBPC2Qen2I5HFbeYn1y8ratbYv+gAjN 10 | eQ71Cnw14jMF4n5UaESiqQOHyc/yMAoGCCqGSM49BAMCA0cAMEQCIEn53q5SfQcj 11 | iWcgL+jI+Qlrf7K+dSoSxWjKO5QqVwnvAiA2qZswydWUO3+YjnSVhavci91WwEcc 12 | TZMK//VaDUH/uA== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/tls/tls-peer0.sharing.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgP/PFLmr25l5wd+C9 3 | 0st0+R3Zi0Sdv/F9uPo+zp/0ttehRANCAATuofr9ibIB/MISFJeEmucJuezJMeYb 4 | 7JLoVLBNZyBDVhuEztnpQ17LobOD+CrL4bLS9UfW5i29ZIS78Lf6Dr9z 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/tls/tls-peer0.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB7DCCAZECFQC/It8OhK26/dSu81/6fORo4cmu+jAKBggqhkjOPQQDAjBwMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Euc2hhcmlu 5 | Zy5leGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDdaFw0yOTAxMzEwMDI5MDdaMH8x 6 | CzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4x 7 | GjAYBgNVBAoMEUEgU2hhcmluZyBDb21wYW55MQ0wCwYDVQQLDARwZWVyMSIwIAYD 8 | VQQDDBlwZWVyMC5zaGFyaW5nLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAE7qH6/YmyAfzCEhSXhJrnCbnsyTHmG+yS6FSwTWcgQ1YbhM7Z6UNe 10 | y6Gzg/gqy+Gy0vVH1uYtvWSEu/C3+g6/czAKBggqhkjOPQQDAgNJADBGAiEA6IAz 11 | fJWNGft0ENr+9wvtB0Mt2r/hDfQzoI7paZKAsTgCIQDGdHb2c+w5HXcyMkhxUICa 12 | 7HdD+9GUwZcPHkqOfGrDyg== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.sharing/mymsp/localmsp/peer0.sharing.example.com/tls/tlsca.sharing.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdigAwIBAgIUZutc3GMJ7ZCgaGHiaNsFUibdmfowCgYIKoZIzj0EAwIw 3 | cDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 4 | bjEaMBgGA1UECgwRQSBTaGFyaW5nIENvbXBhbnkxIjAgBgNVBAMMGXRsc2NhLnNo 5 | YXJpbmcuZXhhbXBsZS5jb20wHhcNMTkwMjAzMDAyOTA3WhcNMjkwMTMxMDAyOTA3 6 | WjBwMQswCQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhp 7 | IEFuMRowGAYDVQQKDBFBIFNoYXJpbmcgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2Eu 8 | c2hhcmluZy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEQ7 9 | SylJHUy71Ll90DPAi/F+FZAjNkAWWQKHOLLkoF5KYwhyUfvKSimmijo/EFO9b2bb 10 | BTnnUuOzRf4lsBRfR7+jUDBOMB0GA1UdDgQWBBQKJKHucDU5hN02xLAr2TnHBy6g 11 | SDAfBgNVHSMEGDAWgBQKJKHucDU5hN02xLAr2TnHBy6gSDAMBgNVHRMEBTADAQH/ 12 | MAoGCCqGSM49BAMCA0gAMEUCIQDYFeXU8Xex87Gu0VcNMIzJ7Ir/kkoOX6gnpl/i 13 | ur2uTwIgXeeL9KktHccsXiwg6TnEf2stWOEGC+KwuUyY9InGgHA= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/docker-compose-prod-peer0-vehicle.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-peer0.vehicle.example.com: 10 | 11 | services: 12 | couchdb_peer0_vehicle: 13 | container_name: couchdb_peer0_vehicle 14 | image: hyperledger/fabric-couchdb 15 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 16 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 17 | environment: 18 | - COUCHDB_USER= 19 | - COUCHDB_PASSWORD= 20 | # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 21 | # for example map it to utilize Fauxton User Interface in dev environments. 22 | network_mode: "host" 23 | ports: 24 | - "5984:5984" 25 | 26 | peer0.vehicle.example.com: 27 | container_name: peer0.vehicle.example.com 28 | image: hyperledger/fabric-peer:latest 29 | environment: 30 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 31 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host 32 | - FABRIC_LOGGING_SPEC=INFO 33 | - CORE_PEER_TLS_ENABLED=true 34 | - CORE_PEER_GOSSIP_USELEADERELECTION=true 35 | - CORE_PEER_GOSSIP_ORGLEADER=false 36 | - CORE_PEER_PROFILE_ENABLED=true 37 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.vehicle.example.com.pem 38 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.vehicle.example.com.key 39 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.vehicle.example.com.pem 40 | - CORE_PEER_ID=peer0.vehicle.example.com 41 | - CORE_PEER_ADDRESS=peer0.vehicle.example.com:7051 42 | # - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 43 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.vehicle.example.com:7051 44 | - CORE_PEER_LOCALMSPID=VehicleMSP 45 | # Below for CouchDB 46 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 47 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984 48 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 49 | # provide the credentials for ledger to connect to CouchDB. The username and password must 50 | # match the username and password set for the associated CouchDB. 51 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 52 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 53 | volumes: 54 | - /var/run/:/host/var/run/ 55 | - /bin/ping:/bin/ping 56 | - /usr/bin/telnet:/usr/bin/telnet 57 | # The msp folder is requied 58 | - ./mymsp/localmsp/peer0.vehicle.example.com/msp:/etc/hyperledger/fabric/msp 59 | - ./mymsp/localmsp/peer0.vehicle.example.com/tls:/etc/hyperledger/fabric/tls 60 | - prod-peer0.vehicle.example.com:/var/hyperledger/production 61 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 62 | command: peer node start 63 | network_mode: "host" 64 | ports: 65 | - 7051:7051 66 | - 7053:7053 67 | depends_on: 68 | - couchdb_peer0_vehicle 69 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/msp/admincerts/admin@vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6jCCAZACFEw6KOjnzqtDGcmu28eS+5Gvv75vMAoGCCqGSM49BAMCMG0xCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhpY2xlLmV4 5 | YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlowgYExCzAJ 6 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 7 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MQ8wDQYDVQQLDAZjbGllbnQxIjAgBgNV 8 | BAMMGWFkbWluQHZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjO 9 | PQMBBwNCAARpHAGZ8oN2uGzRzDfK1uFr2rq3FyRPRYvUaWI8fhM3h4MgbovgRDcV 10 | FK8zSUzzH2Eerw59cytEX5P78XjjhtJTMAoGCCqGSM49BAMCA0gAMEUCIGoLgAcM 11 | Dd4V3e8brGXEV6D9rdwDO/WxaTtkO4zLWO9dAiEAymTLgjrFHSjJp8lwsJv2y2ua 12 | WYzMRLXQ4dhp2WKUBws= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/msp/cacerts/ca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIVAOdvXd9Kzh11a9ts7aXjNZPBsR3TMAoGCCqGSM49BAMC 3 | MG0xCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhp 5 | Y2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkwNlow 6 | bTELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBB 7 | bjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxHzAdBgNVBAMMFmNhLnZlaGlj 8 | bGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAShnfqU/Lh9 9 | fS+1S5rIeRRzQwSnJeKUOHJC0nJlbklB9LRJj66eiTOBqPw7WRIqJE3NvGLkjO1s 10 | Ju6BiQTyJQZ8o1AwTjAdBgNVHQ4EFgQUpQvjorf767dgp4GqfHs6XNksNrYwHwYD 11 | VR0jBBgwFoAUpQvjorf767dgp4GqfHs6XNksNrYwDAYDVR0TBAUwAwEB/zAKBggq 12 | hkjOPQQDAgNIADBFAiBdgsa7qlobmbksoTi3ovd47Kgfc6HsYaqQwzZssR27HQIh 13 | APUKT/DxOP6lyEzn5gp8Ux0Sob7QXRCGmW/qZOXgsSyk 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.vehicle.example.com.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.vehicle.example.com.pem 8 | OrganizationalUnitIdentifier: peer 9 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/msp/keystore/peer0.vehicle.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgft+LZSQ3alL1LNu9 3 | EC0Rd2ly9EBvmfpSW6SOew969EOhRANCAAQEZt7YIzbQY8u0zU/ppPbwqc45Ybzb 4 | eupH+DUK9V4yCTjdPStdEgHMrDWsq0koIEdoVG0kDGntMI9L38T2gIik 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/msp/signcerts/peer0.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB5zCCAY0CFDD9NhT3r9BKfEP1sdu/l5yK+z7HMAoGCCqGSM49BAMCMG0xCzAJ 3 | BgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4xGjAY 4 | BgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MR8wHQYDVQQDDBZjYS52ZWhpY2xlLmV4 5 | YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwN1oXDTI5MDEzMTAwMjkwN1owfzELMAkG 6 | A1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVYaSBBbjEaMBgG 7 | A1UECgwRQSBWZWhpY2xlIENvbXBhbnkxDTALBgNVBAsMBHBlZXIxIjAgBgNVBAMM 8 | GXBlZXIwLnZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMB 9 | BwNCAAQEZt7YIzbQY8u0zU/ppPbwqc45YbzbeupH+DUK9V4yCTjdPStdEgHMrDWs 10 | q0koIEdoVG0kDGntMI9L38T2gIikMAoGCCqGSM49BAMCA0gAMEUCICbMF4yuC7Zr 11 | OXh1fsftxAQL7uc8PX5qLzYSdb0jRCEBAiEAkMjESaZWzbbvNtLv5l5a62di/wa7 12 | 3GMQQAr4MVTWFHU= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/msp/tlscacerts/tlsca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdmgAwIBAgIVAM4qty3lbfTd/sdLhBsF48gY6o0qMAoGCCqGSM49BAMC 3 | MHAxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS52 5 | ZWhpY2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkw 6 | NlowcDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxIjAgBgNVBAMMGXRsc2Nh 8 | LnZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATQ 9 | KeEp9xKeFI2VmVaPvSlP5JMewlEe2zMQppg1FXwPxARJRahbvNixXZgeONM8xPGu 10 | 5PwfTHFAdoxolfOa7j6Ko1AwTjAdBgNVHQ4EFgQUGwP7HtTYWhCMrfPXKaWQdR0m 11 | XaAwHwYDVR0jBBgwFoAUGwP7HtTYWhCMrfPXKaWQdR0mXaAwDAYDVR0TBAUwAwEB 12 | /zAKBggqhkjOPQQDAgNHADBEAiAWpmVZRnXGVYeX8jrh/klY8afxxywslKXkN6hY 13 | EbLgyAIgVpzjBQSD2bWeJlmDb6hktEYPgqMe9yhPkLBInc1sEG0= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/tls/tls-peer0.vehicle.example.com.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg72SSQpb0eyAZHDKa 3 | 7nihmJ19ajK32cmc4EGv+5wu9aShRANCAARK1+Y7pu8u57/CHnGjoNLImpDl597a 4 | QZU2gea0y88oxdXvxqdEPCV2ZXLEgdPxoueyp3hAj5Zmgdf6oh65Nid2 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/tls/tls-peer0.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB6zCCAZECFQDm7n9y+F7d68q6sApwyl40xuh+5TAKBggqhkjOPQQDAjBwMQsw 3 | CQYDVQQGEwJDTjERMA8GA1UECAwIU2hhYW4gWGkxDjAMBgNVBAcMBVhpIEFuMRow 4 | GAYDVQQKDBFBIFZlaGljbGUgQ29tcGFueTEiMCAGA1UEAwwZdGxzY2EudmVoaWNs 5 | ZS5leGFtcGxlLmNvbTAeFw0xOTAyMDMwMDI5MDdaFw0yOTAxMzEwMDI5MDdaMH8x 6 | CzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkgQW4x 7 | GjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MQ0wCwYDVQQLDARwZWVyMSIwIAYD 8 | VQQDDBlwZWVyMC52ZWhpY2xlLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 9 | zj0DAQcDQgAEStfmO6bvLue/wh5xo6DSyJqQ5efe2kGVNoHmtMvPKMXV78anRDwl 10 | dmVyxIHT8aLnsqd4QI+WZoHX+qIeuTYndjAKBggqhkjOPQQDAgNIADBFAiEAioXO 11 | HpqPOIqwMUtFe9wHqCBZxz7iMJjsMINzuuheBJ8CICbPpHhm5oiZ9ZpIZKQxfGQC 12 | iMUk6GFkkRHkksh4JYoq 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /deployed/peer0.vehicle/mymsp/localmsp/peer0.vehicle.example.com/tls/tlsca.vehicle.example.com.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMjCCAdmgAwIBAgIVAM4qty3lbfTd/sdLhBsF48gY6o0qMAoGCCqGSM49BAMC 3 | MHAxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhTaGFhbiBYaTEOMAwGA1UEBwwFWGkg 4 | QW4xGjAYBgNVBAoMEUEgVmVoaWNsZSBDb21wYW55MSIwIAYDVQQDDBl0bHNjYS52 5 | ZWhpY2xlLmV4YW1wbGUuY29tMB4XDTE5MDIwMzAwMjkwNloXDTI5MDEzMTAwMjkw 6 | NlowcDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFNoYWFuIFhpMQ4wDAYDVQQHDAVY 7 | aSBBbjEaMBgGA1UECgwRQSBWZWhpY2xlIENvbXBhbnkxIjAgBgNVBAMMGXRsc2Nh 8 | LnZlaGljbGUuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATQ 9 | KeEp9xKeFI2VmVaPvSlP5JMewlEe2zMQppg1FXwPxARJRahbvNixXZgeONM8xPGu 10 | 5PwfTHFAdoxolfOa7j6Ko1AwTjAdBgNVHQ4EFgQUGwP7HtTYWhCMrfPXKaWQdR0m 11 | XaAwHwYDVR0jBBgwFoAUGwP7HtTYWhCMrfPXKaWQdR0mXaAwDAYDVR0TBAUwAwEB 12 | /zAKBggqhkjOPQQDAgNHADBEAiAWpmVZRnXGVYeX8jrh/klY8afxxywslKXkN6hY 13 | EbLgyAIgVpzjBQSD2bWeJlmDb6hktEYPgqMe9yhPkLBInc1sEG0= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /docker-compose-prod-client.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | services: 9 | client: 10 | container_name: client 11 | image: hyperledger/fabric-tools:latest 12 | tty: true 13 | stdin_open: true 14 | environment: 15 | - GOPATH=/opt/gopath 16 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 17 | #- FABRIC_LOGGING_SPEC=DEBUG 18 | - FABRIC_LOGGING_SPEC=INFO 19 | - CORE_PEER_ID=client 20 | - CORE_PEER_ADDRESS=peer0.vehicle.example.com:7051 21 | #- CORE_PEER_LOCALMSPID=VehicleMSP 22 | - CORE_PEER_TLS_ENABLED=true 23 | #- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/peer0.vehicle.example.com.pem 24 | #- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/peer0.vehicle.example.com.key 25 | #- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.vehicle.example.com.pem 26 | #- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp 27 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 28 | command: /bin/bash 29 | volumes: 30 | - /var/run/:/host/var/run/ 31 | - /bin/ping:/bin/ping 32 | - /usr/bin/telnet:/usr/bin/telnet 33 | - ./chaincode/:/opt/gopath/src/github.com/chaincode 34 | - ./utils:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/ 35 | - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts 36 | - ./mymsp/localmsp:/etc/hyperledger/fabric/localmsp 37 | - ./mymsp/orgmsp:/etc/hyperledger/fabric/orgmsp 38 | network_mode: "host" 39 | -------------------------------------------------------------------------------- /docker-compose-prod-orderer.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-orderer.bctest.example.com: 10 | 11 | services: 12 | orderer.bctest.example.com: 13 | container_name: orderer.bctest.example.com 14 | image: hyperledger/fabric-orderer:latest 15 | environment: 16 | - FABRIC_LOGGING_SPEC=DEBUG 17 | - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 18 | - ORDERER_GENERAL_GENESISMETHOD=file 19 | - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/vehiclesharing_genesis.block 20 | - ORDERER_GENERAL_LOCALMSPID=OrdererMSP 21 | - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/localmsp/orderer.bctest.example.com/msp 22 | - ORDERER_GENERAL_TLS_ENABLED=true 23 | - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/localmsp/orderer.bctest.example.com/tls/tls-orderer.bctest.example.com.key 24 | - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/localmsp/orderer.bctest.example.com/tls/tls-orderer.bctest.example.com.pem 25 | - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/localmsp/orderer.bctest.example.com/tls/tlsca.bctest.example.com.pem] 26 | - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1 27 | - ORDERER_KAFKA_VERBOSE=true 28 | volumes: 29 | - /bin/ping:/bin/ping 30 | - /usr/bin/telnet:/usr/bin/telnet 31 | - ./channel-artifacts/vehiclesharing_genesis.block:/var/hyperledger/orderer/vehiclesharing_genesis.block 32 | - ./mymsp/localmsp/orderer.bctest.example.com/msp:/var/hyperledger/localmsp/orderer.bctest.example.com/msp 33 | - ./mymsp/localmsp/orderer.bctest.example.com/tls:/var/hyperledger/localmsp/orderer.bctest.example.com/tls 34 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 35 | command: orderer 36 | network_mode: "host" 37 | ports: 38 | - 7050:7050 39 | 40 | -------------------------------------------------------------------------------- /docker-compose-prod-peer0-onlinepay.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-peer0.onlinepay.example.com: 10 | 11 | services: 12 | couchdb_peer0_onlinepay: 13 | container_name: couchdb_peer0_onlinepay 14 | image: hyperledger/fabric-couchdb 15 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 16 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 17 | environment: 18 | - COUCHDB_USER= 19 | - COUCHDB_PASSWORD= 20 | # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 21 | # for example map it to utilize Fauxton User Interface in dev environments. 22 | network_mode: "host" 23 | ports: 24 | - "5984:5984" 25 | 26 | peer0.onlinepay.example.com: 27 | container_name: peer0.onlinepay.example.com 28 | image: hyperledger/fabric-peer:latest 29 | environment: 30 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 31 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host 32 | - FABRIC_LOGGING_SPEC=INFO 33 | - CORE_PEER_TLS_ENABLED=true 34 | - CORE_PEER_GOSSIP_USELEADERELECTION=true 35 | - CORE_PEER_GOSSIP_ORGLEADER=false 36 | - CORE_PEER_PROFILE_ENABLED=true 37 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.onlinepay.example.com.pem 38 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.onlinepay.example.com.key 39 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.onlinepay.example.com.pem 40 | - CORE_PEER_ID=peer0.onlinepay.example.com 41 | - CORE_PEER_ADDRESS=peer0.onlinepay.example.com:7051 42 | # - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 43 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.onlinepay.example.com:7051 44 | - CORE_PEER_LOCALMSPID=OnlinePayMSP 45 | # Below for CouchDB 46 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 47 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984 48 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 49 | # provide the credentials for ledger to connect to CouchDB. The username and password must 50 | # match the username and password set for the associated CouchDB. 51 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 52 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 53 | volumes: 54 | - /var/run/:/host/var/run/ 55 | - /bin/ping:/bin/ping 56 | - /usr/bin/telnet:/usr/bin/telnet 57 | # The msp folder is requied 58 | - ./mymsp/localmsp/peer0.onlinepay.example.com/msp:/etc/hyperledger/fabric/msp 59 | - ./mymsp/localmsp/peer0.onlinepay.example.com/tls:/etc/hyperledger/fabric/tls 60 | - prod-peer0.onlinepay.example.com:/var/hyperledger/production 61 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 62 | command: peer node start 63 | network_mode: "host" 64 | ports: 65 | - 7051:7051 66 | - 7053:7053 67 | depends_on: 68 | - couchdb_peer0_onlinepay 69 | -------------------------------------------------------------------------------- /docker-compose-prod-peer0-sharing.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-peer0.sharing.example.com: 10 | 11 | services: 12 | couchdb_peer0_sharing: 13 | container_name: couchdb_peer0_sharing 14 | image: hyperledger/fabric-couchdb 15 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 16 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 17 | environment: 18 | - COUCHDB_USER= 19 | - COUCHDB_PASSWORD= 20 | # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 21 | # for example map it to utilize Fauxton User Interface in dev environments. 22 | network_mode: "host" 23 | ports: 24 | - "5984:5984" 25 | 26 | peer0.sharing.example.com: 27 | container_name: peer0.sharing.example.com 28 | image: hyperledger/fabric-peer:latest 29 | environment: 30 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 31 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host 32 | - FABRIC_LOGGING_SPEC=INFO 33 | - CORE_PEER_TLS_ENABLED=true 34 | - CORE_PEER_GOSSIP_USELEADERELECTION=true 35 | - CORE_PEER_GOSSIP_ORGLEADER=false 36 | - CORE_PEER_PROFILE_ENABLED=true 37 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.sharing.example.com.pem 38 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.sharing.example.com.key 39 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.sharing.example.com.pem 40 | - CORE_PEER_ID=peer0.sharing.example.com 41 | - CORE_PEER_ADDRESS=peer0.sharing.example.com:7051 42 | # - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 43 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.sharing.example.com:7051 44 | - CORE_PEER_LOCALMSPID=SharingMSP 45 | # Below for CouchDB 46 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 47 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984 48 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 49 | # provide the credentials for ledger to connect to CouchDB. The username and password must 50 | # match the username and password set for the associated CouchDB. 51 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 52 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 53 | volumes: 54 | - /var/run/:/host/var/run/ 55 | - /bin/ping:/bin/ping 56 | - /usr/bin/telnet:/usr/bin/telnet 57 | # The msp folder is requied 58 | - ./mymsp/localmsp/peer0.sharing.example.com/msp:/etc/hyperledger/fabric/msp 59 | - ./mymsp/localmsp/peer0.sharing.example.com/tls:/etc/hyperledger/fabric/tls 60 | - prod-peer0.sharing.example.com:/var/hyperledger/production 61 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 62 | command: peer node start 63 | network_mode: "host" 64 | ports: 65 | - 7051:7051 66 | - 7053:7053 67 | depends_on: 68 | - couchdb_peer0_sharing 69 | -------------------------------------------------------------------------------- /docker-compose-prod-peer0-vehicle.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | version: '2' 7 | 8 | volumes: 9 | prod-peer0.vehicle.example.com: 10 | 11 | services: 12 | couchdb_peer0_vehicle: 13 | container_name: couchdb_peer0_vehicle 14 | image: hyperledger/fabric-couchdb 15 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 16 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 17 | environment: 18 | - COUCHDB_USER= 19 | - COUCHDB_PASSWORD= 20 | # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 21 | # for example map it to utilize Fauxton User Interface in dev environments. 22 | network_mode: "host" 23 | ports: 24 | - "5984:5984" 25 | 26 | peer0.vehicle.example.com: 27 | container_name: peer0.vehicle.example.com 28 | image: hyperledger/fabric-peer:latest 29 | environment: 30 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 31 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host 32 | - FABRIC_LOGGING_SPEC=INFO 33 | - CORE_PEER_TLS_ENABLED=true 34 | - CORE_PEER_GOSSIP_USELEADERELECTION=true 35 | - CORE_PEER_GOSSIP_ORGLEADER=false 36 | - CORE_PEER_PROFILE_ENABLED=true 37 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.vehicle.example.com.pem 38 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.vehicle.example.com.key 39 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.vehicle.example.com.pem 40 | - CORE_PEER_ID=peer0.vehicle.example.com 41 | - CORE_PEER_ADDRESS=peer0.vehicle.example.com:7051 42 | # - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 43 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.vehicle.example.com:7051 44 | - CORE_PEER_LOCALMSPID=VehicleMSP 45 | # Below for CouchDB 46 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 47 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984 48 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 49 | # provide the credentials for ledger to connect to CouchDB. The username and password must 50 | # match the username and password set for the associated CouchDB. 51 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 52 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 53 | volumes: 54 | - /var/run/:/host/var/run/ 55 | - /bin/ping:/bin/ping 56 | - /usr/bin/telnet:/usr/bin/telnet 57 | # The msp folder is requied 58 | - ./mymsp/localmsp/peer0.vehicle.example.com/msp:/etc/hyperledger/fabric/msp 59 | - ./mymsp/localmsp/peer0.vehicle.example.com/tls:/etc/hyperledger/fabric/tls 60 | - prod-peer0.vehicle.example.com:/var/hyperledger/production 61 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 62 | command: peer node start 63 | network_mode: "host" 64 | ports: 65 | - 7051:7051 66 | - 7053:7053 67 | depends_on: 68 | - couchdb_peer0_vehicle 69 | -------------------------------------------------------------------------------- /prodchannel.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | echo "This script will generate genesis block and channel creation transaction under ./channel-artifacts folder." 3 | echo "And the existing files under ./channel-artifacts will be removed." 4 | echo "Please config configtx.yaml at first." 5 | 6 | mkdir -p ./channel-artifacts 7 | rm -rf ./channel-artifacts/* 8 | ########################################################################################## 9 | 10 | # Generate 11 | 12 | export FABRIC_CFG_PATH=${PWD} 13 | 14 | # Generate genesis block. 15 | # Use a different channel ID for genesis block!!! 16 | configtxgen -profile VehicleSharingOrdererGenesis -outputBlock ./channel-artifacts/vehiclesharing_genesis.block -channelID vsgenesis 17 | 18 | # Generate channel creation transaction. 19 | configtxgen -profile VehicleSharingChannel -outputCreateChannelTx ./channel-artifacts/vehiclesharing_channel.tx -channelID vschannel 20 | -------------------------------------------------------------------------------- /prodmsp.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | echo "This script will generate all example MSP materials under ./mymsp folder." 3 | echo "And the existing files under ./mymsp will be removed." 4 | 5 | mkdir -p ./mymsp 6 | rm -rf ./mymsp/* 7 | ########################################################################################## 8 | 9 | ########################################################################################## 10 | ################################# FOR BCTEST.EXAMPLE.COM ################################# 11 | ########################################################################################## 12 | 13 | # Self-signed CA Root Cert - ca.bctest.example.com 14 | ./utils/mymsputils.sh selfsign -n ca.bctest.example.com \ 15 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=Blockchain Test/CN=ca.bctest.example.com" \ 16 | -o ./mymsp/ca.bctest.example.com/ 17 | 18 | # Self-signed TLS CA Root Cert 19 | ./utils/mymsputils.sh selfsign -n tlsca.bctest.example.com \ 20 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=Blockchain Test/CN=tlsca.bctest.example.com" \ 21 | -o ./mymsp/tlsca.bctest.example.com/ 22 | 23 | # msp admin@bctest.example.com 24 | ./utils/mymsputils.sh msp -n admin@bctest.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=Blockchain Test/CN=admin@bctest.example.com" \ 25 | -o ./mymsp/ -c ./mymsp/ca.bctest.example.com/ca.bctest.example.com.pem -k ./mymsp/ca.bctest.example.com/ca.bctest.example.com.key \ 26 | -C ./mymsp/tlsca.bctest.example.com/tlsca.bctest.example.com.pem -K ./mymsp/tlsca.bctest.example.com/tlsca.bctest.example.com.key 27 | 28 | # msp orderer.bctest.example.com 29 | ./utils/mymsputils.sh msp -n orderer.bctest.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=Blockchain Test/CN=orderer.bctest.example.com" \ 30 | -o ./mymsp/ -c ./mymsp/ca.bctest.example.com/ca.bctest.example.com.pem -k ./mymsp/ca.bctest.example.com/ca.bctest.example.com.key \ 31 | -C ./mymsp/tlsca.bctest.example.com/tlsca.bctest.example.com.pem -K ./mymsp/tlsca.bctest.example.com/tlsca.bctest.example.com.key \ 32 | -a ./mymsp/localmsp/admin@bctest.example.com/msp/admincerts/admin@bctest.example.com.pem -M 33 | 34 | ########################################################################################## 35 | ################################# FOR VEHICLE.EXAMPLE.COM ################################ 36 | ########################################################################################## 37 | 38 | # Self-signed CA Root Cert - ca.vehicle.example.com 39 | ./utils/mymsputils.sh selfsign -n ca.vehicle.example.com \ 40 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Vehicle Company/CN=ca.vehicle.example.com" \ 41 | -o ./mymsp/ca.vehicle.example.com/ 42 | 43 | # Self-signed TLS CA Root Cert 44 | ./utils/mymsputils.sh selfsign -n tlsca.vehicle.example.com \ 45 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Vehicle Company/CN=tlsca.vehicle.example.com" \ 46 | -o ./mymsp/tlsca.vehicle.example.com/ 47 | 48 | # msp admin@vehicle.example.com 49 | ./utils/mymsputils.sh msp -n admin@vehicle.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Vehicle Company/OU=client/CN=admin@vehicle.example.com" \ 50 | -o ./mymsp/ -c ./mymsp/ca.vehicle.example.com/ca.vehicle.example.com.pem -k ./mymsp/ca.vehicle.example.com/ca.vehicle.example.com.key \ 51 | -C ./mymsp/tlsca.vehicle.example.com/tlsca.vehicle.example.com.pem -K ./mymsp/tlsca.vehicle.example.com/tlsca.vehicle.example.com.key 52 | 53 | # msp peer0.vehicle.example.com 54 | ./utils/mymsputils.sh msp -n peer0.vehicle.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Vehicle Company/OU=peer/CN=peer0.vehicle.example.com" \ 55 | -o ./mymsp/ -c ./mymsp/ca.vehicle.example.com/ca.vehicle.example.com.pem -k ./mymsp/ca.vehicle.example.com/ca.vehicle.example.com.key \ 56 | -C ./mymsp/tlsca.vehicle.example.com/tlsca.vehicle.example.com.pem -K ./mymsp/tlsca.vehicle.example.com/tlsca.vehicle.example.com.key \ 57 | -a ./mymsp/localmsp/admin@vehicle.example.com/msp/admincerts/admin@vehicle.example.com.pem -M -g 58 | 59 | ########################################################################################## 60 | ################################# FOR SHARING.EXAMPLE.COM ################################ 61 | ########################################################################################## 62 | 63 | # Self-signed CA Root Cert - ca.sharing.example.com 64 | ./utils/mymsputils.sh selfsign -n ca.sharing.example.com \ 65 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Sharing Company/CN=ca.sharing.example.com" \ 66 | -o ./mymsp/ca.sharing.example.com/ 67 | 68 | # Self-signed TLS CA Root Cert 69 | ./utils/mymsputils.sh selfsign -n tlsca.sharing.example.com \ 70 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Sharing Company/CN=tlsca.sharing.example.com" \ 71 | -o ./mymsp/tlsca.sharing.example.com/ 72 | 73 | # msp admin@sharing.example.com 74 | ./utils/mymsputils.sh msp -n admin@sharing.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Sharing Company/OU=client/CN=admin@sharing.example.com" \ 75 | -o ./mymsp/ -c ./mymsp/ca.sharing.example.com/ca.sharing.example.com.pem -k ./mymsp/ca.sharing.example.com/ca.sharing.example.com.key \ 76 | -C ./mymsp/tlsca.sharing.example.com/tlsca.sharing.example.com.pem -K ./mymsp/tlsca.sharing.example.com/tlsca.sharing.example.com.key 77 | 78 | # msp peer0.sharing.example.com 79 | ./utils/mymsputils.sh msp -n peer0.sharing.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A Sharing Company/OU=peer/CN=peer0.sharing.example.com" \ 80 | -o ./mymsp/ -c ./mymsp/ca.sharing.example.com/ca.sharing.example.com.pem -k ./mymsp/ca.sharing.example.com/ca.sharing.example.com.key \ 81 | -C ./mymsp/tlsca.sharing.example.com/tlsca.sharing.example.com.pem -K ./mymsp/tlsca.sharing.example.com/tlsca.sharing.example.com.key \ 82 | -a ./mymsp/localmsp/admin@sharing.example.com/msp/admincerts/admin@sharing.example.com.pem -M -g 83 | -------------------------------------------------------------------------------- /prodmsp_onlinepay.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | echo "This script will generate additional OnlinePay MSP materials under ./mymsp folder." 3 | ########################################################################################## 4 | 5 | ########################################################################################## 6 | ################################ FOR ONLINEPAY.EXAMPLE.COM ############################### 7 | ########################################################################################## 8 | 9 | # Self-signed CA Root Cert - ca.onlinepay.example.com 10 | ./utils/mymsputils.sh selfsign -n ca.onlinepay.example.com \ 11 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A OnlinePay Company/CN=ca.onlinepay.example.com" \ 12 | -o ./mymsp/ca.onlinepay.example.com/ 13 | 14 | # Self-signed TLS CA Root Cert 15 | ./utils/mymsputils.sh selfsign -n tlsca.onlinepay.example.com \ 16 | -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A OnlinePay Company/CN=tlsca.onlinepay.example.com" \ 17 | -o ./mymsp/tlsca.onlinepay.example.com/ 18 | 19 | # msp admin@onlinepay.example.com 20 | ./utils/mymsputils.sh msp -n admin@onlinepay.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A OnlinePay Company/OU=client/CN=admin@onlinepay.example.com" \ 21 | -o ./mymsp/ -c ./mymsp/ca.onlinepay.example.com/ca.onlinepay.example.com.pem -k ./mymsp/ca.onlinepay.example.com/ca.onlinepay.example.com.key \ 22 | -C ./mymsp/tlsca.onlinepay.example.com/tlsca.onlinepay.example.com.pem -K ./mymsp/tlsca.onlinepay.example.com/tlsca.onlinepay.example.com.key 23 | 24 | # msp peer0.onlinepay.example.com 25 | ./utils/mymsputils.sh msp -n peer0.onlinepay.example.com -s "/C=CN/ST=Shaan Xi/L=Xi An/O=A OnlinePay Company/OU=peer/CN=peer0.onlinepay.example.com" \ 26 | -o ./mymsp/ -c ./mymsp/ca.onlinepay.example.com/ca.onlinepay.example.com.pem -k ./mymsp/ca.onlinepay.example.com/ca.onlinepay.example.com.key \ 27 | -C ./mymsp/tlsca.onlinepay.example.com/tlsca.onlinepay.example.com.pem -K ./mymsp/tlsca.onlinepay.example.com/tlsca.onlinepay.example.com.key \ 28 | -a ./mymsp/localmsp/admin@onlinepay.example.com/msp/admincerts/admin@onlinepay.example.com.pem -M -g 29 | -------------------------------------------------------------------------------- /utils/mymsputils.sh: -------------------------------------------------------------------------------- 1 | ########################################################################3 2 | 3 | SUFFIX_KEY=".key" 4 | SUFFIX_CSR=".csr" 5 | SUFFIX_CRT=".pem" 6 | LOCALMSP_DIR="localmsp" 7 | ORGMSP_DIR="orgmsp" 8 | 9 | # Print the usage message 10 | function printHelp() { 11 | echo "To generate certificates." 12 | echo "Usage: " 13 | echo " mymsputils.sh " 14 | echo " - one of 'selfsign', 'sign'" 15 | echo " - 'selfsign' - generate a self-signed certificate" 16 | echo " - 'sign' - sign a certificate by another CA certificate" 17 | echo " -n - the certificate and key file name to be created" 18 | echo " -s - /C=c_str/ST=st_str/L=l_str/O=o_str/OU=ou_str/CN=cn_str" 19 | echo " -o - the directory where certificate file and key file to be saved to" 20 | echo " -c - the CA certificate file, required for 'sign|msp'" 21 | echo " -k - the CA key file, required for 'sign|msp'" 22 | echo " -a - the admin cert file of this organization, required for 'msp'" 23 | echo " -C - the TLS CA certificate file, required for 'msp'" 24 | echo " -K - the TLS CA key file, required for 'msp'" 25 | echo " -M - if create organization msp folder for public" 26 | echo " -g - if create node OU enable config.yaml" 27 | echo " mymsputils.sh -h (print this message)" 28 | } 29 | 30 | function getSerial() { 31 | SERIAL="0X$(cat /dev/urandom | tr -dc 'A-Fa-f0-9' | fold -w 40 | head -n 1)" 32 | } 33 | 34 | function selfSign() { 35 | # Get 3 args from command 36 | _NAME="$1" 37 | _SUBJ="$2" 38 | _OUT="$3" 39 | 40 | mkdir -p "${_OUT}" 41 | 42 | _KEYFILE="$(realpath -sm "${_OUT}/${_NAME}${SUFFIX_KEY}")" 43 | _KEYFILETEMP="${_KEYFILE}__" 44 | _CERTFILE="$(realpath -sm "${_OUT}/${_NAME}${SUFFIX_CRT}")" 45 | 46 | # Generate Private key 47 | openssl ecparam -genkey -name prime256v1 -out "${_KEYFILETEMP}" -noout 48 | # openssl pkey -in ${_KEYFILE} -out ${_KEYFILE} 49 | openssl pkcs8 -topk8 -nocrypt -in "${_KEYFILETEMP}" -out "${_KEYFILE}" 50 | rm "${_KEYFILETEMP}" 51 | 52 | # Request Root Cert 53 | getSerial 54 | openssl req -x509 -new -SHA256 -nodes -key "${_KEYFILE}" -days 3650 -out "${_CERTFILE}" -set_serial ${SERIAL} -subj "$_SUBJ" 55 | 56 | # Show Cert 57 | #openssl x509 -in ca.crt -text -noout 58 | 59 | echo "Key generated: $(tput setaf 2)${_KEYFILE}$(tput sgr0)" 60 | echo "Cert generated: $(tput setaf 2)${_CERTFILE}$(tput sgr0)" 61 | } 62 | 63 | function sign() { 64 | # Get 5 args from command 65 | _NAME="$1" 66 | _SUBJ="$2" 67 | _OUT="$3" 68 | _CA="$4" 69 | _CAKEY="$5" 70 | # _FILEPREFIX arg is not available for command, it is only for function. 71 | _FILEPREFIX="$6" 72 | if [ ! -z "${_FILEPREFIX}" ] 73 | then 74 | _FILEPREFIX="${_FILEPREFIX}-" 75 | fi 76 | 77 | mkdir -p "${_OUT}" 78 | 79 | _KEYFILE="$(realpath -sm "${_OUT}/${_FILEPREFIX}${_NAME}${SUFFIX_KEY}")" 80 | _KEYFILETEMP="${_KEYFILE}__" 81 | _CSRFILE="$(realpath -sm "${_OUT}/${_FILEPREFIX}${_NAME}${SUFFIX_CSR}")" 82 | _CERTFILE="$(realpath -sm "${_OUT}/${_FILEPREFIX}${_NAME}${SUFFIX_CRT}")" 83 | 84 | # Generate Private key 85 | openssl ecparam -genkey -name prime256v1 -out "${_KEYFILETEMP}" -noout 86 | openssl pkcs8 -topk8 -nocrypt -in "${_KEYFILETEMP}" -out "${_KEYFILE}" 87 | rm "${_KEYFILETEMP}" 88 | 89 | getSerial 90 | openssl req -new -SHA256 -key "${_KEYFILE}" -nodes -out "${_CSRFILE}" -subj "$_SUBJ" 91 | openssl x509 -req -SHA256 -days 3650 -in "${_CSRFILE}" -CA "${_CA}" -CAkey "${_CAKEY}" -set_serial ${SERIAL} -out "${_CERTFILE}" 92 | rm "${_CSRFILE}" 93 | 94 | echo "Key generated: $(tput setaf 2)${_KEYFILE}$(tput sgr0)" 95 | echo "Cert generated: $(tput setaf 2)${_CERTFILE}$(tput sgr0)" 96 | } 97 | 98 | function mspcfg() { 99 | _CA_FILE_NAME="$1" 100 | _CFG_FILE_DIR="$2" 101 | _CFG_FILE="$(realpath -sm "${_CFG_FILE_DIR}/config.yaml")" 102 | 103 | rm -f "${_CFG_FILE}" 104 | echo "NodeOUs:" >> "${_CFG_FILE}" 105 | echo " Enable: true" >> "${_CFG_FILE}" 106 | echo " ClientOUIdentifier:" >> "${_CFG_FILE}" 107 | echo " Certificate: cacerts/${_CA_FILE_NAME}" >> "${_CFG_FILE}" 108 | echo " OrganizationalUnitIdentifier: client" >> "${_CFG_FILE}" 109 | echo " PeerOUIdentifier:" >> "${_CFG_FILE}" 110 | echo " Certificate: cacerts/${_CA_FILE_NAME}" >> "${_CFG_FILE}" 111 | echo " OrganizationalUnitIdentifier: peer" >> "${_CFG_FILE}" 112 | } 113 | 114 | function msp() { 115 | # Get 8 args from command 116 | _NAME="$1" 117 | _SUBJ="$2" 118 | _OUT="$3" 119 | _CA="$4" 120 | _CAKEY="$5" 121 | _ADMIN="$6" 122 | _TLSCA="$7" 123 | _TLSCAKEY="$8" 124 | _USEORGMSP="$9" 125 | _WITHCONFIG="${10}" 126 | # _OUT, _CA conflict in sign function 127 | _OUT__="${_OUT}" 128 | _CA__="${_CA}" 129 | 130 | #echo "Begin msp..." 131 | 132 | ######## Local MSP ######## 133 | _LOCALMSP_DIR="$(realpath -sm "${_OUT}/${LOCALMSP_DIR}/${_NAME}/msp")" 134 | _KEY_DIR="$(realpath -sm "${_LOCALMSP_DIR}/keystore/")" 135 | _CERT_DIR="$(realpath -sm "${_LOCALMSP_DIR}/signcerts/")" 136 | _ADMINCERT_DIR="$(realpath -sm "${_LOCALMSP_DIR}/admincerts/")" 137 | _TLSCACERT_DIR="$(realpath -sm "${_LOCALMSP_DIR}/tlscacerts/")" 138 | _CACERT_DIR="$(realpath -sm "${_LOCALMSP_DIR}/cacerts/")" 139 | mkdir -p "${_KEY_DIR}" 140 | mkdir -p "${_CERT_DIR}" 141 | mkdir -p "${_ADMINCERT_DIR}" 142 | mkdir -p "${_TLSCACERT_DIR}" 143 | mkdir -p "${_CACERT_DIR}" 144 | 145 | # Sign cert 146 | sign "${_NAME}" "${_SUBJ}" "${_CERT_DIR}" "${_CA}" "${_CAKEY}" 147 | # _KEYFILE generated via sign command 148 | # _CERTFILE generated via sign command 149 | 150 | cp "${_CA}" "${_CACERT_DIR}" 151 | cp "${_TLSCA}" "${_TLSCACERT_DIR}" 152 | mv "${_KEYFILE}" "${_KEY_DIR}" 153 | 154 | if [ "${_WITHCONFIG}" == "true" ] 155 | then 156 | mspcfg "$(basename "${_CA}")" "${_LOCALMSP_DIR}" 157 | fi 158 | 159 | if [ -e "${_ADMIN}" ] 160 | then 161 | cp "${_ADMIN}" "${_ADMINCERT_DIR}" 162 | else 163 | cp "${_CERTFILE}" "${_ADMINCERT_DIR}" 164 | fi 165 | 166 | ######## TLS ######## 167 | _LOCALTLS_DIR="$(realpath -sm "${_OUT__}/${LOCALMSP_DIR}/${_NAME}/tls")" 168 | mkdir -p "${_LOCALTLS_DIR}" 169 | sign "${_NAME}" "${_SUBJ}" "${_LOCALTLS_DIR}" "${_TLSCA}" "${_TLSCAKEY}" "tls" 170 | cp "${_TLSCA}" "${_LOCALTLS_DIR}" 171 | 172 | ######## ORGMSP ######### 173 | if [ "${_USEORGMSP}" == "true" ] 174 | then 175 | _ORGMSP_DIR="$(realpath -sm "${_OUT__}/${ORGMSP_DIR}/${_NAME}/msp")" 176 | mkdir -p "${_ORGMSP_DIR}" 177 | cp -r "${_LOCALMSP_DIR}/admincerts/" "${_ORGMSP_DIR}/" 178 | cp -r "${_LOCALMSP_DIR}/cacerts/" "${_ORGMSP_DIR}/" 179 | cp -r "${_LOCALMSP_DIR}/tlscacerts/" "${_ORGMSP_DIR}/" 180 | 181 | if [ "${_WITHCONFIG}" == "true" ] 182 | then 183 | mspcfg "$(basename "${_CA__}")" "${_ORGMSP_DIR}" 184 | fi 185 | fi 186 | } 187 | 188 | function valiArg() { 189 | _VAL=$1 190 | _VARN=$2 191 | if [ -z "$_VAL" ]; then 192 | echo "$_VARN is blank" 193 | exit 1 194 | fi 195 | } 196 | 197 | COMMAND=$1 198 | shift 199 | 200 | if [ "${COMMAND}" == "-h" ]; then 201 | printHelp 202 | exit 1 203 | fi 204 | 205 | while getopts "n:s:o:c:k:a:C:K:Mgh" arg ; do 206 | case $arg in 207 | n) 208 | NAME="$OPTARG" 209 | ;; 210 | s) 211 | SUBJ="$OPTARG" 212 | ;; 213 | o) 214 | OUT="$OPTARG" 215 | ;; 216 | c) 217 | CA="$OPTARG" 218 | ;; 219 | k) 220 | CAKEY="$OPTARG" 221 | ;; 222 | a) 223 | ADMIN="$OPTARG" 224 | ;; 225 | C) 226 | TLSCA="$OPTARG" 227 | ;; 228 | K) 229 | TLSCAKEY="$OPTARG" 230 | ;; 231 | M) 232 | USEORGMSP="true" 233 | ;; 234 | g) 235 | WITHCONFIG="true" 236 | ;; 237 | h) 238 | printHelp 239 | exit 1 240 | ;; 241 | esac 242 | done 243 | 244 | if [ "${COMMAND}" == "selfsign" ] 245 | then 246 | valiArg "$NAME" -n 247 | valiArg "$SUBJ" -s 248 | valiArg "$OUT" -o 249 | selfSign "$NAME" "$SUBJ" "$OUT" 250 | elif [ "${COMMAND}" == "sign" ] 251 | then 252 | valiArg "$NAME" -n 253 | valiArg "$SUBJ" -s 254 | valiArg "$OUT" -o 255 | valiArg "$CA" -c 256 | valiArg "$CAKEY" -k 257 | sign "$NAME" "$SUBJ" "$OUT" "$CA" "$CAKEY" 258 | elif [ "${COMMAND}" == "msp" ] 259 | then 260 | valiArg "$NAME" -n 261 | valiArg "$SUBJ" -s 262 | valiArg "$OUT" -o 263 | valiArg "$CA" -c 264 | valiArg "$CAKEY" -k 265 | #valiArg "$ADMIN" -a 266 | valiArg "$TLSCA" -C 267 | valiArg "$TLSCAKEY" -K 268 | msp "$NAME" "$SUBJ" "$OUT" "$CA" "$CAKEY" "$ADMIN" "$TLSCA" "$TLSCAKEY" "$USEORGMSP" "$WITHCONFIG" 269 | else 270 | printHelp 271 | exit 1 272 | fi 273 | -------------------------------------------------------------------------------- /utils/setparas.sh: -------------------------------------------------------------------------------- 1 | # This is to be used in cli container, to connect peer and execute peer commands. 2 | # This is only for example of the vehiclesharing channel, and there are many assumptions. 3 | 4 | export CLI_TIMEOUT=10 5 | export CLI_DELAY=3 6 | 7 | export CRYPTO_PATH="/etc/hyperledger/fabric" 8 | export CHANNEL_NAME="vschannel" 9 | 10 | # To export the environment variables for orderer. It is identical for all commands, in this case. 11 | export ORDERER_CA="${CRYPTO_PATH}/orgmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem" 12 | export ORDERER_ADDRESS="orderer.bctest.example.com:7050" 13 | 14 | # To export the environment variables for admin@bctest.example.com. 15 | envAdminBctest() { 16 | export CORE_PEER_LOCALMSPID="OrdererMSP" 17 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/orderer.bctest.example.com/msp/tlscacerts/tlsca.bctest.example.com.pem" 18 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@bctest.example.com/msp" 19 | } 20 | 21 | # To export the environment variables for admin@onlinepay.example.com. 22 | envAdminOnlinePay() { 23 | export CORE_PEER_LOCALMSPID="OnlinePayMSP" 24 | export CORE_PEER_ADDRESS="peer0.onlinepay.example.com:7051" 25 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/peer0.onlinepay.example.com/msp/tlscacerts/tlsca.onlinepay.example.com.pem" 26 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@onlinepay.example.com/msp" 27 | } 28 | 29 | # To export the environment variables for admin@sharing.example.com. 30 | envAdminSharing() { 31 | export CORE_PEER_LOCALMSPID="SharingMSP" 32 | export CORE_PEER_ADDRESS="peer0.sharing.example.com:7051" 33 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/peer0.sharing.example.com/msp/tlscacerts/tlsca.sharing.example.com.pem" 34 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@sharing.example.com/msp" 35 | } 36 | 37 | # To export the environment variables for admin@vehicle.example.com. 38 | envAdminVehicle() { 39 | export CORE_PEER_LOCALMSPID="VehicleMSP" 40 | export CORE_PEER_ADDRESS="peer0.vehicle.example.com:7051" 41 | export CORE_PEER_TLS_ROOTCERT_FILE="${CRYPTO_PATH}/orgmsp/peer0.vehicle.example.com/msp/tlscacerts/tlsca.vehicle.example.com.pem" 42 | export CORE_PEER_MSPCONFIGPATH="${CRYPTO_PATH}/localmsp/admin@vehicle.example.com/msp" 43 | } 44 | 45 | opt=$1 46 | 47 | if [ "${opt}" == "adminBctest" ]; then 48 | envAdminBctest 49 | elif [ "${opt}" == "adminOnlinePay" ]; then 50 | envAdminOnlinePay 51 | elif [ "${opt}" == "adminSharing" ]; then 52 | envAdminSharing 53 | elif [ "${opt}" == "adminVehicle" ]; then 54 | envAdminVehicle 55 | else 56 | echo "Please specify the identity." 57 | fi 58 | 59 | # env | grep CORE_PEER --------------------------------------------------------------------------------