Ejemplo n.º 1
0
// VerifySignature checks the incoming request agains
func VerifySignature(signed []byte, signature string) error {
	log.Debugf("manager", "verify sig: %v", conf.Coordinator)
	key, err := keyManager.KeyForHost(conf.Coordinator.Address)
	if err != nil {
		return errors.New("Cannot find coordinator key")
	}
	return keys.VerifySignature(key, signed, signature)
}
Ejemplo n.º 2
0
// VerifySignature checks the incoming request agains
func VerifySignature(host string, signed []byte, signature string) error {
	ip := strings.Split(host, ":")
	key, err := keyManager.KeyForHost(ip[0])
	if err != nil {
		return err
	}

	return keys.VerifySignature(key, signed, signature)
}