├── LICENSE ├── README.md ├── chaincode ├── edu.go ├── go.mod ├── go.sum └── vendor │ ├── github.com │ ├── golang │ │ └── protobuf │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ ├── proto │ │ │ ├── clone.go │ │ │ ├── decode.go │ │ │ ├── deprecated.go │ │ │ ├── discard.go │ │ │ ├── encode.go │ │ │ ├── equal.go │ │ │ ├── extensions.go │ │ │ ├── lib.go │ │ │ ├── message_set.go │ │ │ ├── pointer_reflect.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── properties.go │ │ │ ├── table_marshal.go │ │ │ ├── table_merge.go │ │ │ ├── table_unmarshal.go │ │ │ ├── text.go │ │ │ └── text_parser.go │ │ │ └── ptypes │ │ │ ├── any.go │ │ │ ├── any │ │ │ ├── any.pb.go │ │ │ └── any.proto │ │ │ ├── doc.go │ │ │ ├── duration.go │ │ │ ├── duration │ │ │ ├── duration.pb.go │ │ │ └── duration.proto │ │ │ ├── empty │ │ │ ├── empty.pb.go │ │ │ └── empty.proto │ │ │ ├── timestamp.go │ │ │ └── timestamp │ │ │ ├── timestamp.pb.go │ │ │ └── timestamp.proto │ └── hyperledger │ │ ├── fabric-chaincode-go │ │ ├── LICENSE │ │ └── shim │ │ │ ├── chaincodeserver.go │ │ │ ├── handler.go │ │ │ ├── interfaces.go │ │ │ ├── internal │ │ │ ├── client.go │ │ │ ├── config.go │ │ │ └── server.go │ │ │ ├── response.go │ │ │ ├── shim.go │ │ │ └── stub.go │ │ └── fabric-protos-go │ │ ├── LICENSE │ │ ├── common │ │ ├── collection.pb.go │ │ ├── common.pb.go │ │ ├── configtx.pb.go │ │ ├── configuration.pb.go │ │ ├── ledger.pb.go │ │ └── policies.pb.go │ │ ├── ledger │ │ ├── queryresult │ │ │ └── kv_query_result.pb.go │ │ └── rwset │ │ │ └── rwset.pb.go │ │ ├── msp │ │ ├── identities.pb.go │ │ ├── msp_config.pb.go │ │ └── msp_principal.pb.go │ │ └── peer │ │ ├── chaincode.pb.go │ │ ├── chaincode_event.pb.go │ │ ├── chaincode_shim.pb.go │ │ ├── collection.pb.go │ │ ├── configuration.pb.go │ │ ├── events.pb.go │ │ ├── peer.pb.go │ │ ├── policy.pb.go │ │ ├── proposal.pb.go │ │ ├── proposal_response.pb.go │ │ ├── query.pb.go │ │ ├── resources.pb.go │ │ ├── signed_cc_dep_spec.pb.go │ │ ├── snapshot.pb.go │ │ └── transaction.pb.go │ ├── golang.org │ └── x │ │ ├── net │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── http │ │ │ └── httpguts │ │ │ │ ├── guts.go │ │ │ │ └── httplex.go │ │ ├── http2 │ │ │ ├── .gitignore │ │ │ ├── Dockerfile │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── ciphers.go │ │ │ ├── client_conn_pool.go │ │ │ ├── databuffer.go │ │ │ ├── errors.go │ │ │ ├── flow.go │ │ │ ├── frame.go │ │ │ ├── go111.go │ │ │ ├── gotrack.go │ │ │ ├── headermap.go │ │ │ ├── hpack │ │ │ │ ├── encode.go │ │ │ │ ├── hpack.go │ │ │ │ ├── huffman.go │ │ │ │ └── tables.go │ │ │ ├── http2.go │ │ │ ├── not_go111.go │ │ │ ├── pipe.go │ │ │ ├── server.go │ │ │ ├── transport.go │ │ │ ├── write.go │ │ │ ├── writesched.go │ │ │ ├── writesched_priority.go │ │ │ └── writesched_random.go │ │ ├── idna │ │ │ ├── idna10.0.0.go │ │ │ ├── idna9.0.0.go │ │ │ ├── punycode.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ ├── trie.go │ │ │ └── trieval.go │ │ ├── internal │ │ │ └── timeseries │ │ │ │ └── timeseries.go │ │ └── trace │ │ │ ├── events.go │ │ │ ├── histogram.go │ │ │ └── trace.go │ │ ├── sys │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── unix │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── affinity_linux.go │ │ │ ├── aliases.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── asm_darwin_arm64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_freebsd_arm.s │ │ │ ├── asm_freebsd_arm64.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_riscv64.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_netbsd_arm64.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_openbsd_arm.s │ │ │ ├── asm_openbsd_arm64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── cap_freebsd.go │ │ │ ├── constants.go │ │ │ ├── dev_aix_ppc.go │ │ │ ├── dev_aix_ppc64.go │ │ │ ├── dev_darwin.go │ │ │ ├── dev_dragonfly.go │ │ │ ├── dev_freebsd.go │ │ │ ├── dev_linux.go │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── errors_freebsd_386.go │ │ │ ├── errors_freebsd_amd64.go │ │ │ ├── errors_freebsd_arm.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── ioctl.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── pagesize_unix.go │ │ │ ├── pledge_openbsd.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── readdirent_getdirentries.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_aix.go │ │ │ ├── syscall_aix_ppc.go │ │ │ ├── syscall_aix_ppc64.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_386.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_darwin_libSystem.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.go │ │ │ ├── syscall_freebsd_arm64.go │ │ │ ├── syscall_linux.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_linux_amd64.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── syscall_linux_arm.go │ │ │ ├── syscall_linux_arm64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_linux_gccgo_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc64x.go │ │ │ ├── syscall_linux_riscv64.go │ │ │ ├── syscall_linux_s390x.go │ │ │ ├── syscall_linux_sparc64.go │ │ │ ├── syscall_netbsd.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_netbsd_arm64.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── syscall_openbsd_arm64.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ ├── timestruct.go │ │ │ ├── unveil_openbsd.go │ │ │ ├── xattr_bsd.go │ │ │ ├── zerrors_aix_ppc.go │ │ │ ├── zerrors_aix_ppc64.go │ │ │ ├── zerrors_darwin_386.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm.go │ │ │ ├── zerrors_darwin_arm64.go │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ ├── zerrors_freebsd_386.go │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ ├── zerrors_freebsd_arm.go │ │ │ ├── zerrors_freebsd_arm64.go │ │ │ ├── zerrors_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.go │ │ │ ├── zerrors_linux_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_riscv64.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_netbsd_arm64.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_openbsd_arm.go │ │ │ ├── zerrors_openbsd_arm64.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zptrace386_linux.go │ │ │ ├── zptracearm_linux.go │ │ │ ├── zptracemips_linux.go │ │ │ ├── zptracemipsle_linux.go │ │ │ ├── zsyscall_aix_ppc.go │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ ├── zsyscall_darwin_386.1_11.go │ │ │ ├── zsyscall_darwin_386.go │ │ │ ├── zsyscall_darwin_386.s │ │ │ ├── zsyscall_darwin_amd64.1_11.go │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ ├── zsyscall_darwin_arm.1_11.go │ │ │ ├── zsyscall_darwin_arm.go │ │ │ ├── zsyscall_darwin_arm.s │ │ │ ├── zsyscall_darwin_arm64.1_11.go │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_darwin_arm64.s │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ ├── zsyscall_freebsd_arm64.go │ │ │ ├── zsyscall_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_riscv64.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_netbsd_arm64.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ ├── zsyscall_openbsd_arm64.go │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsysctl_openbsd_386.go │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ ├── zsysnum_darwin_386.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm.go │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ ├── zsysnum_freebsd_386.go │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ ├── zsysnum_freebsd_arm.go │ │ │ ├── zsysnum_freebsd_arm64.go │ │ │ ├── zsysnum_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_riscv64.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_netbsd_arm64.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ ├── zsysnum_openbsd_arm64.go │ │ │ ├── ztypes_aix_ppc.go │ │ │ ├── ztypes_aix_ppc64.go │ │ │ ├── ztypes_darwin_386.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm.go │ │ │ ├── ztypes_darwin_arm64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_freebsd_arm.go │ │ │ ├── ztypes_freebsd_arm64.go │ │ │ ├── ztypes_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.go │ │ │ ├── ztypes_linux_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_riscv64.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_netbsd_arm64.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ ├── ztypes_openbsd_arm.go │ │ │ ├── ztypes_openbsd_arm64.go │ │ │ └── ztypes_solaris_amd64.go │ │ └── text │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── secure │ │ └── bidirule │ │ │ ├── bidirule.go │ │ │ ├── bidirule10.0.0.go │ │ │ └── bidirule9.0.0.go │ │ ├── transform │ │ └── transform.go │ │ └── unicode │ │ ├── bidi │ │ ├── bidi.go │ │ ├── bracket.go │ │ ├── core.go │ │ ├── prop.go │ │ ├── tables10.0.0.go │ │ ├── tables9.0.0.go │ │ └── trieval.go │ │ └── norm │ │ ├── composition.go │ │ ├── forminfo.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── normalize.go │ │ ├── readwriter.go │ │ ├── tables10.0.0.go │ │ ├── tables9.0.0.go │ │ ├── transform.go │ │ └── trie.go │ ├── google.golang.org │ ├── genproto │ │ ├── LICENSE │ │ └── googleapis │ │ │ └── rpc │ │ │ └── status │ │ │ └── status.pb.go │ └── grpc │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── backoff.go │ │ ├── balancer.go │ │ ├── balancer │ │ ├── balancer.go │ │ ├── base │ │ │ ├── balancer.go │ │ │ └── base.go │ │ └── roundrobin │ │ │ └── roundrobin.go │ │ ├── balancer_conn_wrappers.go │ │ ├── balancer_v1_wrapper.go │ │ ├── binarylog │ │ └── grpc_binarylog_v1 │ │ │ └── binarylog.pb.go │ │ ├── call.go │ │ ├── clientconn.go │ │ ├── codec.go │ │ ├── codegen.sh │ │ ├── codes │ │ ├── code_string.go │ │ └── codes.go │ │ ├── connectivity │ │ └── connectivity.go │ │ ├── credentials │ │ ├── credentials.go │ │ ├── internal │ │ │ ├── syscallconn.go │ │ │ └── syscallconn_appengine.go │ │ └── tls13.go │ │ ├── dialoptions.go │ │ ├── doc.go │ │ ├── encoding │ │ ├── encoding.go │ │ └── proto │ │ │ └── proto.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── grpclog │ │ ├── grpclog.go │ │ ├── logger.go │ │ └── loggerv2.go │ │ ├── install_gae.sh │ │ ├── interceptor.go │ │ ├── internal │ │ ├── backoff │ │ │ └── backoff.go │ │ ├── balancerload │ │ │ └── load.go │ │ ├── binarylog │ │ │ ├── binarylog.go │ │ │ ├── binarylog_testutil.go │ │ │ ├── env_config.go │ │ │ ├── method_logger.go │ │ │ ├── regenerate.sh │ │ │ ├── sink.go │ │ │ └── util.go │ │ ├── channelz │ │ │ ├── funcs.go │ │ │ ├── types.go │ │ │ ├── types_linux.go │ │ │ ├── types_nonlinux.go │ │ │ ├── util_linux.go │ │ │ └── util_nonlinux.go │ │ ├── envconfig │ │ │ └── envconfig.go │ │ ├── grpcrand │ │ │ └── grpcrand.go │ │ ├── grpcsync │ │ │ └── event.go │ │ ├── internal.go │ │ ├── syscall │ │ │ ├── syscall_linux.go │ │ │ └── syscall_nonlinux.go │ │ └── transport │ │ │ ├── bdp_estimator.go │ │ │ ├── controlbuf.go │ │ │ ├── defaults.go │ │ │ ├── flowcontrol.go │ │ │ ├── handler_server.go │ │ │ ├── http2_client.go │ │ │ ├── http2_server.go │ │ │ ├── http_util.go │ │ │ ├── log.go │ │ │ └── transport.go │ │ ├── keepalive │ │ └── keepalive.go │ │ ├── metadata │ │ └── metadata.go │ │ ├── naming │ │ ├── dns_resolver.go │ │ └── naming.go │ │ ├── peer │ │ └── peer.go │ │ ├── picker_wrapper.go │ │ ├── pickfirst.go │ │ ├── preloader.go │ │ ├── proxy.go │ │ ├── resolver │ │ ├── dns │ │ │ └── dns_resolver.go │ │ ├── passthrough │ │ │ └── passthrough.go │ │ └── resolver.go │ │ ├── resolver_conn_wrapper.go │ │ ├── rpc_util.go │ │ ├── server.go │ │ ├── service_config.go │ │ ├── serviceconfig │ │ └── serviceconfig.go │ │ ├── stats │ │ ├── handlers.go │ │ └── stats.go │ │ ├── status │ │ └── status.go │ │ ├── stream.go │ │ ├── tap │ │ └── tap.go │ │ ├── trace.go │ │ ├── version.go │ │ └── vet.sh │ └── modules.txt ├── clean_docker.sh ├── config.yaml ├── education ├── fixtures ├── channel-artifacts │ ├── Org1MSPanchors.tx │ ├── channel.tx │ └── genesis.block ├── configtx.yaml ├── crypto-config.yaml ├── crypto-config │ ├── ordererOrganizations │ │ └── example.com │ │ │ ├── ca │ │ │ ├── ca.example.com-cert.pem │ │ │ └── priv_sk │ │ │ ├── msp │ │ │ ├── cacerts │ │ │ │ └── ca.example.com-cert.pem │ │ │ ├── config.yaml │ │ │ └── tlscacerts │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ ├── orderers │ │ │ └── orderer.example.com │ │ │ │ ├── msp │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.example.com-cert.pem │ │ │ │ ├── config.yaml │ │ │ │ ├── keystore │ │ │ │ │ └── priv_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── orderer.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ │ ├── tlsca │ │ │ ├── priv_sk │ │ │ └── tlsca.example.com-cert.pem │ │ │ └── users │ │ │ └── Admin@example.com │ │ │ ├── msp │ │ │ ├── cacerts │ │ │ │ └── ca.example.com-cert.pem │ │ │ ├── config.yaml │ │ │ ├── keystore │ │ │ │ └── priv_sk │ │ │ ├── signcerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── client.crt │ │ │ └── client.key │ └── peerOrganizations │ │ └── org1.example.com │ │ ├── ca │ │ ├── ca.org1.example.com-cert.pem │ │ └── priv_sk │ │ ├── msp │ │ ├── cacerts │ │ │ └── ca.org1.example.com-cert.pem │ │ ├── config.yaml │ │ └── tlscacerts │ │ │ └── tlsca.org1.example.com-cert.pem │ │ ├── peers │ │ ├── peer0.org1.example.com │ │ │ ├── msp │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ │ ├── config.yaml │ │ │ │ ├── keystore │ │ │ │ │ └── priv_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── peer0.org1.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ └── peer1.org1.example.com │ │ │ ├── msp │ │ │ ├── cacerts │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ ├── config.yaml │ │ │ ├── keystore │ │ │ │ └── priv_sk │ │ │ ├── signcerts │ │ │ │ └── peer1.org1.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ │ ├── tlsca │ │ ├── priv_sk │ │ └── tlsca.org1.example.com-cert.pem │ │ └── users │ │ ├── Admin@org1.example.com │ │ ├── msp │ │ │ ├── cacerts │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ ├── config.yaml │ │ │ ├── keystore │ │ │ │ └── priv_sk │ │ │ ├── signcerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── client.crt │ │ │ └── client.key │ │ └── User1@org1.example.com │ │ ├── msp │ │ ├── cacerts │ │ │ └── ca.org1.example.com-cert.pem │ │ ├── config.yaml │ │ ├── keystore │ │ │ └── priv_sk │ │ ├── signcerts │ │ │ └── User1@org1.example.com-cert.pem │ │ └── tlscacerts │ │ │ └── tlsca.org1.example.com-cert.pem │ │ └── tls │ │ ├── ca.crt │ │ ├── client.crt │ │ └── client.key └── docker-compose.yaml ├── go.mod ├── go.sum ├── img ├── createchannel.png ├── docker_ps.png ├── dockercompose_down.png ├── dockercompose_down2.png ├── dockercompose_up.png ├── findEduByCertNoAndName.png ├── findEduInfoByEntityID.png ├── html │ ├── help.png │ ├── help2.png │ ├── help3.png │ ├── index.png │ ├── login.png │ ├── query.png │ ├── queryResult.png │ └── 详情.png ├── html_addEdu.png ├── html_addEdu_info.png ├── html_help.png ├── html_index.png ├── html_login.png ├── html_modify.png ├── html_modifyResult.png ├── html_query.png ├── html_query2.png ├── html_queryResultbycert.png ├── html_queryResultbyentityid.png ├── installcc.png ├── modifyEdu.png ├── networkArch.png ├── projectArch.png ├── saveedu.png ├── update_findEduByCertNoAndName.png └── update_findEduInfoByEntityID.png ├── main.go ├── sdkInit ├── integration.go ├── sdkInfo.go └── sdkSetting.go ├── service ├── domain.go └── eduService.go └── web ├── controller ├── controllerHandler.go ├── controllerResponse.go ├── upload.go └── userInfo.go ├── static ├── css │ ├── addEdu.css │ ├── bootstrap.min.css │ ├── help.css │ ├── index.css │ ├── login.css │ ├── query.css │ ├── queryResult.css │ └── reset.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ ├── head.jpg │ ├── icon_input.png │ ├── icon_list.png │ ├── logo.png │ └── vline.gif └── js │ ├── bootstrap.min.js │ └── jquery.min.js ├── tpl ├── addEdu.html ├── favicon.ico ├── help.html ├── index.html ├── login.html ├── modify.html ├── query.html ├── query2.html └── queryResult.html └── webServer.go /README.md: -------------------------------------------------------------------------------- 1 | # education 2 | 将`GOPATH`设置为`/root/go`,拉取项目: 3 | ``` 4 | cd $GOPATH/src && git clone https://github.com/sxguan/education.git 5 | ``` 6 | 在`/etc/hosts`中添加: 7 | ``` 8 | 127.0.0.1 orderer.example.com 9 | 127.0.0.1 peer0.org1.example.com 10 | 127.0.0.1 peer1.org1.example.com 11 | ``` 12 | 添加依赖: 13 | ``` 14 | cd education && go mod tidy 15 | ``` 16 | 运行项目: 17 | ``` 18 | ./clean_docker.sh 19 | ``` 20 | 在`127.0.0.1:9000`进行访问 21 | -------------------------------------------------------------------------------- /chaincode/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/kongyixueyuan.com/education/chaincode 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/hyperledger/fabric-chaincode-go v0.0.0-20201119163726-f8ef75b17719 7 | github.com/hyperledger/fabric-protos-go v0.0.0-20210127161553-4f432a78f286 8 | ) 9 | -------------------------------------------------------------------------------- /chaincode/vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/github.com/golang/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /chaincode/vendor/github.com/hyperledger/fabric-chaincode-go/shim/internal/client.go: -------------------------------------------------------------------------------- 1 | // Copyright the Hyperledger Fabric contributors. All rights reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package internal 5 | 6 | import ( 7 | "context" 8 | "crypto/tls" 9 | "time" 10 | 11 | peerpb "github.com/hyperledger/fabric-protos-go/peer" 12 | "google.golang.org/grpc" 13 | "google.golang.org/grpc/credentials" 14 | "google.golang.org/grpc/keepalive" 15 | ) 16 | 17 | const ( 18 | dialTimeout = 10 * time.Second 19 | maxRecvMessageSize = 100 * 1024 * 1024 // 100 MiB 20 | maxSendMessageSize = 100 * 1024 * 1024 // 100 MiB 21 | ) 22 | 23 | // NewClientConn ... 24 | func NewClientConn( 25 | address string, 26 | tlsConf *tls.Config, 27 | kaOpts keepalive.ClientParameters, 28 | ) (*grpc.ClientConn, error) { 29 | 30 | dialOpts := []grpc.DialOption{ 31 | grpc.WithKeepaliveParams(kaOpts), 32 | grpc.WithBlock(), 33 | grpc.FailOnNonTempDialError(true), 34 | grpc.WithDefaultCallOptions( 35 | grpc.MaxCallRecvMsgSize(maxRecvMessageSize), 36 | grpc.MaxCallSendMsgSize(maxSendMessageSize), 37 | ), 38 | } 39 | 40 | if tlsConf != nil { 41 | creds := credentials.NewTLS(tlsConf) 42 | dialOpts = append(dialOpts, grpc.WithTransportCredentials(creds)) 43 | } else { 44 | dialOpts = append(dialOpts, grpc.WithInsecure()) 45 | } 46 | 47 | ctx, cancel := context.WithTimeout(context.Background(), dialTimeout) 48 | defer cancel() 49 | return grpc.DialContext(ctx, address, dialOpts...) 50 | } 51 | 52 | // NewRegisterClient ... 53 | func NewRegisterClient(conn *grpc.ClientConn) (peerpb.ChaincodeSupport_RegisterClient, error) { 54 | return peerpb.NewChaincodeSupportClient(conn).Register(context.Background()) 55 | } 56 | -------------------------------------------------------------------------------- /chaincode/vendor/github.com/hyperledger/fabric-chaincode-go/shim/response.go: -------------------------------------------------------------------------------- 1 | // Copyright the Hyperledger Fabric contributors. All rights reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package shim 5 | 6 | import ( 7 | pb "github.com/hyperledger/fabric-protos-go/peer" 8 | ) 9 | 10 | const ( 11 | // OK constant - status code less than 400, endorser will endorse it. 12 | // OK means init or invoke successfully. 13 | OK = 200 14 | 15 | // ERRORTHRESHOLD constant - status code greater than or equal to 400 will be considered an error and rejected by endorser. 16 | ERRORTHRESHOLD = 400 17 | 18 | // ERROR constant - default error value 19 | ERROR = 500 20 | ) 21 | 22 | // Success ... 23 | func Success(payload []byte) pb.Response { 24 | return pb.Response{ 25 | Status: OK, 26 | Payload: payload, 27 | } 28 | } 29 | 30 | // Error ... 31 | func Error(msg string) pb.Response { 32 | return pb.Response{ 33 | Status: ERROR, 34 | Message: msg, 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http/httpguts/guts.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package httpguts provides functions implementing various details 6 | // of the HTTP specification. 7 | // 8 | // This package is shared by the standard library (which vendors it) 9 | // and x/net/http2. It comes with no API stability promise. 10 | package httpguts 11 | 12 | import ( 13 | "net/textproto" 14 | "strings" 15 | ) 16 | 17 | // ValidTrailerHeader reports whether name is a valid header field name to appear 18 | // in trailers. 19 | // See RFC 7230, Section 4.1.2 20 | func ValidTrailerHeader(name string) bool { 21 | name = textproto.CanonicalMIMEHeaderKey(name) 22 | if strings.HasPrefix(name, "If-") || badTrailer[name] { 23 | return false 24 | } 25 | return true 26 | } 27 | 28 | var badTrailer = map[string]bool{ 29 | "Authorization": true, 30 | "Cache-Control": true, 31 | "Connection": true, 32 | "Content-Encoding": true, 33 | "Content-Length": true, 34 | "Content-Range": true, 35 | "Content-Type": true, 36 | "Expect": true, 37 | "Host": true, 38 | "Keep-Alive": true, 39 | "Max-Forwards": true, 40 | "Pragma": true, 41 | "Proxy-Authenticate": true, 42 | "Proxy-Authorization": true, 43 | "Proxy-Connection": true, 44 | "Range": true, 45 | "Realm": true, 46 | "Te": true, 47 | "Trailer": true, 48 | "Transfer-Encoding": true, 49 | "Www-Authenticate": true, 50 | } 51 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | h2i/h2i 3 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # This Dockerfile builds a recent curl with HTTP/2 client support, using 3 | # a recent nghttp2 build. 4 | # 5 | # See the Makefile for how to tag it. If Docker and that image is found, the 6 | # Go tests use this curl binary for integration tests. 7 | # 8 | 9 | FROM ubuntu:trusty 10 | 11 | RUN apt-get update && \ 12 | apt-get upgrade -y && \ 13 | apt-get install -y git-core build-essential wget 14 | 15 | RUN apt-get install -y --no-install-recommends \ 16 | autotools-dev libtool pkg-config zlib1g-dev \ 17 | libcunit1-dev libssl-dev libxml2-dev libevent-dev \ 18 | automake autoconf 19 | 20 | # The list of packages nghttp2 recommends for h2load: 21 | RUN apt-get install -y --no-install-recommends make binutils \ 22 | autoconf automake autotools-dev \ 23 | libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev \ 24 | libev-dev libevent-dev libjansson-dev libjemalloc-dev \ 25 | cython python3.4-dev python-setuptools 26 | 27 | # Note: setting NGHTTP2_VER before the git clone, so an old git clone isn't cached: 28 | ENV NGHTTP2_VER 895da9a 29 | RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git 30 | 31 | WORKDIR /root/nghttp2 32 | RUN git reset --hard $NGHTTP2_VER 33 | RUN autoreconf -i 34 | RUN automake 35 | RUN autoconf 36 | RUN ./configure 37 | RUN make 38 | RUN make install 39 | 40 | WORKDIR /root 41 | RUN wget http://curl.haxx.se/download/curl-7.45.0.tar.gz 42 | RUN tar -zxvf curl-7.45.0.tar.gz 43 | WORKDIR /root/curl-7.45.0 44 | RUN ./configure --with-ssl --with-nghttp2=/usr/local 45 | RUN make 46 | RUN make install 47 | RUN ldconfig 48 | 49 | CMD ["-h"] 50 | ENTRYPOINT ["/usr/local/bin/curl"] 51 | 52 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/Makefile: -------------------------------------------------------------------------------- 1 | curlimage: 2 | docker build -t gohttp2/curl . 3 | 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/README: -------------------------------------------------------------------------------- 1 | This is a work-in-progress HTTP/2 implementation for Go. 2 | 3 | It will eventually live in the Go standard library and won't require 4 | any changes to your code to use. It will just be automatic. 5 | 6 | Status: 7 | 8 | * The server support is pretty good. A few things are missing 9 | but are being worked on. 10 | * The client work has just started but shares a lot of code 11 | is coming along much quicker. 12 | 13 | Docs are at https://godoc.org/golang.org/x/net/http2 14 | 15 | Demo test server at https://http2.golang.org/ 16 | 17 | Help & bug reports welcome! 18 | 19 | Contributing: https://golang.org/doc/contribute.html 20 | Bugs: https://golang.org/issue/new?title=x/net/http2:+ 21 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/flow.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Flow control 6 | 7 | package http2 8 | 9 | // flow is the flow control window's size. 10 | type flow struct { 11 | // n is the number of DATA bytes we're allowed to send. 12 | // A flow is kept both on a conn and a per-stream. 13 | n int32 14 | 15 | // conn points to the shared connection-level flow that is 16 | // shared by all streams on that conn. It is nil for the flow 17 | // that's on the conn directly. 18 | conn *flow 19 | } 20 | 21 | func (f *flow) setConnFlow(cf *flow) { f.conn = cf } 22 | 23 | func (f *flow) available() int32 { 24 | n := f.n 25 | if f.conn != nil && f.conn.n < n { 26 | n = f.conn.n 27 | } 28 | return n 29 | } 30 | 31 | func (f *flow) take(n int32) { 32 | if n > f.available() { 33 | panic("internal error: took too much") 34 | } 35 | f.n -= n 36 | if f.conn != nil { 37 | f.conn.n -= n 38 | } 39 | } 40 | 41 | // add adds n bytes (positive or negative) to the flow control window. 42 | // It returns false if the sum would exceed 2^31-1. 43 | func (f *flow) add(n int32) bool { 44 | sum := f.n + n 45 | if (sum > n) == (f.n > 0) { 46 | f.n = sum 47 | return true 48 | } 49 | return false 50 | } 51 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.11 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http/httptrace" 11 | "net/textproto" 12 | ) 13 | 14 | func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { 15 | return trace != nil && trace.WroteHeaderField != nil 16 | } 17 | 18 | func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) { 19 | if trace != nil && trace.WroteHeaderField != nil { 20 | trace.WroteHeaderField(k, []string{v}) 21 | } 22 | } 23 | 24 | func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { 25 | if trace != nil { 26 | return trace.Got1xxResponse 27 | } 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/net/http2/not_go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.11 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http/httptrace" 11 | "net/textproto" 12 | ) 13 | 14 | func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { return false } 15 | 16 | func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {} 17 | 18 | func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 23 | CALL runtime·entersyscall(SB) 24 | MOVQ a1+8(FP), DI 25 | MOVQ a2+16(FP), SI 26 | MOVQ a3+24(FP), DX 27 | MOVQ $0, R10 28 | MOVQ $0, R8 29 | MOVQ $0, R9 30 | MOVQ trap+0(FP), AX // syscall entry 31 | SYSCALL 32 | MOVQ AX, r1+32(FP) 33 | MOVQ DX, r2+40(FP) 34 | CALL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOVQ a1+8(FP), DI 45 | MOVQ a2+16(FP), SI 46 | MOVQ a3+24(FP), DX 47 | MOVQ $0, R10 48 | MOVQ $0, R8 49 | MOVQ $0, R9 50 | MOVQ trap+0(FP), AX // syscall entry 51 | SYSCALL 52 | MOVQ AX, r1+32(FP) 53 | MOVQ DX, r2+40(FP) 54 | RET 55 | 56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 57 | JMP syscall·gettimeofday(SB) 58 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 23 | BL runtime·entersyscall(SB) 24 | MOVW trap+0(FP), R7 25 | MOVW a1+4(FP), R0 26 | MOVW a2+8(FP), R1 27 | MOVW a3+12(FP), R2 28 | MOVW $0, R3 29 | MOVW $0, R4 30 | MOVW $0, R5 31 | SWI $0 32 | MOVW R0, r1+16(FP) 33 | MOVW $0, R0 34 | MOVW R0, r2+20(FP) 35 | BL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 39 | B syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 42 | B syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 45 | MOVW trap+0(FP), R7 // syscall entry 46 | MOVW a1+4(FP), R0 47 | MOVW a2+8(FP), R1 48 | MOVW a3+12(FP), R2 49 | SWI $0 50 | MOVW R0, r1+16(FP) 51 | MOVW $0, R0 52 | MOVW R0, r2+20(FP) 53 | RET 54 | 55 | TEXT ·seek(SB),NOSPLIT,$0-28 56 | B syscall·seek(SB) 57 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 21 | BL runtime·entersyscall(SB) 22 | MOVD a1+8(FP), R0 23 | MOVD a2+16(FP), R1 24 | MOVD a3+24(FP), R2 25 | MOVD $0, R3 26 | MOVD $0, R4 27 | MOVD $0, R5 28 | MOVD trap+0(FP), R8 // syscall entry 29 | SVC 30 | MOVD R0, r1+32(FP) // r1 31 | MOVD R1, r2+40(FP) // r2 32 | BL runtime·exitsyscall(SB) 33 | RET 34 | 35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 36 | B syscall·RawSyscall(SB) 37 | 38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 39 | B syscall·RawSyscall6(SB) 40 | 41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 42 | MOVD a1+8(FP), R0 43 | MOVD a2+16(FP), R1 44 | MOVD a3+24(FP), R2 45 | MOVD $0, R3 46 | MOVD $0, R4 47 | MOVD $0, R5 48 | MOVD trap+0(FP), R8 // syscall entry 49 | SVC 50 | MOVD R0, r1+32(FP) 51 | MOVD R1, r2+40(FP) 52 | RET 53 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 25 | JAL runtime·entersyscall(SB) 26 | MOVV a1+8(FP), R4 27 | MOVV a2+16(FP), R5 28 | MOVV a3+24(FP), R6 29 | MOVV R0, R7 30 | MOVV R0, R8 31 | MOVV R0, R9 32 | MOVV trap+0(FP), R2 // syscall entry 33 | SYSCALL 34 | MOVV R2, r1+32(FP) 35 | MOVV R3, r2+40(FP) 36 | JAL runtime·exitsyscall(SB) 37 | RET 38 | 39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 40 | JMP syscall·RawSyscall(SB) 41 | 42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 43 | JMP syscall·RawSyscall6(SB) 44 | 45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 46 | MOVV a1+8(FP), R4 47 | MOVV a2+16(FP), R5 48 | MOVV a3+24(FP), R6 49 | MOVV R0, R7 50 | MOVV R0, R8 51 | MOVV R0, R9 52 | MOVV trap+0(FP), R2 // syscall entry 53 | SYSCALL 54 | MOVV R2, r1+32(FP) 55 | MOVV R3, r2+40(FP) 56 | RET 57 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips mipsle 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-28 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 28 | JAL runtime·entersyscall(SB) 29 | MOVW a1+4(FP), R4 30 | MOVW a2+8(FP), R5 31 | MOVW a3+12(FP), R6 32 | MOVW R0, R7 33 | MOVW trap+0(FP), R2 // syscall entry 34 | SYSCALL 35 | MOVW R2, r1+16(FP) // r1 36 | MOVW R3, r2+20(FP) // r2 37 | JAL runtime·exitsyscall(SB) 38 | RET 39 | 40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 41 | JMP syscall·RawSyscall(SB) 42 | 43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 44 | JMP syscall·RawSyscall6(SB) 45 | 46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 47 | MOVW a1+4(FP), R4 48 | MOVW a2+8(FP), R5 49 | MOVW a3+12(FP), R6 50 | MOVW trap+0(FP), R2 // syscall entry 51 | SYSCALL 52 | MOVW R2, r1+16(FP) 53 | MOVW R3, r2+20(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R3 21 | MOVD a2+16(FP), R4 22 | MOVD a3+24(FP), R5 23 | MOVD R0, R6 24 | MOVD R0, R7 25 | MOVD R0, R8 26 | MOVD trap+0(FP), R9 // syscall entry 27 | SYSCALL R9 28 | MOVD R3, r1+32(FP) 29 | MOVD R4, r2+40(FP) 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 34 | MOVD a1+8(FP), R3 35 | MOVD a2+16(FP), R4 36 | MOVD a3+24(FP), R5 37 | MOVD R0, R6 38 | MOVD R0, R7 39 | MOVD R0, R8 40 | MOVD trap+0(FP), R9 // syscall entry 41 | SYSCALL R9 42 | MOVD R3, r1+32(FP) 43 | MOVD R4, r2+40(FP) 44 | RET 45 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build riscv64,!gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for linux/riscv64. 11 | // 12 | // Where available, just jump to package syscall's implementation of 13 | // these functions. 14 | 15 | TEXT ·Syscall(SB),NOSPLIT,$0-56 16 | JMP syscall·Syscall(SB) 17 | 18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 19 | JMP syscall·Syscall6(SB) 20 | 21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 22 | CALL runtime·entersyscall(SB) 23 | MOV a1+8(FP), A0 24 | MOV a2+16(FP), A1 25 | MOV a3+24(FP), A2 26 | MOV $0, A3 27 | MOV $0, A4 28 | MOV $0, A5 29 | MOV $0, A6 30 | MOV trap+0(FP), A7 // syscall entry 31 | ECALL 32 | MOV A0, r1+32(FP) // r1 33 | MOV A1, r2+40(FP) // r2 34 | CALL runtime·exitsyscall(SB) 35 | RET 36 | 37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 38 | JMP syscall·RawSyscall(SB) 39 | 40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 41 | JMP syscall·RawSyscall6(SB) 42 | 43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 44 | MOV a1+8(FP), A0 45 | MOV a2+16(FP), A1 46 | MOV a3+24(FP), A2 47 | MOV ZERO, A3 48 | MOV ZERO, A4 49 | MOV ZERO, A5 50 | MOV trap+0(FP), A7 // syscall entry 51 | ECALL 52 | MOV A0, r1+32(FP) 53 | MOV A1, r2+40(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 25 | BL runtime·entersyscall(SB) 26 | MOVD a1+8(FP), R2 27 | MOVD a2+16(FP), R3 28 | MOVD a3+24(FP), R4 29 | MOVD $0, R5 30 | MOVD $0, R6 31 | MOVD $0, R7 32 | MOVD trap+0(FP), R1 // syscall entry 33 | SYSCALL 34 | MOVD R2, r1+32(FP) 35 | MOVD R3, r2+40(FP) 36 | BL runtime·exitsyscall(SB) 37 | RET 38 | 39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 40 | BR syscall·RawSyscall(SB) 41 | 42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 43 | BR syscall·RawSyscall6(SB) 44 | 45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 46 | MOVD a1+8(FP), R2 47 | MOVD a2+16(FP), R3 48 | MOVD a3+24(FP), R4 49 | MOVD $0, R5 50 | MOVD $0, R6 51 | MOVD $0, R7 52 | MOVD trap+0(FP), R1 // syscall entry 53 | SYSCALL 54 | MOVD R2, r1+32(FP) 55 | MOVD R3, r2+40(FP) 56 | RET 57 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for arm64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) 18 | var err error 19 | if errno != 0 { 20 | err = errno 21 | } 22 | return int(valptr), err 23 | } 24 | 25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 28 | if errno == 0 { 29 | return nil 30 | } 31 | return errno 32 | } 33 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | // +build !aix 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #define _STRINGIFY2_(x) #x 13 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 15 | 16 | // Call syscall from C code because the gccgo support for calling from 17 | // Go to C does not support varargs functions. 18 | 19 | struct ret { 20 | uintptr_t r; 21 | uintptr_t err; 22 | }; 23 | 24 | struct ret 25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 26 | { 27 | struct ret r; 28 | 29 | errno = 0; 30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 31 | r.err = errno; 32 | return r; 33 | } 34 | 35 | uintptr_t 36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 37 | { 38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 39 | } 40 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/ioctl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. 12 | // 13 | // To change fd's window size, the req argument should be TIOCSWINSZ. 14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 15 | // TODO: if we get the chance, remove the req parameter and 16 | // hardcode TIOCSWINSZ. 17 | err := ioctlSetWinsize(fd, req, value) 18 | runtime.KeepAlive(value) 19 | return err 20 | } 21 | 22 | // IoctlSetTermios performs an ioctl on fd with a *Termios. 23 | // 24 | // The req value will usually be TCSETA or TIOCSETA. 25 | func IoctlSetTermios(fd int, req uint, value *Termios) error { 26 | // TODO: if we get the chance, remove the req parameter. 27 | err := ioctlSetTermios(fd, req, value) 28 | runtime.KeepAlive(value) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/sockcmsg_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Socket control messages 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // UnixCredentials encodes credentials into a socket control message 12 | // for sending to another process. This can be used for 13 | // authentication. 14 | func UnixCredentials(ucred *Ucred) []byte { 15 | b := make([]byte, CmsgSpace(SizeofUcred)) 16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0])) 17 | h.Level = SOL_SOCKET 18 | h.Type = SCM_CREDENTIALS 19 | h.SetLen(CmsgLen(SizeofUcred)) 20 | *((*Ucred)(cmsgData(h))) = *ucred 21 | return b 22 | } 23 | 24 | // ParseUnixCredentials decodes a socket control message that contains 25 | // credentials in a Ucred structure. To receive such a message, the 26 | // SO_PASSCRED option must be enabled on the socket. 27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { 28 | if m.Header.Level != SOL_SOCKET { 29 | return nil, EINVAL 30 | } 31 | if m.Header.Type != SCM_CREDENTIALS { 32 | return nil, EINVAL 33 | } 34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) 35 | return &ucred, nil 36 | } 37 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (cmsg *Cmsghdr) SetLen(length int) { 33 | cmsg.Len = uint32(length) 34 | } 35 | 36 | func Fstat(fd int, stat *Stat_t) error { 37 | return fstat(fd, stat) 38 | } 39 | 40 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { 41 | return fstatat(dirfd, path, stat, flags) 42 | } 43 | 44 | func Lstat(path string, stat *Stat_t) error { 45 | return lstat(path, stat) 46 | } 47 | 48 | func Stat(path string, statptr *Stat_t) error { 49 | return stat(path, statptr) 50 | } 51 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,go1.12 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // Implemented in the runtime package (runtime/sys_darwin.go) 12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only 16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) 17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) 18 | 19 | //go:linkname syscall_syscall syscall.syscall 20 | //go:linkname syscall_syscall6 syscall.syscall6 21 | //go:linkname syscall_syscall6X syscall.syscall6X 22 | //go:linkname syscall_syscall9 syscall.syscall9 23 | //go:linkname syscall_rawSyscall syscall.rawSyscall 24 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 25 | 26 | // Find the entry point for f. See comments in runtime/proc.go for the 27 | // function of the same name. 28 | //go:nosplit 29 | func funcPC(f func()) uintptr { 30 | return **(**uintptr)(unsafe.Pointer(&f)) 31 | } 32 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: sec, Nsec: nsec} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: sec, Usec: usec} 20 | } 21 | 22 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 23 | k.Ident = uint64(fd) 24 | k.Filter = int16(mode) 25 | k.Flags = uint16(flags) 26 | } 27 | 28 | func (iov *Iovec) SetLen(length int) { 29 | iov.Len = uint64(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetControllen(length int) { 33 | msghdr.Controllen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 41 | var writtenOut uint64 = 0 42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 43 | 44 | written = int(writtenOut) 45 | 46 | if e1 != 0 { 47 | err = e1 48 | } 49 | return 50 | } 51 | 52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 53 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 20 | } 21 | 22 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 23 | k.Ident = uint32(fd) 24 | k.Filter = int16(mode) 25 | k.Flags = uint16(flags) 26 | } 27 | 28 | func (iov *Iovec) SetLen(length int) { 29 | iov.Len = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetControllen(length int) { 33 | msghdr.Controllen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 41 | var writtenOut uint64 = 0 42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) 43 | 44 | written = int(writtenOut) 45 | 46 | if e1 != 0 { 47 | err = e1 48 | } 49 | return 50 | } 51 | 52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 53 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: sec, Nsec: nsec} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: sec, Usec: usec} 20 | } 21 | 22 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 23 | k.Ident = uint64(fd) 24 | k.Filter = int16(mode) 25 | k.Flags = uint16(flags) 26 | } 27 | 28 | func (iov *Iovec) SetLen(length int) { 29 | iov.Len = uint64(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetControllen(length int) { 33 | msghdr.Controllen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 41 | var writtenOut uint64 = 0 42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 43 | 44 | written = int(writtenOut) 45 | 46 | if e1 != 0 { 47 | err = e1 48 | } 49 | return 50 | } 51 | 52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 53 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: sec, Nsec: int32(nsec)} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: sec, Usec: int32(usec)} 20 | } 21 | 22 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 23 | k.Ident = uint32(fd) 24 | k.Filter = int16(mode) 25 | k.Flags = uint16(flags) 26 | } 27 | 28 | func (iov *Iovec) SetLen(length int) { 29 | iov.Len = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetControllen(length int) { 33 | msghdr.Controllen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 41 | var writtenOut uint64 = 0 42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) 43 | 44 | written = int(writtenOut) 45 | 46 | if e1 != 0 { 47 | err = e1 48 | } 49 | return 50 | } 51 | 52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 53 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func setTimespec(sec, nsec int64) Timespec { 15 | return Timespec{Sec: sec, Nsec: nsec} 16 | } 17 | 18 | func setTimeval(sec, usec int64) Timeval { 19 | return Timeval{Sec: sec, Usec: usec} 20 | } 21 | 22 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 23 | k.Ident = uint64(fd) 24 | k.Filter = int16(mode) 25 | k.Flags = uint16(flags) 26 | } 27 | 28 | func (iov *Iovec) SetLen(length int) { 29 | iov.Len = uint64(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetControllen(length int) { 33 | msghdr.Controllen = uint32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | 40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 41 | var writtenOut uint64 = 0 42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 43 | 44 | written = int(writtenOut) 45 | 46 | if e1 != 0 { 47 | err = e1 48 | } 49 | return 50 | } 51 | 52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 53 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo,!ppc64le,!ppc64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64le ppc64 7 | // +build !gccgo 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 14 | return syscall.Syscall(trap, a1, a2, a3) 15 | } 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 18 | } 19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 20 | return syscall.RawSyscall(trap, a1, a2, a3) 21 | } 22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 24 | } 25 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/unveil_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | // Unveil implements the unveil syscall. 13 | // For more information see unveil(2). 14 | // Note that the special case of blocking further 15 | // unveil calls is handled by UnveilBlock. 16 | func Unveil(path string, flags string) error { 17 | pathPtr, err := syscall.BytePtrFromString(path) 18 | if err != nil { 19 | return err 20 | } 21 | flagsPtr, err := syscall.BytePtrFromString(flags) 22 | if err != nil { 23 | return err 24 | } 25 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) 26 | if e != 0 { 27 | return e 28 | } 29 | return nil 30 | } 31 | 32 | // UnveilBlock blocks future unveil calls. 33 | // For more information see unveil(2). 34 | func UnveilBlock() error { 35 | // Both pointers must be nil. 36 | var pathUnsafe, flagsUnsafe unsafe.Pointer 37 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) 38 | if e != 0 { 39 | return e 40 | } 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/zptracearm_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT. 2 | 3 | // +build linux 4 | // +build arm arm64 5 | 6 | package unix 7 | 8 | import "unsafe" 9 | 10 | // PtraceRegsArm is the registers used by arm binaries. 11 | type PtraceRegsArm struct { 12 | Uregs [18]uint32 13 | } 14 | 15 | // PtraceGetRegsArm fetches the registers used by arm binaries. 16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 18 | } 19 | 20 | // PtraceSetRegsArm sets the registers used by arm binaries. 21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 23 | } 24 | 25 | // PtraceRegsArm64 is the registers used by arm64 binaries. 26 | type PtraceRegsArm64 struct { 27 | Regs [31]uint64 28 | Sp uint64 29 | Pc uint64 30 | Pstate uint64 31 | } 32 | 33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 36 | } 37 | 38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 41 | } 42 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/zptracemips_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT. 2 | 3 | // +build linux 4 | // +build mips mips64 5 | 6 | package unix 7 | 8 | import "unsafe" 9 | 10 | // PtraceRegsMips is the registers used by mips binaries. 11 | type PtraceRegsMips struct { 12 | Regs [32]uint64 13 | Lo uint64 14 | Hi uint64 15 | Epc uint64 16 | Badvaddr uint64 17 | Status uint64 18 | Cause uint64 19 | } 20 | 21 | // PtraceGetRegsMips fetches the registers used by mips binaries. 22 | func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error { 23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 24 | } 25 | 26 | // PtraceSetRegsMips sets the registers used by mips binaries. 27 | func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error { 28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 29 | } 30 | 31 | // PtraceRegsMips64 is the registers used by mips64 binaries. 32 | type PtraceRegsMips64 struct { 33 | Regs [32]uint64 34 | Lo uint64 35 | Hi uint64 36 | Epc uint64 37 | Badvaddr uint64 38 | Status uint64 39 | Cause uint64 40 | } 41 | 42 | // PtraceGetRegsMips64 fetches the registers used by mips64 binaries. 43 | func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error { 44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 45 | } 46 | 47 | // PtraceSetRegsMips64 sets the registers used by mips64 binaries. 48 | func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error { 49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 50 | } 51 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT. 2 | 3 | // +build linux 4 | // +build mipsle mips64le 5 | 6 | package unix 7 | 8 | import "unsafe" 9 | 10 | // PtraceRegsMipsle is the registers used by mipsle binaries. 11 | type PtraceRegsMipsle struct { 12 | Regs [32]uint64 13 | Lo uint64 14 | Hi uint64 15 | Epc uint64 16 | Badvaddr uint64 17 | Status uint64 18 | Cause uint64 19 | } 20 | 21 | // PtraceGetRegsMipsle fetches the registers used by mipsle binaries. 22 | func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error { 23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 24 | } 25 | 26 | // PtraceSetRegsMipsle sets the registers used by mipsle binaries. 27 | func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error { 28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 29 | } 30 | 31 | // PtraceRegsMips64le is the registers used by mips64le binaries. 32 | type PtraceRegsMips64le struct { 33 | Regs [32]uint64 34 | Lo uint64 35 | Hi uint64 36 | Epc uint64 37 | Badvaddr uint64 38 | Status uint64 39 | Cause uint64 40 | } 41 | 42 | // PtraceGetRegsMips64le fetches the registers used by mips64le binaries. 43 | func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error { 44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 45 | } 46 | 47 | // PtraceSetRegsMips64le sets the registers used by mips64le binaries. 48 | func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error { 49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 50 | } 51 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 11 | } 12 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | if !t.isRTL() { 11 | return true 12 | } 13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 14 | } 15 | -------------------------------------------------------------------------------- /chaincode/vendor/golang.org/x/text/unicode/norm/trie.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package norm 6 | 7 | type valueRange struct { 8 | value uint16 // header: value:stride 9 | lo, hi byte // header: lo:n 10 | } 11 | 12 | type sparseBlocks struct { 13 | values []valueRange 14 | offset []uint16 15 | } 16 | 17 | var nfcSparse = sparseBlocks{ 18 | values: nfcSparseValues[:], 19 | offset: nfcSparseOffset[:], 20 | } 21 | 22 | var nfkcSparse = sparseBlocks{ 23 | values: nfkcSparseValues[:], 24 | offset: nfkcSparseOffset[:], 25 | } 26 | 27 | var ( 28 | nfcData = newNfcTrie(0) 29 | nfkcData = newNfkcTrie(0) 30 | ) 31 | 32 | // lookupValue determines the type of block n and looks up the value for b. 33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block 34 | // is a list of ranges with an accompanying value. Given a matching range r, 35 | // the value for b is by r.value + (b - r.lo) * stride. 36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 { 37 | offset := t.offset[n] 38 | header := t.values[offset] 39 | lo := offset + 1 40 | hi := lo + uint16(header.lo) 41 | for lo < hi { 42 | m := lo + (hi-lo)/2 43 | r := t.values[m] 44 | if r.lo <= b && b <= r.hi { 45 | return r.value + uint16(b-r.lo)*header.value 46 | } 47 | if b < r.lo { 48 | hi = m 49 | } else { 50 | lo = m + 1 51 | } 52 | } 53 | return 0 54 | } 55 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | matrix: 4 | include: 5 | - go: 1.12.x 6 | env: VET=1 GO111MODULE=on 7 | - go: 1.12.x 8 | env: RACE=1 GO111MODULE=on 9 | - go: 1.12.x 10 | env: RUN386=1 11 | - go: 1.12.x 12 | env: GRPC_GO_RETRY=on 13 | - go: 1.11.x 14 | env: GO111MODULE=on 15 | - go: 1.10.x 16 | - go: 1.9.x 17 | - go: 1.9.x 18 | env: GAE=1 19 | 20 | go_import_path: google.golang.org/grpc 21 | 22 | before_install: 23 | - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi 24 | - if [[ -n "${RUN386}" ]]; then export GOARCH=386; fi 25 | - if [[ "${TRAVIS_EVENT_TYPE}" = "cron" && -z "${RUN386}" ]]; then RACE=1; fi 26 | - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then VET_SKIP_PROTO=1; fi 27 | 28 | install: 29 | - try3() { eval "$*" || eval "$*" || eval "$*"; } 30 | - try3 'if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make testdeps; fi' 31 | - if [[ "${GAE}" = 1 ]]; then source ./install_gae.sh; make testappenginedeps; fi 32 | - if [[ "${VET}" = 1 ]]; then ./vet.sh -install; fi 33 | 34 | script: 35 | - set -e 36 | - if [[ "${VET}" = 1 ]]; then ./vet.sh; fi 37 | - if [[ "${GAE}" = 1 ]]; then make testappengine; exit 0; fi 38 | - if [[ "${RACE}" = 1 ]]; then make testrace; exit 0; fi 39 | - make test 40 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/Makefile: -------------------------------------------------------------------------------- 1 | all: vet test testrace 2 | 3 | build: deps 4 | go build google.golang.org/grpc/... 5 | 6 | clean: 7 | go clean -i google.golang.org/grpc/... 8 | 9 | deps: 10 | go get -d -v google.golang.org/grpc/... 11 | 12 | proto: 13 | @ if ! which protoc > /dev/null; then \ 14 | echo "error: protoc not installed" >&2; \ 15 | exit 1; \ 16 | fi 17 | go generate google.golang.org/grpc/... 18 | 19 | test: testdeps 20 | go test -cpu 1,4 -timeout 7m google.golang.org/grpc/... 21 | 22 | testappengine: testappenginedeps 23 | goapp test -cpu 1,4 -timeout 7m google.golang.org/grpc/... 24 | 25 | testappenginedeps: 26 | goapp get -d -v -t -tags 'appengine appenginevm' google.golang.org/grpc/... 27 | 28 | testdeps: 29 | go get -d -v -t google.golang.org/grpc/... 30 | 31 | testrace: testdeps 32 | go test -race -cpu 1,4 -timeout 7m google.golang.org/grpc/... 33 | 34 | updatedeps: 35 | go get -d -v -u -f google.golang.org/grpc/... 36 | 37 | updatetestdeps: 38 | go get -d -v -t -u -f google.golang.org/grpc/... 39 | 40 | vet: vetdeps 41 | ./vet.sh 42 | 43 | vetdeps: 44 | ./vet.sh -install 45 | 46 | .PHONY: \ 47 | all \ 48 | build \ 49 | clean \ 50 | deps \ 51 | proto \ 52 | test \ 53 | testappengine \ 54 | testappenginedeps \ 55 | testdeps \ 56 | testrace \ 57 | updatedeps \ 58 | updatetestdeps \ 59 | vet \ 60 | vetdeps 61 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/backoff.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2017 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // See internal/backoff package for the backoff implementation. This file is 20 | // kept for the exported types and API backward compatibility. 21 | 22 | package grpc 23 | 24 | import ( 25 | "time" 26 | ) 27 | 28 | // DefaultBackoffConfig uses values specified for backoff in 29 | // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. 30 | var DefaultBackoffConfig = BackoffConfig{ 31 | MaxDelay: 120 * time.Second, 32 | } 33 | 34 | // BackoffConfig defines the parameters for the default gRPC backoff strategy. 35 | type BackoffConfig struct { 36 | // MaxDelay is the upper bound of backoff delay. 37 | MaxDelay time.Duration 38 | } 39 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script serves as an example to demonstrate how to generate the gRPC-Go 4 | # interface and the related messages from .proto file. 5 | # 6 | # It assumes the installation of i) Google proto buffer compiler at 7 | # https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen 8 | # plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have 9 | # not, please install them first. 10 | # 11 | # We recommend running this script at $GOPATH/src. 12 | # 13 | # If this is not what you need, feel free to make your own scripts. Again, this 14 | # script is for demonstration purpose. 15 | # 16 | proto=$1 17 | protoc --go_out=plugins=grpc:. $proto 18 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/credentials/internal/syscallconn_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | /* 4 | * 5 | * Copyright 2018 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package internal 22 | 23 | import ( 24 | "net" 25 | ) 26 | 27 | // WrapSyscallConn returns newConn on appengine. 28 | func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn { 29 | return newConn 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/credentials/tls13.go: -------------------------------------------------------------------------------- 1 | // +build go1.12 2 | 3 | /* 4 | * 5 | * Copyright 2019 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package credentials 22 | 23 | import "crypto/tls" 24 | 25 | // This init function adds cipher suite constants only defined in Go 1.12. 26 | func init() { 27 | cipherSuiteLookup[tls.TLS_AES_128_GCM_SHA256] = "TLS_AES_128_GCM_SHA256" 28 | cipherSuiteLookup[tls.TLS_AES_256_GCM_SHA384] = "TLS_AES_256_GCM_SHA384" 29 | cipherSuiteLookup[tls.TLS_CHACHA20_POLY1305_SHA256] = "TLS_CHACHA20_POLY1305_SHA256" 30 | } 31 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | /* 20 | Package grpc implements an RPC system called gRPC. 21 | 22 | See grpc.io for more information about gRPC. 23 | */ 24 | package grpc // import "google.golang.org/grpc" 25 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/go.mod: -------------------------------------------------------------------------------- 1 | module google.golang.org/grpc 2 | 3 | require ( 4 | cloud.google.com/go v0.26.0 // indirect 5 | github.com/BurntSushi/toml v0.3.1 // indirect 6 | github.com/client9/misspell v0.3.4 7 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b 8 | github.com/golang/mock v1.1.1 9 | github.com/golang/protobuf v1.2.0 10 | github.com/google/go-cmp v0.2.0 11 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 12 | golang.org/x/net v0.0.0-20190311183353-d8887717615a 13 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be 14 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a 15 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 16 | google.golang.org/appengine v1.1.0 // indirect 17 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 18 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc 19 | ) 20 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/install_gae.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TMP=$(mktemp -d /tmp/sdk.XXX) \ 4 | && curl -o $TMP.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.68.zip" \ 5 | && unzip -q $TMP.zip -d $TMP \ 6 | && export PATH="$PATH:$TMP/go_appengine" 7 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/balancerload/load.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 gRPC authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Package balancerload defines APIs to parse server loads in trailers. The 18 | // parsed loads are sent to balancers in DoneInfo. 19 | package balancerload 20 | 21 | import ( 22 | "google.golang.org/grpc/metadata" 23 | ) 24 | 25 | // Parser converts loads from metadata into a concrete type. 26 | type Parser interface { 27 | // Parse parses loads from metadata. 28 | Parse(md metadata.MD) interface{} 29 | } 30 | 31 | var parser Parser 32 | 33 | // SetParser sets the load parser. 34 | // 35 | // Not mutex-protected, should be called before any gRPC functions. 36 | func SetParser(lr Parser) { 37 | parser = lr 38 | } 39 | 40 | // Parse calls parser.Read(). 41 | func Parse(md metadata.MD) interface{} { 42 | if parser == nil { 43 | return nil 44 | } 45 | return parser.Parse(md) 46 | } 47 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/binarylog/binarylog_testutil.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // This file contains exported variables/functions that are exported for testing 20 | // only. 21 | // 22 | // An ideal way for this would be to put those in a *_test.go but in binarylog 23 | // package. But this doesn't work with staticcheck with go module. Error was: 24 | // "MdToMetadataProto not declared by package binarylog". This could be caused 25 | // by the way staticcheck looks for files for a certain package, which doesn't 26 | // support *_test.go files. 27 | // 28 | // Move those to binary_test.go when staticcheck is fixed. 29 | 30 | package binarylog 31 | 32 | var ( 33 | // AllLogger is a logger that logs all headers/messages for all RPCs. It's 34 | // for testing only. 35 | AllLogger = NewLoggerFromConfigString("*") 36 | // MdToMetadataProto converts metadata to a binary logging proto message. 37 | // It's for testing only. 38 | MdToMetadataProto = mdToMetadataProto 39 | // AddrToProto converts an address to a binary logging proto message. It's 40 | // for testing only. 41 | AddrToProto = addrToProto 42 | ) 43 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/binarylog/regenerate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2018 gRPC authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -eux -o pipefail 17 | 18 | TMP=$(mktemp -d) 19 | 20 | function finish { 21 | rm -rf "$TMP" 22 | } 23 | trap finish EXIT 24 | 25 | pushd "$TMP" 26 | mkdir -p grpc/binarylog/grpc_binarylog_v1 27 | curl https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/binlog/v1/binarylog.proto > grpc/binarylog/grpc_binarylog_v1/binarylog.proto 28 | 29 | protoc --go_out=plugins=grpc,paths=source_relative:. -I. grpc/binarylog/grpc_binarylog_v1/*.proto 30 | popd 31 | rm -f ./grpc_binarylog_v1/*.pb.go 32 | cp "$TMP"/grpc/binarylog/grpc_binarylog_v1/*.pb.go ../../binarylog/grpc_binarylog_v1/ 33 | 34 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/binarylog/util.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package binarylog 20 | 21 | import ( 22 | "errors" 23 | "strings" 24 | ) 25 | 26 | // parseMethodName splits service and method from the input. It expects format 27 | // "/service/method". 28 | // 29 | // TODO: move to internal/grpcutil. 30 | func parseMethodName(methodName string) (service, method string, _ error) { 31 | if !strings.HasPrefix(methodName, "/") { 32 | return "", "", errors.New("invalid method name: should start with /") 33 | } 34 | methodName = methodName[1:] 35 | 36 | pos := strings.LastIndex(methodName, "/") 37 | if pos < 0 { 38 | return "", "", errors.New("invalid method name: suffix /method is missing") 39 | } 40 | return methodName[:pos], methodName[pos+1:], nil 41 | } 42 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux appengine 2 | 3 | /* 4 | * 5 | * Copyright 2018 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package channelz 22 | 23 | import ( 24 | "sync" 25 | 26 | "google.golang.org/grpc/grpclog" 27 | ) 28 | 29 | var once sync.Once 30 | 31 | // SocketOptionData defines the struct to hold socket option data, and related 32 | // getter function to obtain info from fd. 33 | // Windows OS doesn't support Socket Option 34 | type SocketOptionData struct { 35 | } 36 | 37 | // Getsockopt defines the function to get socket options requested by channelz. 38 | // It is to be passed to syscall.RawConn.Control(). 39 | // Windows OS doesn't support Socket Option 40 | func (s *SocketOptionData) Getsockopt(fd uintptr) { 41 | once.Do(func() { 42 | grpclog.Warningln("Channelz: socket options are not supported on non-linux os and appengine.") 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/channelz/util_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux,!appengine 2 | 3 | /* 4 | * 5 | * Copyright 2018 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package channelz 22 | 23 | import ( 24 | "syscall" 25 | ) 26 | 27 | // GetSocketOption gets the socket option info of the conn. 28 | func GetSocketOption(socket interface{}) *SocketOptionData { 29 | c, ok := socket.(syscall.Conn) 30 | if !ok { 31 | return nil 32 | } 33 | data := &SocketOptionData{} 34 | if rawConn, err := c.SyscallConn(); err == nil { 35 | rawConn.Control(data.Getsockopt) 36 | return data 37 | } 38 | return nil 39 | } 40 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux appengine 2 | 3 | /* 4 | * 5 | * Copyright 2018 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package channelz 22 | 23 | // GetSocketOption gets the socket option info of the conn. 24 | func GetSocketOption(c interface{}) *SocketOptionData { 25 | return nil 26 | } 27 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // Package envconfig contains grpc settings configured by environment variables. 20 | package envconfig 21 | 22 | import ( 23 | "os" 24 | "strings" 25 | ) 26 | 27 | const ( 28 | prefix = "GRPC_GO_" 29 | retryStr = prefix + "RETRY" 30 | ) 31 | 32 | var ( 33 | // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on". 34 | Retry = strings.EqualFold(os.Getenv(retryStr), "on") 35 | ) 36 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // Package grpcrand implements math/rand functions in a concurrent-safe way 20 | // with a global random source, independent of math/rand's global source. 21 | package grpcrand 22 | 23 | import ( 24 | "math/rand" 25 | "sync" 26 | "time" 27 | ) 28 | 29 | var ( 30 | r = rand.New(rand.NewSource(time.Now().UnixNano())) 31 | mu sync.Mutex 32 | ) 33 | 34 | // Int63n implements rand.Int63n on the grpcrand global source. 35 | func Int63n(n int64) int64 { 36 | mu.Lock() 37 | res := r.Int63n(n) 38 | mu.Unlock() 39 | return res 40 | } 41 | 42 | // Intn implements rand.Intn on the grpcrand global source. 43 | func Intn(n int) int { 44 | mu.Lock() 45 | res := r.Intn(n) 46 | mu.Unlock() 47 | return res 48 | } 49 | 50 | // Float64 implements rand.Float64 on the grpcrand global source. 51 | func Float64() float64 { 52 | mu.Lock() 53 | res := r.Float64() 54 | mu.Unlock() 55 | return res 56 | } 57 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/internal/transport/log.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2017 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // This file contains wrappers for grpclog functions. 20 | // The transport package only logs to verbose level 2 by default. 21 | 22 | package transport 23 | 24 | import "google.golang.org/grpc/grpclog" 25 | 26 | const logLevel = 2 27 | 28 | func infof(format string, args ...interface{}) { 29 | if grpclog.V(logLevel) { 30 | grpclog.Infof(format, args...) 31 | } 32 | } 33 | 34 | func warningf(format string, args ...interface{}) { 35 | if grpclog.V(logLevel) { 36 | grpclog.Warningf(format, args...) 37 | } 38 | } 39 | 40 | func errorf(format string, args ...interface{}) { 41 | if grpclog.V(logLevel) { 42 | grpclog.Errorf(format, args...) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/peer/peer.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2014 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // Package peer defines various peer information associated with RPCs and 20 | // corresponding utils. 21 | package peer 22 | 23 | import ( 24 | "context" 25 | "net" 26 | 27 | "google.golang.org/grpc/credentials" 28 | ) 29 | 30 | // Peer contains the information of the peer for an RPC, such as the address 31 | // and authentication information. 32 | type Peer struct { 33 | // Addr is the peer address. 34 | Addr net.Addr 35 | // AuthInfo is the authentication information of the transport. 36 | // It is nil if there is no transport security being used. 37 | AuthInfo credentials.AuthInfo 38 | } 39 | 40 | type peerKey struct{} 41 | 42 | // NewContext creates a new context with peer information attached. 43 | func NewContext(ctx context.Context, p *Peer) context.Context { 44 | return context.WithValue(ctx, peerKey{}, p) 45 | } 46 | 47 | // FromContext returns the peer information in ctx if it exists. 48 | func FromContext(ctx context.Context) (p *Peer, ok bool) { 49 | p, ok = ctx.Value(peerKey{}).(*Peer) 50 | return 51 | } 52 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2019 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // Package serviceconfig defines types and methods for operating on gRPC 20 | // service configs. 21 | // 22 | // This package is EXPERIMENTAL. 23 | package serviceconfig 24 | 25 | import ( 26 | "google.golang.org/grpc/internal" 27 | ) 28 | 29 | // Config represents an opaque data structure holding a service config. 30 | type Config interface { 31 | isConfig() 32 | } 33 | 34 | // LoadBalancingConfig represents an opaque data structure holding a load 35 | // balancer config. 36 | type LoadBalancingConfig interface { 37 | isLoadBalancingConfig() 38 | } 39 | 40 | // Parse parses the JSON service config provided into an internal form or 41 | // returns an error if the config is invalid. 42 | func Parse(ServiceConfigJSON string) (Config, error) { 43 | c, err := internal.ParseServiceConfig(ServiceConfigJSON) 44 | if err != nil { 45 | return nil, err 46 | } 47 | return c.(Config), err 48 | } 49 | -------------------------------------------------------------------------------- /chaincode/vendor/google.golang.org/grpc/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package grpc 20 | 21 | // Version is the current grpc version. 22 | const Version = "1.23.0" 23 | -------------------------------------------------------------------------------- /clean_docker.sh: -------------------------------------------------------------------------------- 1 | sudo docker rm -f $(sudo docker ps -aq) 2 | sudo docker network prune 3 | sudo docker volume prune 4 | cd fixtures && docker-compose up -d 5 | cd .. 6 | rm education 7 | go build 8 | ./education -------------------------------------------------------------------------------- /education: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/education -------------------------------------------------------------------------------- /fixtures/channel-artifacts/Org1MSPanchors.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/fixtures/channel-artifacts/Org1MSPanchors.tx -------------------------------------------------------------------------------- /fixtures/channel-artifacts/channel.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/fixtures/channel-artifacts/channel.tx -------------------------------------------------------------------------------- /fixtures/channel-artifacts/genesis.block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/fixtures/channel-artifacts/genesis.block -------------------------------------------------------------------------------- /fixtures/crypto-config.yaml: -------------------------------------------------------------------------------- 1 | 2 | OrdererOrgs: 3 | - Name: Orderer 4 | Domain: example.com 5 | EnableNodeOUs: true 6 | 7 | Specs: 8 | - Hostname: orderer 9 | 10 | PeerOrgs: 11 | - Name: Org1 12 | Domain: org1.example.com 13 | EnableNodeOUs: true 14 | 15 | 16 | Template: 17 | Count: 2 18 | 19 | Users: 20 | Count: 1 21 | 22 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPTCCAeOgAwIBAgIQERICrkvLDM+eM6Kti3eZRzAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTIxMDIwNTEwMzIwMFoXDTMxMDIwMzEwMzIwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLGn07K4VXwazOBBqb8NggorrcbI 9 | rbXMQ+QGd2jU+Z55aRjfmHfo0i4UBSlgKiRaHroQlW5AsvY6RFcQCtkvK8KjbTBr 10 | MA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw 11 | DwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgq6wlq62KvH2Nbio9mqmNtErfUbRD 12 | jg4GBy1o1Gj1rkwwCgYIKoZIzj0EAwIDSAAwRQIgVtU5b6ZtorCxeph6EnsItk+Y 13 | P32ZpghPeVmKb7gj3VACIQD0DjSSvzqPkUJfp4NmRSgNzSAKob7daWjqCqAFkJ3U 14 | NA== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/ca/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQggp5snwuR33TZ8LRM 3 | ZktDn98u5RPz2T7GfkFUOTmQjKShRANCAASxp9OyuFV8GszgQam/DYIKK63GyK21 4 | zEPkBndo1PmeeWkY35h36NIuFAUpYCokWh66EJVuQLL2OkRXEArZLyvC 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPTCCAeOgAwIBAgIQERICrkvLDM+eM6Kti3eZRzAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTIxMDIwNTEwMzIwMFoXDTMxMDIwMzEwMzIwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLGn07K4VXwazOBBqb8NggorrcbI 9 | rbXMQ+QGd2jU+Z55aRjfmHfo0i4UBSlgKiRaHroQlW5AsvY6RFcQCtkvK8KjbTBr 10 | MA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw 11 | DwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgq6wlq62KvH2Nbio9mqmNtErfUbRD 12 | jg4GBy1o1Gj1rkwwCgYIKoZIzj0EAwIDSAAwRQIgVtU5b6ZtorCxeph6EnsItk+Y 13 | P32ZpghPeVmKb7gj3VACIQD0DjSSvzqPkUJfp4NmRSgNzSAKob7daWjqCqAFkJ3U 14 | NA== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAMwz9thTZ+DZrBFvW0nfKEswCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT0P81rPSZWk4+81cY6 9 | E8LkTgzqpSP+Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7 10 | Hy3/o20wazAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG 11 | AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEINetQAFlI7/WQp7RiyR+ 12 | AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqGSM49BAMCA0gAMEUCIQDElx7LUSpHQz0P 13 | secbjijy9EyxpAtTRcOGH92JJNmrGQIgUmpjR/4rdMpIx0AfndFnFXQt2Y+fYlgQ 14 | zvwSRYWPMXQ= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPTCCAeOgAwIBAgIQERICrkvLDM+eM6Kti3eZRzAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTIxMDIwNTEwMzIwMFoXDTMxMDIwMzEwMzIwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLGn07K4VXwazOBBqb8NggorrcbI 9 | rbXMQ+QGd2jU+Z55aRjfmHfo0i4UBSlgKiRaHroQlW5AsvY6RFcQCtkvK8KjbTBr 10 | MA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw 11 | DwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgq6wlq62KvH2Nbio9mqmNtErfUbRD 12 | jg4GBy1o1Gj1rkwwCgYIKoZIzj0EAwIDSAAwRQIgVtU5b6ZtorCxeph6EnsItk+Y 13 | P32ZpghPeVmKb7gj3VACIQD0DjSSvzqPkUJfp4NmRSgNzSAKob7daWjqCqAFkJ3U 14 | NA== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgSMoW5V+0IVqEGB9x 3 | 1254SdJ277ndVHIBt4LhBmEu0SWhRANCAAR/Y0PV/H5gXgjRoER0Dnn8izAe+5LA 4 | ykT/qij8NILrvRNy3LqTajhX6U0uuaBLJUNNJnnFEcsQzlOAbZHAHPaH 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICHTCCAcSgAwIBAgIQT6UdDRqwP2d5I9hP2djvlzAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTIxMDIwNTEwMzIwMFoXDTMxMDIwMzEwMzIwMFowajELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xEDAOBgNVBAsTB29yZGVyZXIxHDAaBgNVBAMTE29yZGVyZXIuZXhhbXBsZS5j 8 | b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR/Y0PV/H5gXgjRoER0Dnn8izAe 9 | +5LAykT/qij8NILrvRNy3LqTajhX6U0uuaBLJUNNJnnFEcsQzlOAbZHAHPaHo00w 10 | SzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCCrrCWr 11 | rYq8fY1uKj2aqY20St9RtEOODgYHLWjUaPWuTDAKBggqhkjOPQQDAgNHADBEAiAi 12 | BmE0fbXy9c8QTjhoEqLPkZOLP2UHfM7+gjGUpsoR0wIgTz0Fb9JZkzKfpnw85oDS 13 | +AILRZFU1v3InWTZmpvTTfo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAMwz9thTZ+DZrBFvW0nfKEswCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT0P81rPSZWk4+81cY6 9 | E8LkTgzqpSP+Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7 10 | Hy3/o20wazAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG 11 | AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEINetQAFlI7/WQp7RiyR+ 12 | AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqGSM49BAMCA0gAMEUCIQDElx7LUSpHQz0P 13 | secbjijy9EyxpAtTRcOGH92JJNmrGQIgUmpjR/4rdMpIx0AfndFnFXQt2Y+fYlgQ 14 | zvwSRYWPMXQ= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAMwz9thTZ+DZrBFvW0nfKEswCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT0P81rPSZWk4+81cY6 9 | E8LkTgzqpSP+Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7 10 | Hy3/o20wazAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG 11 | AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEINetQAFlI7/WQp7RiyR+ 12 | AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqGSM49BAMCA0gAMEUCIQDElx7LUSpHQz0P 13 | secbjijy9EyxpAtTRcOGH92JJNmrGQIgUmpjR/4rdMpIx0AfndFnFXQt2Y+fYlgQ 14 | zvwSRYWPMXQ= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICdzCCAh6gAwIBAgIRAMQjBk9Xqo1+Gurcml3ozewwCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMFgxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0C 8 | AQYIKoZIzj0DAQcDQgAE5q/X85fPlCXEhkC7bIbuuWdtbF+BkXo+NFQykYSSXjsx 9 | adbdoonZ/KKk61QhFO0EhSnXe7HaABv3OTKNq+oecaOBtDCBsTAOBgNVHQ8BAf8E 10 | BAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQC 11 | MAAwKwYDVR0jBCQwIoAg161AAWUjv9ZCntGLJH4CZL78G45wu2Zn8Fif4adC/aUw 12 | RQYDVR0RBD4wPIITb3JkZXJlci5leGFtcGxlLmNvbYIHb3JkZXJlcoITb3JkZXJl 13 | ci5leGFtcGxlLmNvbYIHb3JkZXJlcjAKBggqhkjOPQQDAgNHADBEAiAx5fzIMFzv 14 | 7yimhWCuaJkW1oneubz1v1lcAYoXwnbD+wIgfZOR7yunVC/9pUnORGnj74p974zm 15 | jYzsrKOlxiV2DUM= 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg+vaBhcN0JkLYDNiu 3 | /JG6eDc4ocpETce+Dx1znneormihRANCAATmr9fzl8+UJcSGQLtshu65Z21sX4GR 4 | ej40VDKRhJJeOzFp1t2iidn8oqTrVCEU7QSFKdd7sdoAG/c5Mo2r6h5x 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/tlsca/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQghtAsyE7ve9RoZqco 3 | t2acltgbVJmMEw/psoq0r0ZyMQuhRANCAAT0P81rPSZWk4+81cY6E8LkTgzqpSP+ 4 | Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7Hy3/ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAMwz9thTZ+DZrBFvW0nfKEswCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT0P81rPSZWk4+81cY6 9 | E8LkTgzqpSP+Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7 10 | Hy3/o20wazAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG 11 | AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEINetQAFlI7/WQp7RiyR+ 12 | AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqGSM49BAMCA0gAMEUCIQDElx7LUSpHQz0P 13 | secbjijy9EyxpAtTRcOGH92JJNmrGQIgUmpjR/4rdMpIx0AfndFnFXQt2Y+fYlgQ 14 | zvwSRYWPMXQ= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPTCCAeOgAwIBAgIQERICrkvLDM+eM6Kti3eZRzAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTIxMDIwNTEwMzIwMFoXDTMxMDIwMzEwMzIwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLGn07K4VXwazOBBqb8NggorrcbI 9 | rbXMQ+QGd2jU+Z55aRjfmHfo0i4UBSlgKiRaHroQlW5AsvY6RFcQCtkvK8KjbTBr 10 | MA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw 11 | DwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgq6wlq62KvH2Nbio9mqmNtErfUbRD 12 | jg4GBy1o1Gj1rkwwCgYIKoZIzj0EAwIDSAAwRQIgVtU5b6ZtorCxeph6EnsItk+Y 13 | P32ZpghPeVmKb7gj3VACIQD0DjSSvzqPkUJfp4NmRSgNzSAKob7daWjqCqAFkJ3U 14 | NA== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg1ibarE4ydtDPxR6X 3 | /dVwPihF+LSzXLZhXnb4CGnRWlOhRANCAAQpDNiBqwfEvuhfFAmRQDIL1i2tGbgk 4 | dqXJawgO1PgwLhzTfAkSLlT/JnRM/+EZ/f2pADkszb0qUlgdtj0StFRn 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcGgAwIBAgIRAJPaJ0N7xR7OoN2dktZC5hwwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGYxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMQ4wDAYDVQQLEwVhZG1pbjEaMBgGA1UEAwwRQWRtaW5AZXhhbXBsZS5jb20w 8 | WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQpDNiBqwfEvuhfFAmRQDIL1i2tGbgk 9 | dqXJawgO1PgwLhzTfAkSLlT/JnRM/+EZ/f2pADkszb0qUlgdtj0StFRno00wSzAO 10 | BgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCCrrCWrrYq8 11 | fY1uKj2aqY20St9RtEOODgYHLWjUaPWuTDAKBggqhkjOPQQDAgNHADBEAiBmmdgI 12 | 0qVOmxeRKJ+JAOp/Xe0/rtN6kem/bhSAa9nJ9AIgQme1qm/q8sWDKbSzUyw9LEXN 13 | CTl3c2FNOubNKyKgo7Q= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAMwz9thTZ+DZrBFvW0nfKEswCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT0P81rPSZWk4+81cY6 9 | E8LkTgzqpSP+Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7 10 | Hy3/o20wazAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG 11 | AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEINetQAFlI7/WQp7RiyR+ 12 | AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqGSM49BAMCA0gAMEUCIQDElx7LUSpHQz0P 13 | secbjijy9EyxpAtTRcOGH92JJNmrGQIgUmpjR/4rdMpIx0AfndFnFXQt2Y+fYlgQ 14 | zvwSRYWPMXQ= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAMwz9thTZ+DZrBFvW0nfKEswCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT0P81rPSZWk4+81cY6 9 | E8LkTgzqpSP+Qkb8AB0tNcA7Km0I0O8PFTzGwkxVZh5Sol6e/Gp/bVWFqZRdysQ7 10 | Hy3/o20wazAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG 11 | AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEINetQAFlI7/WQp7RiyR+ 12 | AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqGSM49BAMCA0gAMEUCIQDElx7LUSpHQz0P 13 | secbjijy9EyxpAtTRcOGH92JJNmrGQIgUmpjR/4rdMpIx0AfndFnFXQt2Y+fYlgQ 14 | zvwSRYWPMXQ= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICKzCCAdKgAwIBAgIQMJTYrQcoMB4LTswQb7ptRDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTIxMDIwNTEwMzIwMFoXDTMxMDIwMzEwMzIwMFowVjELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI 8 | KoZIzj0DAQcDQgAERNOrT81VQmC9ztvK33FIMJRPHlevYukH1K9BuPUtwlWPpqjh 9 | tJ3BqNME8sQMGlQDBa4u06D3O2+hV3hgWfFxNqNsMGowDgYDVR0PAQH/BAQDAgWg 10 | MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMCsG 11 | A1UdIwQkMCKAINetQAFlI7/WQp7RiyR+AmS+/BuOcLtmZ/BYn+GnQv2lMAoGCCqG 12 | SM49BAMCA0cAMEQCIFRYL5uaDNG2jf33BMSWRLXKtHns8MQ8cs0Omb3rB/DdAiBB 13 | nCeigKPh9IBgbpWeNULzHdb/L1oY3F2n+Te0+p2PaA== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgVKZhCjb59XCAAMSQ 3 | WoS+yuIluxddXVGR+zuCVWyUYtShRANCAARE06tPzVVCYL3O28rfcUgwlE8eV69i 4 | 6QfUr0G49S3CVY+mqOG0ncGo0wTyxAwaVAMFri7ToPc7b6FXeGBZ8XE2 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICUTCCAfigAwIBAgIRAKAmJte4zoqydPBLPlppGTcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BDmfJAijVZWBkLKn/NFXT/f5mT0gSpAQwE9ohMsZZt/l0vHo1qi2c8ggdM7HBJiI 10 | L8ec0o/QZ6sxHGBxXmiIu3SjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU 11 | BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg 12 | 3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0EAwIDRwAw 13 | RAIgFw636dGHg3yFIO1eXW5wh63p774iFzUdxLHkjH4SCPYCIHfucbGYxdJdp1BV 14 | ZJRGwC0EMeyUqcbfXpUujI1KkY73 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/ca/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgEe8TgpThgOHnI75G 3 | G7ZfJUlMV+fwREyMbzgXWZx+eHihRANCAAQ5nyQIo1WVgZCyp/zRV0/3+Zk9IEqQ 4 | EMBPaITLGWbf5dLx6NaotnPIIHTOxwSYiC/HnNKP0GerMRxgcV5oiLt0 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICUTCCAfigAwIBAgIRAKAmJte4zoqydPBLPlppGTcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BDmfJAijVZWBkLKn/NFXT/f5mT0gSpAQwE9ohMsZZt/l0vHo1qi2c8ggdM7HBJiI 10 | L8ec0o/QZ6sxHGBxXmiIu3SjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU 11 | BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg 12 | 3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0EAwIDRwAw 13 | RAIgFw636dGHg3yFIO1eXW5wh63p774iFzUdxLHkjH4SCPYCIHfucbGYxdJdp1BV 14 | ZJRGwC0EMeyUqcbfXpUujI1KkY73 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.org1.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.org1.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.org1.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.org1.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICUTCCAfigAwIBAgIRAKAmJte4zoqydPBLPlppGTcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BDmfJAijVZWBkLKn/NFXT/f5mT0gSpAQwE9ohMsZZt/l0vHo1qi2c8ggdM7HBJiI 10 | L8ec0o/QZ6sxHGBxXmiIu3SjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU 11 | BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg 12 | 3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0EAwIDRwAw 13 | RAIgFw636dGHg3yFIO1eXW5wh63p774iFzUdxLHkjH4SCPYCIHfucbGYxdJdp1BV 14 | ZJRGwC0EMeyUqcbfXpUujI1KkY73 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.org1.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.org1.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.org1.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.org1.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgSjRbBaqU1JJBqhms 3 | 8bpAKpr/lOP4KvUWM37XpxHX99GhRANCAARHHMZ9ziv+i72WQIHji8vSAjhNuR9j 4 | AZETFSgEa+TDVJQGar1NjQj3aC51pnvi2zg6hggiNvpkUm0WT1r5p8zW 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICKDCCAc6gAwIBAgIQRv81wkzCYjCWhiV3sYQjfTAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBa 6 | MGoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMQ0wCwYDVQQLEwRwZWVyMR8wHQYDVQQDExZwZWVyMC5vcmcx 8 | LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERxzGfc4r/ou9 9 | lkCB44vL0gI4TbkfYwGRExUoBGvkw1SUBmq9TY0I92gudaZ74ts4OoYIIjb6ZFJt 10 | Fk9a+afM1qNNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0j 11 | BCQwIoAg3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0E 12 | AwIDSAAwRQIhAJ6eE5LpMl3gqNtq91/kfheQazY7kKutfOhRQm7TZatFAiB9GlOW 13 | yfhrXdD6ciUCq9J3oFKI5PcxbwyYxc/1Ca3Y3A== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIChjCCAiygAwIBAgIQLA1w35L/nOy9K6RefJhoMjAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAED0csdAkFcpKNDc3AkkjNjNiFrpki 9 | MGfZvfOT2WrXuLgJzhT5K3mf3adAI4nuyu9I2PMfMG4OIxEqIdWi85YBlaOBtjCB 10 | szAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC 11 | MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg9ybIuUWbqmLg78sT8MSdW2yFSfX+ 12 | EzRJ/xyqt+bxu7AwRwYDVR0RBEAwPoIWcGVlcjAub3JnMS5leGFtcGxlLmNvbYIF 13 | cGVlcjCCFnBlZXIwLm9yZzEuZXhhbXBsZS5jb22CBXBlZXIwMAoGCCqGSM49BAMC 14 | A0gAMEUCIQDnq69+xU6Z6XTWknLzbW7Dh/uphs0uPsLQEWGiByHwXwIgA3BZNmcL 15 | k7/hComefeRu5EE9npIEgvUVxct+pnEmHKs= 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgOMp1A+1P/r1elPc3 3 | wmnURCWIpqq/Z8RwkbfGPMeffNOhRANCAAQPRyx0CQVyko0NzcCSSM2M2IWumSIw 4 | Z9m985PZate4uAnOFPkreZ/dp0Ajie7K70jY8x8wbg4jESoh1aLzlgGV 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICUTCCAfigAwIBAgIRAKAmJte4zoqydPBLPlppGTcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BDmfJAijVZWBkLKn/NFXT/f5mT0gSpAQwE9ohMsZZt/l0vHo1qi2c8ggdM7HBJiI 10 | L8ec0o/QZ6sxHGBxXmiIu3SjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU 11 | BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg 12 | 3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0EAwIDRwAw 13 | RAIgFw636dGHg3yFIO1eXW5wh63p774iFzUdxLHkjH4SCPYCIHfucbGYxdJdp1BV 14 | ZJRGwC0EMeyUqcbfXpUujI1KkY73 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.org1.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.org1.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.org1.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.org1.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/keystore/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUuyHdza4ji0DwIF0 3 | LBs0tl1D/BLYtaNleBqKzQnH2t6hRANCAAQN0+5f17XJVKtLpcGrWeNLrfd7vORk 4 | /wrLSpXuWEbSCwK2hgtZsD4quWY3QIVLKgTvDljLrne5kVjgMvvTgUtV 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer1.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICKDCCAc+gAwIBAgIRAM+X2wMiWS6LYSSkNIKM0WgwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBqMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzENMAsGA1UECxMEcGVlcjEfMB0GA1UEAxMWcGVlcjEub3Jn 8 | MS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABA3T7l/XtclU 9 | q0ulwatZ40ut93u85GT/CstKle5YRtILAraGC1mwPiq5ZjdAhUsqBO8OWMuud7mR 10 | WOAy+9OBS1WjTTBLMA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1Ud 11 | IwQkMCKAIN2HYpzdnkPMg4iB0LCzR3wVo9Wr6vywE4ZJORzIySWbMAoGCCqGSM49 12 | BAMCA0cAMEQCIGomy0Hv7cJYZ1C/EbtRLlC95+pye/fsN7fJKJKPV1fLAiBgn0lV 13 | qoJTFMzDYA9ZKAiKUbo/G+gRPGUMYIck5tzXRQ== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIChzCCAi2gAwIBAgIRAL49T8uFsHMRrsEb9yLQDSgwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAz 6 | MjAwWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDwRbkdFnpTO6vn19hu6lH8RQOrv 9 | pgPajFlVH0ac+NjHTawWkZL0ySduA9YgJuTz5Wl255BbE00mQmWAX67mDRejgbYw 10 | gbMwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD 11 | AjAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIPcmyLlFm6pi4O/LE/DEnVtshUn1 12 | /hM0Sf8cqrfm8buwMEcGA1UdEQRAMD6CFnBlZXIxLm9yZzEuZXhhbXBsZS5jb22C 13 | BXBlZXIxghZwZWVyMS5vcmcxLmV4YW1wbGUuY29tggVwZWVyMTAKBggqhkjOPQQD 14 | AgNIADBFAiEAuJa7WBGUnGrgGHjNFRZ+k1OP8yiAUMk2mq6X4X7FvWACIEtjLfZE 15 | Cs3zK+e02ayG5xsxc52/9/aFwVbSAx+Cz32M 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgt1LB2imbVYnRMw+8 3 | SXj3QtFLWyxS4dGygFqDQsv9+yyhRANCAAQ8EW5HRZ6Uzur59fYbupR/EUDq76YD 4 | 2oxZVR9GnPjYx02sFpGS9MknbgPWICbk8+VpdueQWxNNJkJlgF+u5g0X 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/tlsca/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg9WW4YCzHshsvx1/Z 3 | C8PAmvsRnBJdJFlst0oLP0J3OZahRANCAAQodO+bivUpLYTFQaL8MAo8s827+UZk 4 | UL/Y43PAoOYXr73RPkbj7X7M9ZeE5HZN/V8Lx9YKrMedpJ2lh1uE4Uai 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICUTCCAfigAwIBAgIRAKAmJte4zoqydPBLPlppGTcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BDmfJAijVZWBkLKn/NFXT/f5mT0gSpAQwE9ohMsZZt/l0vHo1qi2c8ggdM7HBJiI 10 | L8ec0o/QZ6sxHGBxXmiIu3SjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU 11 | BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg 12 | 3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0EAwIDRwAw 13 | RAIgFw636dGHg3yFIO1eXW5wh63p774iFzUdxLHkjH4SCPYCIHfucbGYxdJdp1BV 14 | ZJRGwC0EMeyUqcbfXpUujI1KkY73 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.org1.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.org1.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.org1.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.org1.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgA24UW6eIPKfQ+wku 3 | UCul5C0/RXf7/hvixJuV0ZnIvF6hRANCAASiau0zbZMxr7cHo+y3UR6P74PnmIE2 4 | 1o9Feq8yIk22qRmb9oIRYxO0rjiW3nMgyjjsNZRCORkxTrdvbgwQ3+6n 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICKTCCAc+gAwIBAgIQOOP6rT+xiEHpL0FliwmuwzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMyMDBa 6 | MGsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMQ4wDAYDVQQLEwVhZG1pbjEfMB0GA1UEAwwWQWRtaW5Ab3Jn 8 | MS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABKJq7TNtkzGv 9 | twej7LdRHo/vg+eYgTbWj0V6rzIiTbapGZv2ghFjE7SuOJbecyDKOOw1lEI5GTFO 10 | t29uDBDf7qejTTBLMA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1Ud 11 | IwQkMCKAIN2HYpzdnkPMg4iB0LCzR3wVo9Wr6vywE4ZJORzIySWbMAoGCCqGSM49 12 | BAMCA0gAMEUCIQD9l+GCR+vIfHOjA0TUQwE3e/BGI7/DRwI/ilHbkJFPawIgWP3j 13 | 9DI7cOCRoEgeRy4U2FzNKl7ojur/wW4Sl1HGiqg= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeKgAwIBAgIRAONeiEnvocT13ZTBvDfvbkAwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAz 6 | MjAwWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK6vJIVWyJ81l+BRPMkpSMqflD3X 9 | S5++9k49FLXmF1wYd8XdQ9X+vXkh5CiDl7UHb2ScYvO+vnoqAnwh92ZuQL+jbDBq 10 | MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw 11 | DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4T 12 | NEn/HKq35vG7sDAKBggqhkjOPQQDAgNIADBFAiEA2GU6s/SJxcZLRd/w3Wf/SJzK 13 | K+G0Qr504JH/QJd+1moCICy1FF+xDvgMTMwWSclw2lmE6Dd5F8BUBOgDq8GtkSfG 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgssMmj0kUMMTpaPaq 3 | sOJ2AyRADCd+8LQr9KQqFsrIiA+hRANCAASurySFVsifNZfgUTzJKUjKn5Q910uf 4 | vvZOPRS15hdcGHfF3UPV/r15IeQog5e1B29knGLzvr56KgJ8IfdmbkC/ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICUTCCAfigAwIBAgIRAKAmJte4zoqydPBLPlppGTcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BDmfJAijVZWBkLKn/NFXT/f5mT0gSpAQwE9ohMsZZt/l0vHo1qi2c8ggdM7HBJiI 10 | L8ec0o/QZ6sxHGBxXmiIu3SjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU 11 | BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg 12 | 3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZIzj0EAwIDRwAw 13 | RAIgFw636dGHg3yFIO1eXW5wh63p774iFzUdxLHkjH4SCPYCIHfucbGYxdJdp1BV 14 | ZJRGwC0EMeyUqcbfXpUujI1KkY73 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/config.yaml: -------------------------------------------------------------------------------- 1 | NodeOUs: 2 | Enable: true 3 | ClientOUIdentifier: 4 | Certificate: cacerts/ca.org1.example.com-cert.pem 5 | OrganizationalUnitIdentifier: client 6 | PeerOUIdentifier: 7 | Certificate: cacerts/ca.org1.example.com-cert.pem 8 | OrganizationalUnitIdentifier: peer 9 | AdminOUIdentifier: 10 | Certificate: cacerts/ca.org1.example.com-cert.pem 11 | OrganizationalUnitIdentifier: admin 12 | OrdererOUIdentifier: 13 | Certificate: cacerts/ca.org1.example.com-cert.pem 14 | OrganizationalUnitIdentifier: orderer 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/priv_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg9POqoqahPgWPJdLe 3 | zQ1hJKgaujZvrDWtoimOt4s4JH6hRANCAASDwKQm5RbWvkTIiothUfCIk/Zf5rhf 4 | bbfKawiwGRCF8kroPONANOqtfUHY6jWdzgBH0zENESmKS+91iVGnluFa 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICKzCCAdGgAwIBAgIRAJPPVQvIiVWNds8Q5j9SV8QwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAzMjAw 6 | WjBsMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEPMA0GA1UECxMGY2xpZW50MR8wHQYDVQQDDBZVc2VyMUBv 8 | cmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEg8CkJuUW 9 | 1r5EyIqLYVHwiJP2X+a4X223ymsIsBkQhfJK6DzjQDTqrX1B2Oo1nc4AR9MxDREp 10 | ikvvdYlRp5bhWqNNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYD 11 | VR0jBCQwIoAg3YdinN2eQ8yDiIHQsLNHfBWj1avq/LAThkk5HMjJJZswCgYIKoZI 12 | zj0EAwIDSAAwRQIhAODA9jC99KbAV3O5bnZQrQyhfkaChVfLnECIbCA1aD02AiAx 13 | bQLM2/gQ5cffezEzaxTMaX/CJRIb/iXhEb9jhJeidw== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWDCCAf2gAwIBAgIQMKpxKBl3hyNg9aBF/WSqUzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMTAyMDUxMDMyMDBaFw0zMTAyMDMxMDMy 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAEKHTvm4r1KS2ExUGi/DAKPLPNu/lGZFC/2ONzwKDmF6+90T5G4+1+zPWX 10 | hOR2Tf1fC8fWCqzHnaSdpYdbhOFGoqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud 11 | JQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud 12 | DgQiBCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4TNEn/HKq35vG7sDAKBggqhkjOPQQD 13 | AgNJADBGAiEA9tJrgHucptFfPpBo1+zrm2lTpLYzge9VdcmTyGt951sCIQCl/LK/ 14 | G4SHwzmB9AHWLNCd9+521c/s5GWtWFJxiKCLbw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOzCCAeKgAwIBAgIRAMTFp66JCW98GwN5nd6gr3AwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMjEwMjA1MTAzMjAwWhcNMzEwMjAzMTAz 6 | MjAwWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABM3rj9dBrYp4gj9A2bZL2MbE6tGt 9 | kryxTSeYYp4ilR+2IeZrJJH277fmy0jTuhWqVwzBSk+n2o50+Kg6e5wrZUyjbDBq 10 | MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw 11 | DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCD3Jsi5RZuqYuDvyxPwxJ1bbIVJ9f4T 12 | NEn/HKq35vG7sDAKBggqhkjOPQQDAgNHADBEAiAF0hyrZk1opLwYyF7Zf77FffQd 13 | 357axFQ8hxCtbpG/vQIgRGVe0r5cv6aAdqHYbFTKDP2MtAbmGR9nQ06K3KHnpVs= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fixtures/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUTJOtnrW5qEw+kZE 3 | BtRu0O8vtFbcULijgmA0Dl4vKC2hRANCAATN64/XQa2KeII/QNm2S9jGxOrRrZK8 4 | sU0nmGKeIpUftiHmaySR9u+35stI07oVqlcMwUpPp9qOdPioOnucK2VM 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module education 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/hyperledger/fabric-protos-go v0.0.0-20210311171918-e08edaab0493 7 | github.com/hyperledger/fabric-sdk-go v1.0.0 8 | ) 9 | -------------------------------------------------------------------------------- /img/createchannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/createchannel.png -------------------------------------------------------------------------------- /img/docker_ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/docker_ps.png -------------------------------------------------------------------------------- /img/dockercompose_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/dockercompose_down.png -------------------------------------------------------------------------------- /img/dockercompose_down2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/dockercompose_down2.png -------------------------------------------------------------------------------- /img/dockercompose_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/dockercompose_up.png -------------------------------------------------------------------------------- /img/findEduByCertNoAndName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/findEduByCertNoAndName.png -------------------------------------------------------------------------------- /img/findEduInfoByEntityID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/findEduInfoByEntityID.png -------------------------------------------------------------------------------- /img/html/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/help.png -------------------------------------------------------------------------------- /img/html/help2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/help2.png -------------------------------------------------------------------------------- /img/html/help3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/help3.png -------------------------------------------------------------------------------- /img/html/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/index.png -------------------------------------------------------------------------------- /img/html/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/login.png -------------------------------------------------------------------------------- /img/html/query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/query.png -------------------------------------------------------------------------------- /img/html/queryResult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/queryResult.png -------------------------------------------------------------------------------- /img/html/详情.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html/详情.png -------------------------------------------------------------------------------- /img/html_addEdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_addEdu.png -------------------------------------------------------------------------------- /img/html_addEdu_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_addEdu_info.png -------------------------------------------------------------------------------- /img/html_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_help.png -------------------------------------------------------------------------------- /img/html_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_index.png -------------------------------------------------------------------------------- /img/html_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_login.png -------------------------------------------------------------------------------- /img/html_modify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_modify.png -------------------------------------------------------------------------------- /img/html_modifyResult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_modifyResult.png -------------------------------------------------------------------------------- /img/html_query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_query.png -------------------------------------------------------------------------------- /img/html_query2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_query2.png -------------------------------------------------------------------------------- /img/html_queryResultbycert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_queryResultbycert.png -------------------------------------------------------------------------------- /img/html_queryResultbyentityid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/html_queryResultbyentityid.png -------------------------------------------------------------------------------- /img/installcc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/installcc.png -------------------------------------------------------------------------------- /img/modifyEdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/modifyEdu.png -------------------------------------------------------------------------------- /img/networkArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/networkArch.png -------------------------------------------------------------------------------- /img/projectArch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/projectArch.png -------------------------------------------------------------------------------- /img/saveedu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/saveedu.png -------------------------------------------------------------------------------- /img/update_findEduByCertNoAndName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/update_findEduByCertNoAndName.png -------------------------------------------------------------------------------- /img/update_findEduInfoByEntityID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/img/update_findEduInfoByEntityID.png -------------------------------------------------------------------------------- /sdkInit/integration.go: -------------------------------------------------------------------------------- 1 | package sdkInit 2 | 3 | 4 | 5 | import ( 6 | "fmt" 7 | "github.com/hyperledger/fabric-sdk-go/pkg/common/errors/retry" 8 | "github.com/hyperledger/fabric-sdk-go/pkg/common/errors/status" 9 | contextAPI "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context" 10 | fabAPI "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab" 11 | contextImpl "github.com/hyperledger/fabric-sdk-go/pkg/context" 12 | ) 13 | 14 | func DiscoverLocalPeers(ctxProvider contextAPI.ClientProvider, expectedPeers int) ([]fabAPI.Peer, error) { 15 | ctx, err := contextImpl.NewLocal(ctxProvider) 16 | if err != nil { 17 | return nil, fmt.Errorf("error creating local context: %v", err) 18 | } 19 | 20 | discoveredPeers, err := retry.NewInvoker(retry.New(retry.TestRetryOpts)).Invoke( 21 | func() (interface{}, error) { 22 | peers, serviceErr := ctx.LocalDiscoveryService().GetPeers() 23 | if serviceErr != nil { 24 | return nil, fmt.Errorf("getting peers for MSP [%s] error: %v", ctx.Identifier().MSPID, serviceErr) 25 | } 26 | if len(peers) < expectedPeers { 27 | return nil, status.New(status.TestStatus, status.GenericTransient.ToInt32(), fmt.Sprintf("Expecting %d peers but got %d", expectedPeers, len(peers)), nil) 28 | } 29 | return peers, nil 30 | }, 31 | ) 32 | if err != nil { 33 | return nil, err 34 | } 35 | 36 | return discoveredPeers.([]fabAPI.Peer), nil 37 | } 38 | -------------------------------------------------------------------------------- /sdkInit/sdkInfo.go: -------------------------------------------------------------------------------- 1 | package sdkInit 2 | 3 | import ( 4 | mspclient "github.com/hyperledger/fabric-sdk-go/pkg/client/msp" 5 | "github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt" 6 | contextAPI "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context" 7 | ) 8 | 9 | type OrgInfo struct { 10 | OrgAdminUser string // like "Admin" 11 | OrgName string // like "Org1" 12 | OrgMspId string // like "Org1MSP" 13 | OrgUser string // like "User1" 14 | orgMspClient *mspclient.Client 15 | OrgAdminClientContext *contextAPI.ClientProvider 16 | OrgResMgmt *resmgmt.Client 17 | OrgPeerNum int 18 | //Peers []*fab.Peer 19 | OrgAnchorFile string // like ./channel-artifacts/Org2MSPanchors.tx 20 | } 21 | 22 | type SdkEnvInfo struct { 23 | // 通道信息 24 | ChannelID string // like "simplecc" 25 | ChannelConfig string // like os.Getenv("GOPATH") + "/src/github.com/hyperledger/fabric-samples/test-network/channel-artifacts/testchannel.tx" 26 | 27 | // 组织信息 28 | Orgs []*OrgInfo 29 | // 排序服务节点信息 30 | OrdererAdminUser string // like "Admin" 31 | OrdererOrgName string // like "OrdererOrg" 32 | OrdererEndpoint string 33 | OrdererClientContext *contextAPI.ClientProvider 34 | // 链码信息 35 | ChaincodeID string 36 | ChaincodeGoPath string 37 | ChaincodePath string 38 | ChaincodeVersion string 39 | } 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /web/controller/controllerResponse.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | package controller 4 | 5 | import ( 6 | "net/http" 7 | "path/filepath" 8 | "html/template" 9 | "fmt" 10 | ) 11 | 12 | func ShowView(w http.ResponseWriter, r *http.Request, templateName string, data interface{}) { 13 | 14 | // 指定视图所在路径 15 | pagePath := filepath.Join("web", "tpl", templateName) 16 | 17 | resultTemplate, err := template.ParseFiles(pagePath) 18 | if err != nil { 19 | fmt.Printf("创建模板实例错误: %v", err) 20 | return 21 | } 22 | 23 | err = resultTemplate.Execute(w, data) 24 | if err != nil { 25 | fmt.Printf("在模板中融合数据时发生错误: %v", err) 26 | //fmt.Fprintf(w, "显示在客户端浏览器中的错误信息") 27 | return 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /web/controller/userInfo.go: -------------------------------------------------------------------------------- 1 | 2 | package controller 3 | 4 | import "education/service" 5 | 6 | type Application struct { 7 | Setup *service.ServiceSetup 8 | } 9 | 10 | type User struct { 11 | LoginName string 12 | Password string 13 | IsAdmin string 14 | } 15 | 16 | 17 | var users []User 18 | 19 | func init() { 20 | 21 | admin := User{LoginName:"admin", Password:"123456", IsAdmin:"T"} 22 | alice := User{LoginName:"ChainDesk", Password:"123456", IsAdmin:"T"} 23 | bob := User{LoginName:"alice", Password:"123456", IsAdmin:"F"} 24 | jack := User{LoginName:"bob", Password:"123456", IsAdmin:"F"} 25 | 26 | users = append(users, admin) 27 | users = append(users, alice) 28 | users = append(users, bob) 29 | users = append(users, jack) 30 | 31 | } -------------------------------------------------------------------------------- /web/static/css/addEdu.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | .input_text{ 3 | width: 240px; 4 | padding: 0 10px; 5 | } 6 | .queryResule .top>div>p>span{ 7 | height: 45px; 8 | line-height: 45px; 9 | } 10 | .queryResule{ 11 | width: 930px; 12 | position: relative; 13 | } 14 | .btn{ 15 | display: block; 16 | width: 132px; 17 | height: 45px; 18 | line-height: 45px; 19 | text-align: center; 20 | margin: 0 auto; 21 | padding: 0; 22 | color: #fff; 23 | background-color: #2eafbb; 24 | cursor: pointer; 25 | outline: none; 26 | margin-top: 50px; 27 | } 28 | .queryResule .top>div>div{ 29 | float: right; 30 | margin-top: 50px; 31 | line-height: 160px; 32 | text-align: center; 33 | font-size: 40px; 34 | position: relative; 35 | color: #dbdbdb; 36 | border: 1px solid #dbdbdb; 37 | } 38 | .queryResule .top>div>div>input,.queryResule .top>div>div>img{ 39 | display: block; 40 | position: absolute; 41 | right: 0; 42 | top: 0; 43 | } 44 | .queryResule .top>div>div>img,.queryResule .top>div>div>input,.queryResule .top>div>div{ 45 | width: 120px; 46 | height: 160px; 47 | } 48 | .queryResule .top>div>div>input{ 49 | z-index: 1; 50 | opacity: 0; 51 | } 52 | .redColor{ 53 | border-color: red; 54 | } 55 | .headImg p{ 56 | float: right; 57 | color: #dbdbdb; 58 | margin-right: -4px; 59 | margin-top: 10px; 60 | } 61 | .back{ 62 | text-align: right; 63 | position: absolute; 64 | top: 30px; 65 | right: 0; 66 | } 67 | a, a:active, a:link, a:visited { 68 | color: #2EAFBB; 69 | text-decoration: underline; 70 | } 71 | -------------------------------------------------------------------------------- /web/static/css/query.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | .container h2{ 3 | font-size: 24px; 4 | font-weight: normal; 5 | text-align: center; 6 | line-height: 40px; 7 | padding: 15px 0 10px 0; 8 | color: #2EAFBB; 9 | } 10 | #query{ 11 | width:801px; 12 | border-radius: 10px; 13 | background: #f6f6f6; 14 | margin: 0 auto; 15 | padding: 50px; 16 | display: flex; 17 | justify-content: space-between; 18 | } 19 | #query>div{ 20 | width: 400px; 21 | display: inline-block; 22 | } 23 | #query>.left p{ 24 | margin: 20px 0 30px; 25 | text-align: right; 26 | } 27 | #query>.left a{ 28 | float: right; 29 | text-decoration: underline; 30 | margin-right: 20px; 31 | } 32 | #query>.left p:last-child{ 33 | text-align: center; 34 | } 35 | #query>.left .btn{ 36 | display: block; 37 | width: 100px; 38 | height: 30px; 39 | line-height: 30px; 40 | text-align: center; 41 | margin: 0 auto; 42 | padding: 0; 43 | color: #fff; 44 | background-color: #2eafbb; 45 | cursor: pointer; 46 | outline:none; 47 | } 48 | #query>.left input{ 49 | display: inline-block; 50 | height: 30px; 51 | line-height: 30px; 52 | width: 220px; 53 | padding: 0 10px; 54 | outline: none; 55 | margin-right: 20px; 56 | } 57 | #query>.right{ 58 | padding-left: 20px; 59 | border-left:1px solid #cfcfcf; 60 | } 61 | .redColor{ 62 | border: none; 63 | border: 1px solid red; 64 | } 65 | -------------------------------------------------------------------------------- /web/static/css/queryResult.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | .queryResule{ 3 | width: 800px; 4 | margin: 0 auto; 5 | white-space: nowrap; 6 | } 7 | .queryResule h2{ 8 | font-size: 24px; 9 | font-weight: normal; 10 | text-align: center; 11 | line-height: 40px; 12 | padding: 15px 0 10px 0; 13 | color: #2EAFBB; 14 | } 15 | .queryResule .top{ 16 | display: flex; 17 | justify-content: space-between; 18 | } 19 | .queryResule .top>div{ 20 | width: 400px; 21 | } 22 | .queryResule .top>div>p>span,.queryResule .top>div:last-child{ 23 | display: inline-block; 24 | width: 230px; 25 | } 26 | .queryResule .top>div>p>span:nth-of-type(1){ 27 | text-align: right; 28 | width: 100px; 29 | } 30 | .queryResule .top>div>p>span:nth-of-type(2){ 31 | text-align: left; 32 | } 33 | .queryResule .top>div>img{ 34 | width: 120px; 35 | height: 160px; 36 | } 37 | .queryResule .bottom{ 38 | background-color: #f6feff; 39 | padding: 20px; 40 | width: 800px; 41 | margin: 20px auto; 42 | border-radius: 6px; 43 | white-space: normal; 44 | margin-top: 30px; 45 | } 46 | p{ 47 | text-align: right; 48 | } 49 | p a{ 50 | text-decoration: underline; 51 | margin-right: 10px; 52 | margin-top: 20px; 53 | } 54 | #tableDiv{ 55 | text-align: center; 56 | width: 800px; 57 | margin: 0 auto; 58 | margin-bottom: 30px; 59 | } 60 | #teble{ 61 | display: block; 62 | margin: 0 auto !important; 63 | border:1px solid #dbdbdb; 64 | text-align: center; 65 | } 66 | td{ 67 | border: 1px solid #dbdbdb; 68 | padding: 5px 10px; 69 | text-align: center; 70 | } 71 | table a{ 72 | text-decoration: underline; 73 | } 74 | -------------------------------------------------------------------------------- /web/static/css/reset.css: -------------------------------------------------------------------------------- 1 | /*清除外边距*/ 2 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, figure, /*结构元素*/ 3 | dl, dt, dd, ul, ol, li, /*列表元素*/ 4 | fieldset, lengend, button, input, textarea, /*表单元素*/ 5 | th, td, /*表格元素*/ 6 | pre /*文本格式元素*/ { 7 | margin: 0; 8 | } 9 | 10 | 11 | /*清除内边距*/ 12 | ul, ol, menu { 13 | padding: 0; 14 | } 15 | 16 | 17 | /*重置列表元素*/ 18 | ul, ol { 19 | list-style: none; 20 | } 21 | 22 | 23 | /*将字体扶正*/ 24 | address, cite, dfn, em, var { 25 | font-style: normal; 26 | } 27 | 28 | 29 | /*清下划线*/ 30 | a { 31 | text-decoration: none; 32 | color: black; 33 | } 34 | /*鼠标略过a标签,显示下划线*/ 35 | a:hover { 36 | /* text-decoration: underline; */ 37 | } 38 | 39 | 40 | /*清浮动*/ 41 | .clear:after { 42 | content: ''; 43 | display: block; 44 | clear: both; 45 | } 46 | -------------------------------------------------------------------------------- /web/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /web/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /web/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /web/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /web/static/images/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/images/head.jpg -------------------------------------------------------------------------------- /web/static/images/icon_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/images/icon_input.png -------------------------------------------------------------------------------- /web/static/images/icon_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/images/icon_list.png -------------------------------------------------------------------------------- /web/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/images/logo.png -------------------------------------------------------------------------------- /web/static/images/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/static/images/vline.gif -------------------------------------------------------------------------------- /web/tpl/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sxguan/education/56f10e61e0d87430ec55b9849f24befd49073232/web/tpl/favicon.ico -------------------------------------------------------------------------------- /web/webServer.go: -------------------------------------------------------------------------------- 1 | /** 2 | @Author : hanxiaodong 3 | */ 4 | 5 | package web 6 | 7 | import ( 8 | "net/http" 9 | "fmt" 10 | "education/web/controller" 11 | ) 12 | 13 | 14 | // 启动Web服务并指定路由信息 15 | func WebStart(app controller.Application) { 16 | 17 | fs:= http.FileServer(http.Dir("web/static")) 18 | http.Handle("/static/", http.StripPrefix("/static/", fs)) 19 | 20 | // 指定路由信息(匹配请求) 21 | http.HandleFunc("/", app.LoginView) 22 | http.HandleFunc("/login", app.Login) 23 | http.HandleFunc("/loginout", app.LoginOut) 24 | 25 | http.HandleFunc("/index", app.Index) 26 | http.HandleFunc("/help", app.Help) 27 | 28 | http.HandleFunc("/addEduInfo", app.AddEduShow) // 显示添加信息页面 29 | http.HandleFunc("/addEdu", app.AddEdu) // 提交信息请求 30 | 31 | http.HandleFunc("/queryPage", app.QueryPage) // 转至根据证书编号与姓名查询信息页面 32 | http.HandleFunc("/query", app.FindCertByNoAndName) // 根据证书编号与姓名查询信息 33 | 34 | http.HandleFunc("/queryPage2", app.QueryPage2) // 转至根据身份证号码查询信息页面 35 | http.HandleFunc("/query2", app.FindByID) // 根据身份证号码查询信息 36 | 37 | 38 | http.HandleFunc("/modifyPage", app.ModifyShow) // 修改信息页面 39 | http.HandleFunc("/modify", app.Modify) // 修改信息 40 | 41 | http.HandleFunc("/upload", app.UploadFile) 42 | 43 | fmt.Println("启动Web服务, 监听端口号为: 9000") 44 | err := http.ListenAndServe(":9000", nil) 45 | if err != nil { 46 | fmt.Printf("Web服务启动失败: %v", err) 47 | } 48 | 49 | } 50 | 51 | 52 | 53 | --------------------------------------------------------------------------------