// applyDefaultIdentity sets the options for the default identity if the
// identity file is present. The identity is enabled by default.
applyDefaultIdentity sets the options for the default identity if the
identity file is present. The identity is enabled by default.
// applyDefaultIdentity sets the options for the default identity if the // identity file is present . The identity is enabled by default .
func (o *clientOptions) applyDefaultIdentity() error {
	if DisableIdentity {
		return nil
	}
	i, err := identity.LoadDefaultIdentity()
	if err != nil {
		return nil
	}
	if err := i.Validate(); err != nil {
		return nil
	}
	crt, err := i.TLSCertificate()
	if err != nil {
		return nil
	}
	o.certificate = crt
	o.getClientCertificate = i.GetClientCertificateFunc()
	return nil
}
func ( o * clientOptions ) applyDefaultIdentity ( ) error { if DisableIdentity { return nil } i , err := identity . LoadDefaultIdentity ( ) if err != nil { return nil } if err := i . Validate ( ) ; err != nil { return nil } crt , err := i . TLSCertificate ( ) if err != nil { return nil } o . certificate = crt o . getClientCertificate = i . GetClientCertificateFunc ( ) return nil }
applyDefaultIdentity sets the options for the default identity if the
identity file is present.
applyDefaultIdentity sets the options for the default identity if the identity file is present .
// Do not load an identity if something fails