2
0

Small build fixes.

[FIXED]     Linker warning about PIE.
[UPDATED]   Login failed is no longer recorded when login attempt was
            not using a password (noisy).
This commit is contained in:
Maarten Billemont 2012-06-27 14:57:05 +02:00
parent 6841ae2b0d
commit 2dba4c87ba
7 changed files with 18 additions and 26 deletions

View File

@ -4324,7 +4324,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Maarten Billemont (DWGU95U4ZD)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Maarten Billemont (DWGU95U4ZD)";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
@ -4384,7 +4383,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Maarten Billemont"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Maarten Billemont";
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"ADHOC=1", "ADHOC=1",
@ -4439,7 +4437,6 @@
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/Crashlytics\"", "\"$(SRCROOT)/Crashlytics\"",
); );
GCC_DYNAMIC_NO_PIC = YES;
GCC_PREFIX_HEADER = "MasterPassword/iOS/MasterPassword-Prefix.pch"; GCC_PREFIX_HEADER = "MasterPassword/iOS/MasterPassword-Prefix.pch";
INFOPLIST_FILE = "MasterPassword/iOS/MasterPassword-Info.plist"; INFOPLIST_FILE = "MasterPassword/iOS/MasterPassword-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 5.0;
@ -4462,7 +4459,6 @@
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/Crashlytics\"", "\"$(SRCROOT)/Crashlytics\"",
); );
GCC_DYNAMIC_NO_PIC = YES;
GCC_PREFIX_HEADER = "MasterPassword/iOS/MasterPassword-Prefix.pch"; GCC_PREFIX_HEADER = "MasterPassword/iOS/MasterPassword-Prefix.pch";
INFOPLIST_FILE = "MasterPassword/iOS/MasterPassword-Info.plist"; INFOPLIST_FILE = "MasterPassword/iOS/MasterPassword-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 5.0;
@ -4533,7 +4529,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Maarten Billemont"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Maarten Billemont";
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"APPSTORE=1", "APPSTORE=1",
@ -4588,7 +4583,6 @@
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/Crashlytics\"", "\"$(SRCROOT)/Crashlytics\"",
); );
GCC_DYNAMIC_NO_PIC = YES;
GCC_PREFIX_HEADER = "MasterPassword/iOS/MasterPassword-Prefix.pch"; GCC_PREFIX_HEADER = "MasterPassword/iOS/MasterPassword-Prefix.pch";
INFOPLIST_FILE = "MasterPassword/iOS/MasterPassword-Info.plist"; INFOPLIST_FILE = "MasterPassword/iOS/MasterPassword-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0; IPHONEOS_DEPLOYMENT_TARGET = 5.0;

View File

@ -40,11 +40,11 @@
</MacroExpansion> </MacroExpansion>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug" buildConfiguration = "AppStore"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES" debugDocumentVersioning = "YES"
allowLocationSimulation = "YES"> allowLocationSimulation = "YES">

View File

@ -128,12 +128,14 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
// No more methods left, fail if key still not known. // No more methods left, fail if key still not known.
if (!tryKey) { if (!tryKey) {
inf(@"Login failed for: %@", user.userID); if (password) {
inf(@"Login failed for: %@", user.userID);
#ifdef TESTFLIGHT_SDK_VERSION #ifdef TESTFLIGHT_SDK_VERSION
[TestFlight passCheckpoint:MPCheckpointSignInFailed]; [TestFlight passCheckpoint:MPCheckpointSignInFailed];
#endif #endif
[[LocalyticsSession sharedLocalyticsSession] tagEvent:MPCheckpointSignInFailed attributes:nil]; [[LocalyticsSession sharedLocalyticsSession] tagEvent:MPCheckpointSignInFailed attributes:nil];
}
return NO; return NO;
} }

View File

