Skip to content

Commit

Permalink
Export CipherSuiteID in connection State
Browse files Browse the repository at this point in the history
  • Loading branch information
itviewer authored and daenney committed Oct 3, 2023
1 parent 8401874 commit 28431d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion state.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type State struct {
localRandom, remoteRandom handshake.Random
masterSecret []byte
cipherSuite CipherSuite // nil if a cipherSuite hasn't been chosen
CipherSuiteID CipherSuiteID

srtpProtectionProfile SRTPProtectionProfile // Negotiated SRTPProtectionProfile
PeerCertificates [][]byte
Expand Down Expand Up @@ -138,7 +139,8 @@ func (s *State) deserialize(serialized serializedState) {
s.masterSecret = serialized.MasterSecret

// Set cipher suite
s.cipherSuite = cipherSuiteForID(CipherSuiteID(serialized.CipherSuiteID), nil)
s.CipherSuiteID = CipherSuiteID(serialized.CipherSuiteID)
s.cipherSuite = cipherSuiteForID(s.CipherSuiteID, nil)

atomic.StoreUint64(&s.localSequenceNumber[epoch], serialized.SequenceNumber)
s.srtpProtectionProfile = SRTPProtectionProfile(serialized.SRTPProtectionProfile)
Expand Down

0 comments on commit 28431d9

Please sign in to comment.