[Keychain-commit] SF.net SVN: keychain: [451] trunk/Frameworks/Keychain/Keychain/Keychain.m
Status: Abandoned
Brought to you by:
wadetregaskis
From: <wad...@us...> - 2008-01-12 23:07:21
|
Revision: 451 http://keychain.svn.sourceforge.net/keychain/?rev=451&view=rev Author: wadetregaskis Date: 2008-01-12 15:07:25 -0800 (Sat, 12 Jan 2008) Log Message: ----------- * Removed redundant calls to -[Key CSSMKey]. Modified Paths: -------------- trunk/Frameworks/Keychain/Keychain/Keychain.m Modified: trunk/Frameworks/Keychain/Keychain/Keychain.m =================================================================== --- trunk/Frameworks/Keychain/Keychain/Keychain.m 2008-01-08 04:16:45 UTC (rev 450) +++ trunk/Frameworks/Keychain/Keychain/Keychain.m 2008-01-12 23:07:25 UTC (rev 451) @@ -750,7 +750,8 @@ if (noErr == _error) { SecKeychainAttributeList attributeList; SecKeychainAttribute attribute[8]; - + const CSSM_KEY *rawKey = [key CSSMKey]; + attributeList.count = 8; attributeList.attr = attribute; @@ -797,7 +798,7 @@ recType = CSSM_DL_DB_RECORD_ALL_KEYS; } - keyHeader = &([key CSSMKey]->KeyHeader); + keyHeader = &(rawKey->KeyHeader); recTypeData.Data = (uint8*)&recType; cspIdData.Data = (uint8*)&keyHeader->CspId; @@ -809,7 +810,7 @@ printNameData.Data = (uint8*)[name cString]; printNameData.Length = [name cStringLength]; - keySize = [key CSSMKey]->KeyData.Length * 8; + keySize = rawKey->KeyData.Length * 8; keySizeData.Data = (uint8*)&keySize; attr->Info.AttributeNameFormat = CSSM_DB_ATTRIBUTE_NAME_AS_STRING; @@ -1049,7 +1050,7 @@ recordAttrs.NumberOfAttributes = attributeCount; recordAttrs.AttributeData = attrs; - _error = CSSM_DL_DataInsert(DLDBHandle, recType, &recordAttrs, &([key CSSMKey]->KeyData), &recordPtr); + _error = CSSM_DL_DataInsert(DLDBHandle, recType, &recordAttrs, &(rawKey->KeyData), &recordPtr); if (CSSM_OK == _error) { //const CSSM_DB_UNIQUE_RECORD *currentUniqueID; @@ -1090,7 +1091,7 @@ } } else { PSYSLOGND(LOG_ERR, @"Unable to insert key into keychain, error %@.\n", CSSMErrorAsString(_error)); - PDEBUG(@"CSSM_DL_DataInsert(%"PRIdldbHandle", %"PRIu32", %p, %p, %p) returned error %@.\n", DLDBHandle, recType, &recordAttrs, &([key CSSMKey]->KeyData), &recordPtr, CSSMErrorAsString(_error)); + PDEBUG(@"CSSM_DL_DataInsert(%"PRIdldbHandle", %"PRIu32", %p, %p, %p) returned error %@.\n", DLDBHandle, recType, &recordAttrs, &(rawKey->KeyData), &recordPtr, CSSMErrorAsString(_error)); } } else { PSYSLOGND(LOG_ERR, @"Unable to get DLDB handle in order to add key, error %@.\n", CSSMErrorAsString(_error)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |