Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #9

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
osx_image: xcode8.2
os: osx
osx_image: xcode10.3
language: objective-c
xcode_project: STSecurity.xcodeproj
xcode_sdk: iphonesimulator
xcode_scheme: STSecurity
env:
- TRAVIS_XCODE_DESTINATION="platform=iOS Simulator,name=iPhone 6,OS=9.3"
- XCODE_DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=11.4"
branches:
only:
- master
before_script:
- gem install xcpretty
script: set -o pipefail && xcodebuild test -project "${TRAVIS_XCODE_PROJECT}" -scheme "${TRAVIS_XCODE_SCHEME}" -sdk "${TRAVIS_XCODE_SDK}" -destination "${TRAVIS_XCODE_DESTINATION}" | xcpretty
script: set -o pipefail && xcodebuild test -project "${TRAVIS_XCODE_PROJECT}" -scheme "${TRAVIS_XCODE_SCHEME}" -sdk "${TRAVIS_XCODE_SDK}" -destination "${XCODE_DESTINATION}" | xcpretty
698 changes: 404 additions & 294 deletions STSecurity.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

57 changes: 20 additions & 37 deletions STSecurity.xcodeproj/xcshareddata/xcschemes/STSecurity.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -14,26 +14,12 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2CBC57DC1615D8C000FF15E9"
BuildableName = "libSTSecurity.a"
BlueprintIdentifier = "DD859FD535E9714036F7D718"
BuildableName = "STSecurity.framework"
BlueprintName = "STSecurity"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2CBC57ED1615D8C000FF15E9"
BuildableName = "STSecurityTests.xctest"
BlueprintName = "STSecurityTests"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -42,29 +28,27 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD859FD535E9714036F7D718"
BuildableName = "STSecurity.framework"
BlueprintName = "STSecurity"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2CBC57ED1615D8C000FF15E9"
BlueprintIdentifier = "CF357F52923DE8B03DDA6C61"
BuildableName = "STSecurityTests.xctest"
BlueprintName = "STSecurityTests"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2CBC57DC1615D8C000FF15E9"
BuildableName = "libSTSecurity.a"
BlueprintName = "STSecurity"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -79,30 +63,29 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2CBC57DC1615D8C000FF15E9"
BuildableName = "libSTSecurity.a"
BlueprintIdentifier = "DD859FD535E9714036F7D718"
BuildableName = "STSecurity.framework"
BlueprintName = "STSecurity"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2CBC57DC1615D8C000FF15E9"
BuildableName = "libSTSecurity.a"
BlueprintIdentifier = "DD859FD535E9714036F7D718"
BuildableName = "STSecurity.framework"
BlueprintName = "STSecurity"
ReferencedContainer = "container:STSecurity.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
98 changes: 49 additions & 49 deletions STSecurity/Project.xcconfig
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
// Copyright (c) 2013 Scott Talbot. All rights reserved.

SDKROOT = iphoneos
IPHONEOS_DEPLOYMENT_TARGET = 8.0
ALWAYS_SEARCH_USER_PATHS = NO
GCC_DYNAMIC_NO_PIC = NO
GCC_SYMBOLS_PRIVATE_EXTERN = NO
GCC_C_LANGUAGE_STANDARD = gnu99
CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_OBJC_ARC = YES
CLANG_ENABLE_MODULES = YES
CLANG_WARN_EMPTY_BODY = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_UNUSED_VARIABLE = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES
OTHER_LDFLAGS = -ObjC
GCC_TREAT_WARNINGS_AS_ERRORS = YES
CLANG_WARN_ASSIGN_ENUM = YES
GCC_WARN_SIGN_COMPARE = YES
CLANG_WARN_UNREACHABLE_CODE = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
RUN_CLANG_STATIC_ANALYZER = YES
ENABLE_STRICT_OBJC_MSGSEND = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
GCC_WARN_UNUSED_FUNCTION = YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_INFINITE_RECURSION = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
GCC_NO_COMMON_BLOCKS = YES

FRAMEWORK_SEARCH_PATHS = $(SRCROOT)/..

