Fix custom extension example

This commit is contained in:
fedosgad 2022-08-25 12:52:17 +03:00 committed by GitHub
parent 71bb385850
commit 69d19c5dc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,11 +190,13 @@ func (e *FakeDelegatedCredentialsExtension) Read(b []byte) (n int, err error) {
// Extension type
appendUint16(fakeDelegatedCredentials)
algosLength := 2 * len(e.SignatureAlgorithms)
// Extension data length
appendUint16(uint16(len(e.SignatureAlgorithms)) + 2)
appendUint16(uint16(algosLength) + 2)
// Algorithms list length
appendUint16(uint16(len(e.SignatureAlgorithms)))
appendUint16(uint16(algosLength))
// Algorithms list
for _, a := range e.SignatureAlgorithms {