Add setters for SessionState fields createdAt, UseBy, and AgeAdd

This commit is contained in:
Amir Khan 2024-07-11 14:32:43 -04:00
parent 925bfb39ab
commit 86e2d5e29b

View file

@ -691,6 +691,12 @@ func (css *ClientSessionState) SetCipherSuite(CipherSuite uint16) {
}
css.session.cipherSuite = CipherSuite
}
func (css *ClientSessionState) SetCreatedAt(createdAt uint64) {
if css.session == nil {
css.session = &SessionState{}
}
css.session.createdAt = createdAt
}
func (css *ClientSessionState) SetMasterSecret(MasterSecret []byte) {
if css.session == nil {
css.session = &SessionState{}
@ -715,6 +721,18 @@ func (css *ClientSessionState) SetVerifiedChains(VerifiedChains [][]*x509.Certif
}
css.session.verifiedChains = VerifiedChains
}
func (css *ClientSessionState) SetUseBy(useBy uint64) {
if css.session == nil {
css.session = &SessionState{}
}
css.session.useBy = useBy
}
func (css *ClientSessionState) SetAgeAdd(ageAdd uint32) {
if css.session == nil {
css.session = &SessionState{}
}
css.session.ageAdd = ageAdd
}
// TicketKey is the internal representation of a session ticket key.
type TicketKey struct {