WARNING_CFLAGS = -Weverything -Wno-auto-import -Wno-direct-ivar-access -Wno-documentation-unknown-command -Wno-gnu -Wno-gnu-conditional-omitted-operand -Wno-partial-availability -Wno-reserved-id-macro -Wno-system-headers
//// Copyright (c) 2013 Scott Talbot. All rights reserved.
//
////SDKROOT = iphoneos
////IPHONEOS_DEPLOYMENT_TARGET = 8.0
//ALWAYS_SEARCH_USER_PATHS = NO
//GCC_DYNAMIC_NO_PIC = NO
//GCC_SYMBOLS_PRIVATE_EXTERN = NO
//GCC_C_LANGUAGE_STANDARD = gnu99
//CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
//CLANG_CXX_LIBRARY = libc++
//CLANG_ENABLE_OBJC_ARC = YES
//CLANG_ENABLE_MODULES = YES
//CLANG_WARN_EMPTY_BODY = YES
//GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
//GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
//GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
//GCC_WARN_ABOUT_MISSING_NEWLINE = YES
//CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
//GCC_WARN_UNINITIALIZED_AUTOS = YES
//GCC_WARN_UNUSED_VARIABLE = YES
//CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
//CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
//CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES
//OTHER_LDFLAGS = -ObjC
//GCC_TREAT_WARNINGS_AS_ERRORS = YES
//CLANG_WARN_ASSIGN_ENUM = YES
//GCC_WARN_SIGN_COMPARE = YES
//CLANG_WARN_UNREACHABLE_CODE = YES
//CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
//CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
//RUN_CLANG_STATIC_ANALYZER = YES
//ENABLE_STRICT_OBJC_MSGSEND = YES
//CLANG_WARN_BOOL_CONVERSION = YES
//CLANG_WARN_CONSTANT_CONVERSION = YES
//GCC_WARN_64_TO_32_BIT_CONVERSION = YES
//CLANG_WARN_ENUM_CONVERSION = YES
//CLANG_WARN_INT_CONVERSION = YES
//GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
//GCC_WARN_UNUSED_FUNCTION = YES
//CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
//GCC_WARN_UNDECLARED_SELECTOR = YES
//CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
//CLANG_WARN_INFINITE_RECURSION = YES
//CLANG_WARN_SUSPICIOUS_MOVE = YES
//GCC_NO_COMMON_BLOCKS = YES
//
////FRAMEWORK_SEARCH_PATHS = $(SRCROOT)/..
//
////WARNING_CFLAGS = -Weverything -Wno-auto-import -Wno-direct-ivar-access -Wno-documentation-unknown-command -Wno-gnu -Wno-gnu-conditional-omitted-operand -Wno-partial-availability -Wno-reserved-id-macro -Wno-system-headers
4 changes: 4 additions & 0 deletions STSecurity/STSecurityKeychainAccess+Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
//


@import Security;

#import <STSecurity/STSecurity.h>

static inline CFTypeRef STSecurityKeychainItemAccessibilityToCFType(enum STSecurityKeychainItemAccessibility accessibility) {
switch (accessibility) {
case STSecurityKeychainItemAccessibleWhenUnlocked:
Expand Down
2 changes: 1 addition & 1 deletion STSecurity/STSecurityKeychainAccess+RSA.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Copyright © 2016 Scott Talbot. All rights reserved.
//

#import <STSecurity/STSecurity.h>
//#import <STSecurity/STSecurity.h>

#import "STSecurityKeychainAccess+Internal.h"
#import "STSecurityRSAKey+Internal.h"
Expand Down
12 changes: 6 additions & 6 deletions STSecurity/STSecurityKeychainAccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,24 @@ typedef NS_OPTIONS(NSInteger, STSecurityKeychainItemAccessControl) {

#pragma mark - Password

+ (BOOL)containsPasswordForUsername:(NSString *)username service:(NSString *)service;
+ (BOOL)containsPasswordForUsername:(NSString *)username service:(NSString *)service NS_SWIFT_UNAVAILABLE("");
+ (BOOL)containsPasswordForUsername:(NSString *)username service:(NSString *)service error:(NSError * __autoreleasing *)error;

+ (NSString *)passwordForUsername:(NSString *)username service:(NSString *)service;
+ (NSString *)passwordForUsername:(NSString *)username service:(NSString *)service NS_SWIFT_UNAVAILABLE("");
+ (NSString *)passwordForUsername:(NSString *)username service:(NSString *)service error:(NSError * __autoreleasing *)error;
+ (NSString *)passwordForUsername:(NSString *)username service:(NSString *)service withOptions:(id<STSecurityKeychainReadingOptions>)options error:(NSError * __autoreleasing *)error;

+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service;
+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service NS_SWIFT_UNAVAILABLE("");
+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service error:(NSError * __autoreleasing *)error;
+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service overwriteExisting:(BOOL)overwriteExisting;
+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service overwriteExisting:(BOOL)overwriteExisting NS_SWIFT_UNAVAILABLE("");
+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service overwriteExisting:(BOOL)overwriteExisting error:(NSError * __autoreleasing *)error;
+ (BOOL)setPassword:(NSString *)password forUsername:(NSString *)username service:(NSString *)service withOptions:(id<STSecurityKeychainWritingOptions>)options error:(NSError * __autoreleasing *)error;

+ (BOOL)deletePasswordForUsername:(NSString *)username service:(NSString *)service;
+ (BOOL)deletePasswordForUsername:(NSString *)username service:(NSString *)service NS_SWIFT_UNAVAILABLE("");
+ (BOOL)deletePasswordForUsername:(NSString *)username service:(NSString *)service error:(NSError * __autoreleasing *)error;
+ (BOOL)deletePasswordForUsername:(NSString *)username service:(NSString *)service withOptions:(id<STSecurityKeychainWritingOptions>)options error:(NSError * __autoreleasing *)error;

+ (BOOL)deletePasswordsForService:(NSString *)service;
+ (BOOL)deletePasswordsForService:(NSString *)service NS_SWIFT_UNAVAILABLE("");
+ (BOOL)deletePasswordsForService:(NSString *)service error:(NSError * __autoreleasing *)error;
+ (BOOL)deletePasswordsForService:(NSString *)service withOptions:(id<STSecurityKeychainWritingOptions>)options error:(NSError * __autoreleasing *)error;

Expand Down
Loading