summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Elias <francois.elias@livio.io>2021-09-02 09:57:26 -0400
committerFrank Elias <francois.elias@livio.io>2021-09-02 09:57:26 -0400
commit5eb09a4e316ab9e55575a34074945ee7579bdec9 (patch)
tree76a72ddebcb9361ff2f105838cb1521c476343a3
parent097ccecf5f907805a4df6d7cd8f9e56d15b9453a (diff)
downloadsdl_ios-5eb09a4e316ab9e55575a34074945ee7579bdec9.tar.gz
Android alignment
Send Handshake Check added
-rw-r--r--SmartDeviceLink/private/SDLProtocol.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/SmartDeviceLink/private/SDLProtocol.m b/SmartDeviceLink/private/SDLProtocol.m
index fc70b160e..a32e32044 100644
--- a/SmartDeviceLink/private/SDLProtocol.m
+++ b/SmartDeviceLink/private/SDLProtocol.m
@@ -805,6 +805,12 @@ NS_ASSUME_NONNULL_BEGIN
return;
}
+ if (clientSecurityQueryPayload.queryID != SDLSecurityQueryIdSendHandshake
+ && !(clientSecurityQueryPayload.queryType == SDLSecurityQueryTypeRequest || clientSecurityQueryPayload.queryType == SDLSecurityQueryTypeNotification)) {
+ SDLLogE(@"Security Query module error: Message is not a SEND_HANDSHAKE_DATA REQUEST");
+ return;
+ }
+
// Tear off the binary header of the client protocol message to get at the actual TLS handshake
// TODO: (Joel F.)[2016-02-15] Should check for errors
NSData *clientHandshakeData = [clientHandshakeMessage.payload subdataWithRange:NSMakeRange(12, (clientHandshakeMessage.payload.length - 12))];