You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the Record class supports the shouldPrepare option; however,
the sendConfiguration and sendData methods in the RecordLayer class currently do not account for cases where shouldPrepare is set to false.
To enhance functionality, I suggest adding a check for shouldPrepare within both sendConfiguration and sendData methods before creating a RecordPreparator object.
Here's an example of how this could be implemented
for (Record record : records) {
ProtocolMessageType contentType = record.getContentMessageType();
if (contentType == null) {
contentType = type;
}
if (encryptor.getRecordCipher(writeEpoch).getState().getVersion().isDTLS()) {
record.setEpoch(writeEpoch);
}
// add checking shouldPrepare option
if (record.shouldPrepare()){
RecordPreparator preparator =
record.getRecordPreparator(context, encryptor, compressor, contentType);
preparator.prepare();
preparator.afterPrepare();
}
Additionally, while the RecordLayer class extends ProtocolLayer class, which implements the prepareDataContainer method,
it currently supports only a default record preparator, which assigns null value to both the encryptor and decryptor fields.
The text was updated successfully, but these errors were encountered:
Hello,
I noticed that the
Record
class supports theshouldPrepare
option; however,the
sendConfiguration
andsendData
methods in theRecordLayer
class currently do not account for cases whereshouldPrepare
is set to false.To enhance functionality, I suggest adding a check for
shouldPrepare
within bothsendConfiguration
andsendData
methods before creating a RecordPreparator object.Here's an example of how this could be implemented
In the
sendConfiguration
methodIn the
sendData
methodAdditionally, while the
RecordLayer
class extendsProtocolLayer
class, which implements theprepareDataContainer
method,it currently supports only a default record preparator, which assigns
null
value to both theencryptor
anddecryptor
fields.The text was updated successfully, but these errors were encountered: