// GetVerified returns the Verified field if it's non-nil, zero value otherwise.
355289
func (u *UserEmail) GetVerified() bool {
	if u == nil || u.Verified == nil {
		return false
	}
	return *u.Verified
}
374668
func (b *BigIP) GetCertificate(name string) (*Certificate, error) {
	var cert Certificate
	err, ok := b.getForEntity(&cert, uriSys, uriFile, uriSslCert, name)
	if err != nil {
		return nil, err
	}
	if !ok {
		return nil, nil
	}

	return &cert, nil
}
20398
func (s *SnapshotCreateRepositoryService) Verify(verify bool) *SnapshotCreateRepositoryService {
	s.verify = &verify
	return s
}
85988
func (lkp *lookupInternal) Verify(vcursor VCursor, ids, values []sqltypes.Value) ([]bool, error) {
	out := make([]bool, len(ids))
	for i, id := range ids {
		bindVars := map[string]*querypb.BindVariable{
			lkp.FromColumns[0]: sqltypes.ValueBindVariable(id),
			lkp.To:             sqltypes.ValueBindVariable(values[i]),
		}
		var err error
		var result *sqltypes.Result
		if lkp.Autocommit {
			result, err = vcursor.ExecuteAutocommit("VindexVerify", lkp.ver, bindVars, true /* isDML */)
		} else {
			result, err = vcursor.Execute("VindexVerify", lkp.ver, bindVars, true /* isDML */)
		}
		if err != nil {
			return nil, fmt.Errorf("lookup.Verify: %v", err)
		}
		out[i] = (len(result.Rows) != 0)
	}
	return out, nil
}
1120512
func Verify(id string, digits []byte) bool {
	if digits == nil || len(digits) == 0 {
		return false
	}
	reald := globalStore.Get(id, true)
	if reald == nil {
		return false
	}
	return bytes.Equal(digits, reald)
}
458250
func (c CertificateStore) GetBestCertificate(clientHello *tls.ClientHelloInfo) *tls.Certificate {
	domainToCheck := strings.ToLower(strings.TrimSpace(clientHello.ServerName))
	if len(domainToCheck) == 0 {
		// If no ServerName is provided, Check for local IP address matches
		host, _, err := net.SplitHostPort(clientHello.Conn.LocalAddr().String())
		if err != nil {
			log.Debugf("Could not split host/port: %v", err)
		}
		domainToCheck = strings.TrimSpace(host)
	}

	if cert, ok := c.CertCache.Get(domainToCheck); ok {
		return cert.(*tls.Certificate)
	}

	matchedCerts := map[string]*tls.Certificate{}
	if c.DynamicCerts != nil && c.DynamicCerts.Get() != nil {
		for domains, cert := range c.DynamicCerts.Get().(map[string]*tls.Certificate) {
			for _, certDomain := range strings.Split(domains, ",") {
				if MatchDomain(domainToCheck, certDomain) {
					matchedCerts[certDomain] = cert
				}
			}
		}
	}

	if len(matchedCerts) > 0 {
		// sort map by keys
		keys := make([]string, 0, len(matchedCerts))
		for k := range matchedCerts {
			keys = append(keys, k)
		}
		sort.Strings(keys)

		// cache best match
		c.CertCache.SetDefault(domainToCheck, matchedCerts[keys[len(keys)-1]])
		return matchedCerts[keys[len(keys)-1]]
	}

	return nil
}
525221
func (v *Verifier) Verify() error {
	if v.Identity == nil {
		return fmt.Errorf("no identity document to verify")
	}

	if v.Signature == nil {
		return fmt.Errorf("no signature found for verification")
	}

	signature := fmt.Sprintf("-----BEGIN PKCS7-----\n%s\n-----END PKCS7-----", v.Signature)
	block, rest := pem.Decode([]byte(signature))
	if len(rest) != 0 {
		return fmt.Errorf("Unable to decode signature")
	}

	sigData, err := pkcs7.Parse(block.Bytes)
	if err != nil {
		return fmt.Errorf("Unable to parse signature")
	}

	awsCert, err := awsPublicCert()
	if err != nil {
		return nil
	}

	sigData.Certificates = []*x509.Certificate{awsCert}

	if err := sigData.Verify(); err != nil {
		return fmt.Errorf("failed to verify")
	}

	if subtle.ConstantTimeCompare(v.Identity, sigData.Content) != 1 {
		return fmt.Errorf("failed to validate instance metadata")
	}

	var signedIdentityDoc identityDocument
	json.Unmarshal(sigData.Content, &signedIdentityDoc)
	elapsed := time.Since(signedIdentityDoc.PendingTime)
	if elapsed.Minutes() > BootstrapTime {
		return fmt.Errorf(
			"failed validation - this server has beens started more than %d minutes ago",
			BootstrapTime,
		)
	}

	return nil
}
797216
func partialVerify(certs []*x509.Certificate) bool {
	n := len(certs)
	if n == 0 {
		return false
	}
	for i := 0; i < n-1; i++ {
		if certs[i].CheckSignatureFrom(certs[i+1]) != nil {
			return false
		}
	}
	return true
}
468611
func (p *Pollster) EnterVerify(valueName string, verify VerifyFunc) (string, error) {
	return QueryVerify("Enter "+valueName+": ", p.scanner, p.out, p.errOut, verify)
}
937741
func (g *GPGEmail) GetVerified() bool {
	if g == nil || g.Verified == nil {
		return false
	}
	return *g.Verified
}
533839
func (a *APIMeta) GetVerifiablePasswordAuthentication() bool {
	if a == nil || a.VerifiablePasswordAuthentication == nil {
		return false
	}
	return *a.VerifiablePasswordAuthentication
}
931561
func (c *Conn) GetVerifyResults() error {
	result := C.SSL_get_verify_result(c.ssl)
	if int(result) != 0 {
		return errors.New(C.GoString(
			C.X509_verify_cert_error_string(result)))
	}
	return nil
}
606772
func (r Account_ProofOfConcept) GetReviewerAccessToken(unverifiedAuthenticationCode *string) (resp string, err error) {
	params := []interface{}{
		unverifiedAuthenticationCode,
	}
	err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getReviewerAccessToken", params, &r.Options, &resp)
	return
}
259476
func (d *domainClient) GetCertificate(ctx context.Context, args *GetCertificateArgs) (reply *GetCertificateReply, err error) {
	reply = new(GetCertificateReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Network.getCertificate", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Network.getCertificate", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Network", Op: "GetCertificate", Err: err}
	}
	return
}
1301798
func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool {
	return verifyIat(c.IssuedAt, cmp, req)
}
703388
func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
	m.rw.RLock()
	defer m.rw.RUnlock()

	return m.cert, nil
}
923657
func (u *User) Verify(msg []byte, sig []byte) error {
	return errors.New("not implemented")
}