Commit 4478741f authored by suyanlong's avatar suyanlong

Add IBTPX endorse verify function

parent b6bd7d38
Pipeline #8015 failed with stages
...@@ -22,6 +22,7 @@ type router struct { ...@@ -22,6 +22,7 @@ type router struct {
portMap *port.PortMap portMap *port.PortMap
methodMap map[string]routeMethod methodMap map[string]routeMethod
privateKey crypto.PrivateKey privateKey crypto.PrivateKey
hubPublicKey crypto.PublicKey
} }
type routeMethod func([]string) []port.Port type routeMethod func([]string) []port.Port
...@@ -248,7 +249,7 @@ func (r *router) sign(ibtpx *pb.IBTPX) error { ...@@ -248,7 +249,7 @@ func (r *router) sign(ibtpx *pb.IBTPX) error {
// hub endorse // hub endorse
func (r *router) isEndorse(ibtpx *pb.IBTPX) bool { func (r *router) isEndorse(ibtpx *pb.IBTPX) bool {
panic("implement me") return ibtpx.RecursiveVerify(r.hubPublicKey.Verify)
} }
func (r *router) HandlerMethod() {} func (r *router) HandlerMethod() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment