Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #499: Mark public Start function as deprecated #508

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

cpuschma
Copy link
Member

@cpuschma cpuschma commented Apr 12, 2024

This reverts the prematurely deprecation of the Start function, because some requirements cannot be implemented via the DialOpts (see #507). This PR reverts this, but adds a warning because of the original intention (see #356)

@cpuschma cpuschma added the bug label Apr 12, 2024
@cpuschma cpuschma merged commit 06d50d1 into go-ldap:master Apr 12, 2024
22 checks passed
@cpuschma cpuschma deleted the fix/revert_499 branch April 12, 2024 09:51
@seveas
Copy link

seveas commented Apr 15, 2024

Thanks @cpuschma! When will this be released? I have some codebases now failing to build, as the linter does not like the use of deprecated functions. For the record, our usecase for this is full control over TLS in a piece of code that's part of our TLS certificate expiration checker:

func (c *ldapCheck) check(ctx context.Context, stats statsd.ClientInterface) *statsd.ServiceCheck {
    ...
    conf := newTLSConfig(c.tlsServerName)
    tlsconn, err := tls.DialWithDialer(&net.Dialer{Timeout: c.timeout}, "tcp4", c.addr, conf)
    if err != nil {
        ....
    }
    defer tlsconn.Close()
    conn := ldap.NewConn(tlsconn, true)
    conn.Start()
    defer conn.Close()

    state, ok := conn.TLSConnectionState()
    if ok {
        ....
    }
    return sc
}

@cpuschma
Copy link
Member Author

cpuschma commented Apr 15, 2024

@seveas I still wanted to fix #506 and fix it in the same new release, but I'm not making any progress so far, but have been able to recreate the problem so far. @johnweldon Is it OK for you if I publish a release for the withdrawn commit or do you want to postpone it?

@johnweldon
Copy link
Member

Go ahead and publish a release. Thanks @cpuschma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants