SRTP Marshaling

1. Changed the loop over the SRTP setting bitfield when it is encoded
   for the TLS extension.
This commit is contained in:
John Safranek
2023-02-02 14:49:15 -08:00
parent a4f55b01d6
commit ca999f932c

View File

@ -5698,12 +5698,13 @@ static word16 TLSX_UseSRTP_Write(TlsxSrtp* srtp, byte* output)
word16 offset = 0;
int i, j;
c16toa(srtp->profileCount*2, output+offset);
c16toa(srtp->profileCount * 2, output + offset);
offset += OPAQUE16_LEN;
for (i=0; i< srtp->profileCount; i+=2) {
for (j=0; j<16; j++) {
j = 0;
for (i = 0; i < srtp->profileCount; i++) {
for (; j < 16; j++) {
if (srtp->ids & (1 << j)) {
c16toa(j, output+offset);
c16toa(j, output + offset);
offset += OPAQUE16_LEN;
}
}