diff options
author | Frank Elias <francois.elias@livio.io> | 2021-08-12 08:22:26 -0400 |
---|---|---|
committer | Frank Elias <francois.elias@livio.io> | 2021-08-12 08:22:26 -0400 |
commit | 8061c6e58332c44b14a08a06c687a146645d4ab0 (patch) | |
tree | cc3dcf235f7470ad8c710f4b1e54d57ea247f3fd | |
parent | 49faab29048cdeecd40d4477e73be8f43ec9708e (diff) | |
download | sdl_ios-8061c6e58332c44b14a08a06c687a146645d4ab0.tar.gz |
security query error codes
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | SmartDeviceLink/public/SDLSecurityQueryErrorCode.h | 75 | ||||
-rw-r--r-- | SmartDeviceLink/public/SDLSecurityQueryErrorCode.m | 24 |
3 files changed, 107 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index b4463ef48..cb75a6780 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -1747,6 +1747,8 @@ C971E3F02649D12D00FC24D6 /* NSMutableDictionary+StoreSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = BB3C600D221AEF37007DD4CA /* NSMutableDictionary+StoreSpec.m */; }; C975877F257AEFDB0066F271 /* SDLSeekIndicatorTypeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = C975877E257AEFDB0066F271 /* SDLSeekIndicatorTypeSpec.m */; }; C9758785257F4C570066F271 /* SDLSeekStreamingIndicatorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = C9758784257F4C570066F271 /* SDLSeekStreamingIndicatorSpec.m */; }; + C99BE00926C53E7F00DB0B54 /* SDLSecurityQueryErrorCode.h in Headers */ = {isa = PBXBuildFile; fileRef = C99BE00726C53E7E00DB0B54 /* SDLSecurityQueryErrorCode.h */; }; + C99BE00A26C53E7F00DB0B54 /* SDLSecurityQueryErrorCode.m in Sources */ = {isa = PBXBuildFile; fileRef = C99BE00826C53E7E00DB0B54 /* SDLSecurityQueryErrorCode.m */; }; C9AA62C4261E5035000F49BC /* SDLVoiceCommandManagerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DF40B27208FDA9700DD6FDA /* SDLVoiceCommandManagerSpec.m */; }; C9DFFE78257ACE0000F7D57A /* SDLSeekStreamingIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = C9DFFE76257ACE0000F7D57A /* SDLSeekStreamingIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; }; C9DFFE79257ACE0000F7D57A /* SDLSeekStreamingIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = C9DFFE77257ACE0000F7D57A /* SDLSeekStreamingIndicator.m */; }; @@ -3659,6 +3661,8 @@ C9707D2F25E0444D009D00F2 /* SDLMacros.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLMacros.m; path = private/SDLMacros.m; sourceTree = "<group>"; }; C975877E257AEFDB0066F271 /* SDLSeekIndicatorTypeSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeekIndicatorTypeSpec.m; sourceTree = "<group>"; }; C9758784257F4C570066F271 /* SDLSeekStreamingIndicatorSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeekStreamingIndicatorSpec.m; sourceTree = "<group>"; }; + C99BE00726C53E7E00DB0B54 /* SDLSecurityQueryErrorCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SDLSecurityQueryErrorCode.h; path = public/SDLSecurityQueryErrorCode.h; sourceTree = "<group>"; }; + C99BE00826C53E7E00DB0B54 /* SDLSecurityQueryErrorCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLSecurityQueryErrorCode.m; path = public/SDLSecurityQueryErrorCode.m; sourceTree = "<group>"; }; C9DFFE76257ACE0000F7D57A /* SDLSeekStreamingIndicator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SDLSeekStreamingIndicator.h; path = public/SDLSeekStreamingIndicator.h; sourceTree = "<group>"; }; C9DFFE77257ACE0000F7D57A /* SDLSeekStreamingIndicator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLSeekStreamingIndicator.m; path = public/SDLSeekStreamingIndicator.m; sourceTree = "<group>"; }; C9DFFE7C257AD07E00F7D57A /* SDLSeekIndicatorType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SDLSeekIndicatorType.h; path = public/SDLSeekIndicatorType.h; sourceTree = "<group>"; }; @@ -5575,6 +5579,8 @@ 4ABB27F624F823F20061BF55 /* SDLSamplingRate.m */, 4ABB280524F824600061BF55 /* SDLSeatMemoryActionType.h */, 4ABB280224F8245F0061BF55 /* SDLSeatMemoryActionType.m */, + C99BE00726C53E7E00DB0B54 /* SDLSecurityQueryErrorCode.h */, + C99BE00826C53E7E00DB0B54 /* SDLSecurityQueryErrorCode.m */, C9DFFE7C257AD07E00F7D57A /* SDLSeekIndicatorType.h */, C9DFFE7D257AD07E00F7D57A /* SDLSeekIndicatorType.m */, 4ABB280424F824600061BF55 /* SDLServiceUpdateReason.h */, @@ -7271,6 +7277,7 @@ 4ABB28D524F82A6A0061BF55 /* SDLOnButtonEvent.h in Headers */, 4ABB2B7024F84FE50061BF55 /* SDLFuelRange.h in Headers */, 4ABB25D624F7E7630061BF55 /* SDLImageField+ScreenManagerExtensions.h in Headers */, + C99BE00926C53E7F00DB0B54 /* SDLSecurityQueryErrorCode.h in Headers */, 4ABB299324F845440061BF55 /* SDLSetAppIcon.h in Headers */, 4ABB2A3B24F847980061BF55 /* SDLDeleteInteractionChoiceSetResponse.h in Headers */, 4ABB275324F7FD9C0061BF55 /* SDLECallConfirmationStatus.h in Headers */, @@ -8449,6 +8456,7 @@ 4ABB282F24F824E70061BF55 /* SDLTextAlignment.m in Sources */, 4A8BD31124F938D6000945E3 /* SDLWeatherServiceManifest.m in Sources */, 4ABB271524F7FC4E0061BF55 /* SDLCompassDirection.m in Sources */, + C99BE00A26C53E7F00DB0B54 /* SDLSecurityQueryErrorCode.m in Sources */, 4ABB254424F7E48D0061BF55 /* SDLLockScreenRootViewController.m in Sources */, 4ABB265F24F7F5F20061BF55 /* SDLNotificationDispatcher.m in Sources */, 4A8BD31624F938D6000945E3 /* SDLWindowTypeCapabilities.m in Sources */, diff --git a/SmartDeviceLink/public/SDLSecurityQueryErrorCode.h b/SmartDeviceLink/public/SDLSecurityQueryErrorCode.h new file mode 100644 index 000000000..6b8d5f8d7 --- /dev/null +++ b/SmartDeviceLink/public/SDLSecurityQueryErrorCode.h @@ -0,0 +1,75 @@ +// +// SDLSecurityQueryErrorCode.h +// SmartDeviceLink +// +// Created by Frank Elias on 8/12/21. +// Copyright © 2021 smartdevicelink. All rights reserved. +// + +#import "SDLEnum.h" + +typedef SDLEnum SDLSecurityQueryErrorCode NS_TYPED_ENUM; + +/** + Internal Security Manager value + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SUCCESS; +/** + Wrong size of query data + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INVALID_QUERY_SIZE; +/** + Unknown Query ID + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INVALID_QUERY_ID; +/** + SDL does not support encryption + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_NOT_SUPPORTED; +/** + Received request to protect a service that was protected before + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SERVICE_ALREADY_PROTECTED; +/** + Received handshake or encrypted data for not protected service + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SERVICE_NOT_PROTECTED; +/** + Decryption failed + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_DECRYPTION_FAILED; + +/** + Encryption failed + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_ENCRYPTION_FAILED; + +/** + SSL invalid data + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SSL_INVALID_DATA; + +/** + In case of all other handshake errors + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_HANDSHAKE_FAILED; + +/** + Handshake failed because certificate is invalid + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INVALID_CERT; + +/** + Handshake failed because certificate is expired + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_EXPIRED_CERT; + +/** + Internal error + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INTERNAL; + +/** + Error value for testing + */ +extern SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_UNKNOWN_INTERNAL_ERROR; diff --git a/SmartDeviceLink/public/SDLSecurityQueryErrorCode.m b/SmartDeviceLink/public/SDLSecurityQueryErrorCode.m new file mode 100644 index 000000000..15f54acd9 --- /dev/null +++ b/SmartDeviceLink/public/SDLSecurityQueryErrorCode.m @@ -0,0 +1,24 @@ +// +// SDLSecurityQueryErrorCode.m +// SmartDeviceLink +// +// Created by Frank Elias on 8/12/21. +// Copyright © 2021 smartdevicelink. All rights reserved. +// + +#import "SDLSecurityQueryErrorCode.h" + +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SUCCESS = @"Internal Security Manager value"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INVALID_QUERY_SIZE = @"Wrong size of query data"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INVALID_QUERY_ID = @"Unknown Query ID"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_NOT_SUPPORTED = @"SDL does not support encryption"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SERVICE_ALREADY_PROTECTED = @"Received request to protect a service that was protected before"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SERVICE_NOT_PROTECTED = @"Received handshake or encrypted data for not protected service"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_DECRYPTION_FAILED = @"Decryption failed"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_ENCRYPTION_FAILED = @"Encryption failed"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_SSL_INVALID_DATA = @"SSL invalid data"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_HANDSHAKE_FAILED = @"In case of all other handshake errors"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INVALID_CERT = @"Handshake failed because certificate is invalid"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_EXPIRED_CERT = @"Handshake failed because certificate is expired"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_INTERNAL = @"Internal error"; +SDLSecurityQueryErrorCode const SDLSecurityQueryErrorCode_UNKNOWN_INTERNAL_ERROR = @"Error value for testing"; |