Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ParseSessionState (0.17 sec)

  1. src/crypto/tls/ticket.go

    	s := make([][]byte, 0, len(certs))
    	for _, c := range certs {
    		s = append(s, c.Raw)
    	}
    	return s
    }
    
    // ParseSessionState parses a [SessionState] encoded by [SessionState.Bytes].
    func ParseSessionState(data []byte) (*SessionState, error) {
    	ss := &SessionState{}
    	s := cryptobyte.String(data)
    	var typ, extMasterSecret, earlyData uint8
    	var cert Certificate
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:23:54 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  2. src/crypto/tls/handshake_messages_test.go

    		}
    	}
    	return reflect.ValueOf(s)
    }
    
    func (s *SessionState) marshal() ([]byte, error) { return s.Bytes() }
    func (s *SessionState) unmarshal(b []byte) bool {
    	ss, err := ParseSessionState(b)
    	if err != nil {
    		return false
    	}
    	*s = *ss
    	return true
    }
    
    func (*endOfEarlyDataMsg) Generate(rand *rand.Rand, size int) reflect.Value {
    	m := &endOfEarlyDataMsg{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. src/crypto/tls/handshake_server.go

    			return nil
    		}
    		sessionState = ss
    	} else {
    		plaintext := c.config.decryptTicket(hs.clientHello.sessionTicket, c.ticketKeys)
    		if plaintext == nil {
    			return nil
    		}
    		ss, err := ParseSessionState(plaintext)
    		if err != nil {
    			return nil
    		}
    		sessionState = ss
    	}
    
    	// TLS 1.2 tickets don't natively have a lifetime, but we want to avoid
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  4. src/crypto/tls/handshake_server_tls13.go

    				continue
    			}
    		} else {
    			plaintext := c.config.decryptTicket(identity.label, c.ticketKeys)
    			if plaintext == nil {
    				continue
    			}
    			var err error
    			sessionState, err = ParseSessionState(plaintext)
    			if err != nil {
    				continue
    			}
    		}
    
    		if sessionState.version != VersionTLS13 {
    			continue
    		}
    
    		createdAt := time.Unix(int64(sessionState.createdAt), 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:23:54 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  5. src/crypto/tls/common.go

    	//
    	// UnwrapSession will usually either decrypt a session state in the ticket
    	// (for example with [Config.EncryptTicket]), or use the ticket as a handle
    	// to recover a previously stored state. It must use [ParseSessionState] to
    	// deserialize the session state.
    	//
    	// If UnwrapSession returns an error, the connection is terminated. If it
    	// returns (nil, nil), the session is ignored. crypto/tls may still choose
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 59.1K bytes
    - Viewed (0)
  6. src/crypto/tls/handshake_client_test.go

    	ticket, state []byte
    }
    
    func (c *serializingClientCache) Get(sessionKey string) (session *ClientSessionState, ok bool) {
    	if c.ticket == nil {
    		return nil, false
    	}
    	state, err := ParseSessionState(c.state)
    	if err != nil {
    		c.t.Error(err)
    		return nil, false
    	}
    	cs, err := NewResumptionState(c.ticket, state)
    	if err != nil {
    		c.t.Error(err)
    		return nil, false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 88.7K bytes
    - Viewed (0)
Back to top