X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/ce3c8656732c924baf7e88df75eab50891bdc471..fa7225c82381bac4432a6edf16f53b5370238d85:/SecurityTool/keychain_find.c diff --git a/SecurityTool/keychain_find.c b/SecurityTool/keychain_find.c index da00ab89..9a0ee59e 100644 --- a/SecurityTool/keychain_find.c +++ b/SecurityTool/keychain_find.c @@ -27,7 +27,7 @@ #include "keychain_utilities.h" #include "readline.h" -#include "security.h" +#include "security_tool.h" #include #include @@ -97,37 +97,37 @@ find_first_generic_password(CFTypeRef keychainOrArray, } if (kind != NULL && !primaryKey) { attrs[attrList.count].tag = kSecDescriptionItemAttr; - attrs[attrList.count].length = strlen(kind); + attrs[attrList.count].length = (UInt32) strlen(kind); attrs[attrList.count].data = (void*)kind; attrList.count++; } if (value != NULL && !primaryKey) { attrs[attrList.count].tag = kSecGenericItemAttr; - attrs[attrList.count].length = strlen(value); + attrs[attrList.count].length = (UInt32) strlen(value); attrs[attrList.count].data = (void*)value; attrList.count++; } if (comment != NULL && !primaryKey) { attrs[attrList.count].tag = kSecCommentItemAttr; - attrs[attrList.count].length = strlen(comment); + attrs[attrList.count].length = (UInt32) strlen(comment); attrs[attrList.count].data = (void*)comment; attrList.count++; } if (label != NULL && !primaryKey) { attrs[attrList.count].tag = kSecLabelItemAttr; - attrs[attrList.count].length = strlen(label); + attrs[attrList.count].length = (UInt32) strlen(label); attrs[attrList.count].data = (void*)label; attrList.count++; } if (serviceName != NULL) { attrs[attrList.count].tag = kSecServiceItemAttr; - attrs[attrList.count].length = strlen(serviceName); + attrs[attrList.count].length = (UInt32) strlen(serviceName); attrs[attrList.count].data = (void*)serviceName; attrList.count++; } if (accountName != NULL) { attrs[attrList.count].tag = kSecAccountItemAttr; - attrs[attrList.count].length = strlen(accountName); + attrs[attrList.count].length = (UInt32) strlen(accountName); attrs[attrList.count].data = (void*)accountName; attrList.count++; } @@ -204,43 +204,43 @@ find_first_internet_password(CFTypeRef keychainOrArray, } if (kind != NULL && !primaryKey) { attrs[attrList.count].tag = kSecDescriptionItemAttr; - attrs[attrList.count].length = strlen(kind); + attrs[attrList.count].length = (UInt32) strlen(kind); attrs[attrList.count].data = (void*)kind; attrList.count++; } if (comment != NULL && !primaryKey) { attrs[attrList.count].tag = kSecCommentItemAttr; - attrs[attrList.count].length = strlen(comment); + attrs[attrList.count].length = (UInt32) strlen(comment); attrs[attrList.count].data = (void*)comment; attrList.count++; } if (label != NULL && !primaryKey) { attrs[attrList.count].tag = kSecLabelItemAttr; - attrs[attrList.count].length = strlen(label); + attrs[attrList.count].length = (UInt32) strlen(label); attrs[attrList.count].data = (void*)label; attrList.count++; } if (serverName != NULL) { attrs[attrList.count].tag = kSecServerItemAttr; - attrs[attrList.count].length = strlen(serverName); + attrs[attrList.count].length = (UInt32) strlen(serverName); attrs[attrList.count].data = (void*)serverName; attrList.count++; } if (securityDomain != NULL) { attrs[attrList.count].tag = kSecSecurityDomainItemAttr; - attrs[attrList.count].length = strlen(securityDomain); + attrs[attrList.count].length = (UInt32) strlen(securityDomain); attrs[attrList.count].data = (void *)securityDomain; attrList.count++; } if (accountName != NULL) { attrs[attrList.count].tag = kSecAccountItemAttr; - attrs[attrList.count].length = strlen(accountName); + attrs[attrList.count].length = (UInt32) strlen(accountName); attrs[attrList.count].data = (void *)accountName; attrList.count++; } if (path != NULL) { attrs[attrList.count].tag = kSecPathItemAttr; - attrs[attrList.count].length = strlen(path); + attrs[attrList.count].length = (UInt32) strlen(path); attrs[attrList.count].data = (void *)path; attrList.count++; } @@ -727,7 +727,7 @@ do_keychain_find_certificate(CFTypeRef keychainOrArray, if ((SecCertificateGetData(certificateRef, &data) == noErr) && (SecDigestGetData(CSSM_ALGID_SHA1, &digest, &data) == CSSM_OK)) { unsigned int i; - uint32 len = digest.Length; + size_t len = digest.Length; uint8 *cp = digest.Data; fprintf(stdout, "SHA-1 hash: "); for(i=0; i