-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Labels
bugA defect in the libraryA defect in the libraryprotocolRelating to the protocol layerRelating to the protocol layer
Description
Bug Summary
When reading a received SEND_INTERNAL_ERROR query from Core, the library cuts off the first bulkData byte:
if (msg.getQueryType() == SecurityQueryType.NOTIFICATION && msg.getQueryID() == SecurityQueryID.SEND_INTERNAL_ERROR) {
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE - 1];
} else {
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE];
}
System.arraycopy(binHeader, SECURITY_QUERY_HEADER_SIZE + _jsonSize, _bulkData, 0, _bulkData.length);
msg.setBulkData(_bulkData);
This results in the library not being able to read this data later:
if (receivedHeader.getBulkData() != null && receivedHeader.getBulkDataSize() == 1) {
DebugTool.logError(TAG, "Security Query module internal error: " + SecurityQueryErrorCode.valueOf(receivedHeader.getBulkData()[0]).getName());
} else {
DebugTool.logError(TAG, "Security Query module error: No information provided");
}
This should be changed to:
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE];
System.arraycopy(binHeader, SECURITY_QUERY_HEADER_SIZE + _jsonSize, _bulkData, 0, _bulkData.length);
msg.setBulkData(_bulkData);
Reproduction Steps
- Attempt to test Encrypted Video Streaming using an app with the app ID
wrong_app_idand the default security lib
Expected Behavior:
Encrypted Video Streaming fails with the following log
Security Query module internal error: INVALID_CERT
Observed Behavior:
Encrypted Video Streaming fails with the following log
Security Query module error: No information provided
Which projects have you seen this bug on?
No response
Android Version(s)
9
Android Device(s)
Galaxy S9
sdl_java_suite Version
develop
Testing Environment(s)
SDL Core `release/8.1.0` branch + Generic_HMI `release/0.12.0` branchRelevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugA defect in the libraryA defect in the libraryprotocolRelating to the protocol layerRelating to the protocol layer