@ -18,6 +18,7 @@
NSData *keyForPassword(NSString *password, NSString *username) { NSData *keyForPassword(NSString *password, NSString *username) {
uint32_t nusernameLength = htonl(username.length); uint32_t nusernameLength = htonl(username.length);
NSDate *start = [NSDate date];
NSData *key = [PearlSCrypt deriveKeyWithLength:MP_dkLen fromPassword:[password dataUsingEncoding:NSUTF8StringEncoding] NSData *key = [PearlSCrypt deriveKeyWithLength:MP_dkLen fromPassword:[password dataUsingEncoding:NSUTF8StringEncoding]
usingSalt:[NSData dataByConcatenatingDatas: usingSalt:[NSData dataByConcatenatingDatas:
[@"com.lyndir.masterpassword" dataUsingEncoding:NSUTF8StringEncoding], [@"com.lyndir.masterpassword" dataUsingEncoding:NSUTF8StringEncoding],
@ -26,7 +27,7 @@ NSData *keyForPassword(NSString *password, NSString *username) {
[username dataUsingEncoding:NSUTF8StringEncoding], [username dataUsingEncoding:NSUTF8StringEncoding],
nil] N:MP_N r:MP_r p:MP_p]; nil] N:MP_N r:MP_r p:MP_p];
trc(@"User: %@, password: %@ derives to key ID: %@", username, password, [keyIDForKey(key) encodeHex]); trc(@"User: %@, password: %@ derives to key ID: %@ (took %0.2f)", username, password, [keyIDForKey(key) encodeHex], -[start timeIntervalSinceNow]);
return key; return key;
} }

View File

@ -23,7 +23,7 @@
@property (strong, nonatomic) UILabel *tipView; @property (strong, nonatomic) UILabel *tipView;
@property (weak, nonatomic) IBOutlet id<MPSearchResultsDelegate> delegate; @property (weak, nonatomic) IBOutlet id<MPSearchResultsDelegate> delegate;
@property (weak, nonatomic) IBOutlet UISearchDisplayController *searchDisplayController; @property (strong, nonatomic) IBOutlet UISearchDisplayController *searchDisplayController;
@property (weak, nonatomic) IBOutlet UIView *searchTipContainer; @property (weak, nonatomic) IBOutlet UIView *searchTipContainer;
@end @end

View File

@ -418,15 +418,15 @@
BOOL unlocked = [[MPAppDelegate get] signInAsUser:self.selectedUser usingMasterPassword:self.passwordField.text]; BOOL unlocked = [[MPAppDelegate get] signInAsUser:self.selectedUser usingMasterPassword:self.passwordField.text];
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (unlocked) { if (unlocked)
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (long)(NSEC_PER_SEC * 0.5f)), dispatch_get_main_queue(), ^{ [self dismissViewControllerAnimated:YES completion:nil];
[self dismissViewControllerAnimated:YES completion:nil];
}); else {
} else
if (self.passwordField.text.length) if (self.passwordField.text.length)
[self setPasswordTip:@"Incorrect password."]; [self setPasswordTip:@"Incorrect password."];
[self setSpinnerActive:NO]; [self setSpinnerActive:NO];
}
}); });
}); });
} }

View File

@ -936,10 +936,6 @@ L4m3P4sSw0rD</string>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
<color key="shadowColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> <color key="shadowColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</label> </label>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="keypad.png" id="4tz-l4-4Kj">
<rect key="frame" x="0.0" y="264" width="320" height="216"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view> </view>
@ -1336,7 +1332,6 @@ L4m3P4sSw0rD</string>
<image name="icon_cancel.png" width="32" height="32"/> <image name="icon_cancel.png" width="32" height="32"/>
<image name="icon_edit.png" width="32" height="32"/> <image name="icon_edit.png" width="32" height="32"/>
<image name="icon_plus.png" width="32" height="32"/> <image name="icon_plus.png" width="32" height="32"/>
<image name="keypad.png" width="320" height="216"/>
<image name="tip_alert_black.png" width="235" height="81"/> <image name="tip_alert_black.png" width="235" height="81"/>
<image name="tip_basic_black.png" width="210" height="60"/> <image name="tip_basic_black.png" width="210" height="60"/>
<image name="tip_basic_black_top.png" width="210" height="60"/> <image name="tip_basic_black_top.png" width="210" height="60"/>