func (s *Server) isAuthority(cert ssh.PublicKey) bool {
	// find cert authority by it's key
	cas, err := s.authService.GetCertAuthorities(services.UserCA, false)
	if err != nil {
		log.Warningf("%v", err)
		return false
	}

	for i := range cas {
		checkers, err := cas[i].Checkers()
		if err != nil {
			log.Warningf("%v", err)
			return false
		}
		for _, checker := range checkers {
			if sshutils.KeysEqual(cert, checker) {
				return true
			}
		}
	}
	return false
}
// isAuthority is called during checking the client key, to see if the signing
// key is the real CA authority key.
isAuthority is called during checking the client key, to see if the signing
key is the real CA authority key.
// isAuthority is called during checking the client key to see if the signing // key is the real CA authority key .
func (s *Server) isAuthority(cert ssh.PublicKey) bool {
	cas, err := s.authService.GetCertAuthorities(services.UserCA, false)
	if err != nil {
		log.Warningf("%v", err)
		return false
	}
	for i := range cas {
		checkers, err := cas[i].Checkers()
		if err != nil {
			log.Warningf("%v", err)
			return false
		}
		for _, checker := range checkers {
			if sshutils.KeysEqual(cert, checker) {
				return true
			}
		}
	}
	return false
}
func ( s * Server ) isAuthority ( cert ssh . PublicKey ) bool { cas , err := s . authService . GetCertAuthorities ( services . UserCA , false ) if err != nil { log . Warningf ( " " , err ) return false } for i := range cas { checkers , err := cas [ i ] . Checkers ( ) if err != nil { log . Warningf ( " " , err ) return false } for _ , checker := range checkers { if sshutils . KeysEqual ( cert , checker ) { return true } } } return false }
isAuthority is called during checking the client key, to see if the signing
key is the real CA authority key.
isAuthority is called during checking the client key to see if the signing key is the real CA authority key .
// find cert authority by it's key