//ForceTLSMode used to force tls mode and defined tls condition.
ForceTLSMode used to force tls mode and defined tls condition.
// ForceTLSMode used to force tls mode and defined tls condition .
func (lc *HelperLDAP) ForceTLSMode(tlsMode TLSMode, tlsConfig *tls.Config) {
	if tlsConfig != nil {
		lc.tlsConfig = tlsConfig
	} else {
		lc.tlsConfig = &tls.Config{}
	}
	switch tlsMode {
	case TLSModeTLS:
		lc.tlsMode = TLSModeTLS
	case TLSModeStarttls:
		lc.tlsMode = TLSModeStarttls
	case TLSModeNone:
		lc.tlsConfig = nil
		lc.tlsMode = TLSModeNone
	case _TLSModeInit:
		lc.tlsMode = _TLSModeInit
	}
}
func ( lc * HelperLDAP ) ForceTLSMode ( tlsMode TLSMode , tlsConfig * tls . Config ) { if tlsConfig != nil { lc . tlsConfig = tlsConfig } else { lc . tlsConfig = & tls . Config { } } switch tlsMode { case TLSModeTLS : lc . tlsMode = TLSModeTLS case TLSModeStarttls : lc . tlsMode = TLSModeStarttls case TLSModeNone : lc . tlsConfig = nil lc . tlsMode = TLSModeNone case _TLSModeInit : lc . tlsMode = _TLSModeInit } }
ForceTLSMode used to force tls mode and defined tls condition.
ForceTLSMode used to force tls mode and defined tls condition .
//nolint #nosec /* #nosec */