Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TLSConnectionState (0.15 sec)

  1. src/net/smtp/smtp.go

    	}
    	c.conn = tls.Client(c.conn, config)
    	c.Text = textproto.NewConn(c.conn)
    	c.tls = true
    	return c.ehlo()
    }
    
    // TLSConnectionState returns the client's TLS connection state.
    // The return values are their zero values if [Client.StartTLS] did
    // not succeed.
    func (c *Client) TLSConnectionState() (state tls.ConnectionState, ok bool) {
    	tc, ok := c.conn.(*tls.Conn)
    	if !ok {
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. src/net/smtp/smtp_test.go

    		testHookStartTLS(cfg) // set the RootCAs
    		if err := c.StartTLS(cfg); err != nil {
    			t.Errorf("StartTLS: %v", err)
    			return
    		}
    		cs, ok := c.TLSConnectionState()
    		if !ok {
    			t.Errorf("TLSConnectionState returned ok == false; want true")
    			return
    		}
    		if cs.Version == 0 || !cs.HandshakeComplete {
    			t.Errorf("ConnectionState = %#v; expect non-zero Version and HandshakeComplete", cs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
Back to top