• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Security-57031.1.35/Security/sec/Security/

Lines Matching +defs:key +defs:description

163 bool SecXPCDictionarySetPList(xpc_object_t message, const char *key, CFTypeRef object, CFErrorRef *error)
166 return SecError(errSecParam, error, CFSTR("object for key %s is NULL"), key);
180 xpc_dictionary_set_data(message, key, der_start, der_end - der_start);
185 bool SecXPCDictionarySetPListOptional(xpc_object_t message, const char *key, CFTypeRef object, CFErrorRef *error) {
186 return !object || SecXPCDictionarySetPList(message, key, object, error);
189 bool SecXPCDictionarySetData(xpc_object_t message, const char *key, CFDataRef data, CFErrorRef *error)
192 return SecError(errSecParam, error, CFSTR("data for key %s is NULL"), key);
194 xpc_dictionary_set_data(message, key, CFDataGetBytePtr(data), CFDataGetLength(data));
198 bool SecXPCDictionarySetString(xpc_object_t message, const char *key, CFStringRef string, CFErrorRef *error)
201 return SecError(errSecParam, error, CFSTR("string for key %s is NULL"), key);
206 xpc_dictionary_set_string(message, key, utf8Str);
208 ok = SecError(errSecParam, error, CFSTR("failed to convert string for key %s to utf8"), key);
213 bool SecXPCDictionarySetDataOptional(xpc_object_t message, const char *key, CFDataRef data, CFErrorRef *error) {
214 return !data || SecXPCDictionarySetData(message, key, data, error);
217 CFArrayRef SecXPCDictionaryCopyArray(xpc_object_t message, const char *key, CFErrorRef *error) {
218 CFTypeRef array = SecXPCDictionaryCopyPList(message, key, error);
222 CFStringRef description = CFCopyTypeIDDescription(type_id);
223 SecError(errSecParam, error, CFSTR("object for key %s not array but %@"), key, description);
224 CFReleaseNull(description);
231 bool SecXPCDictionaryCopyArrayOptional(xpc_object_t message, const char *key, CFArrayRef *parray, CFErrorRef *error) {
232 if (!xpc_dictionary_get_value(message, key)) {
236 *parray = SecXPCDictionaryCopyArray(message, key, error);
240 CFDataRef SecXPCDictionaryCopyData(xpc_object_t message, const char *key, CFErrorRef *error) {
243 const uint8_t *bytes = xpc_dictionary_get_data(message, key, &size);
245 SecError(errSecParam, error, CFSTR("no data for key %s"), key);
251 SecError(errSecParam, error, CFSTR("failed to create data for key %s"), key);
256 bool SecXPCDictionaryCopyDataOptional(xpc_object_t message, const char *key, CFDataRef *pdata, CFErrorRef *error) {
258 if (!xpc_dictionary_get_data(message, key, &size)) {
262 *pdata = SecXPCDictionaryCopyData(message, key, error);
266 CFDictionaryRef SecXPCDictionaryCopyDictionary(xpc_object_t message, const char *key, CFErrorRef *error) {
267 CFTypeRef dict = SecXPCDictionaryCopyPList(message, key, error);
271 CFStringRef description = CFCopyTypeIDDescription(type_id);
272 SecError(errSecParam, error, CFSTR("object for key %s not dictionary but %@"), key, description);
273 CFReleaseNull(description);
280 bool SecXPCDictionaryCopyDictionaryOptional(xpc_object_t message, const char *key, CFDictionaryRef *pdictionary, CFErrorRef *error) {
281 if (!xpc_dictionary_get_value(message, key)) {
285 *pdictionary = SecXPCDictionaryCopyDictionary(message, key, error);
289 CFTypeRef SecXPCDictionaryCopyPList(xpc_object_t message, const char *key, CFErrorRef *error)
293 const uint8_t *der = xpc_dictionary_get_data(message, key, &size);
295 SecError(errSecParam, error, CFSTR("no object for key %s"), key);
303 SecError(errSecParam, error, CFSTR("trailing garbage after der decoded object for key %s"), key);
309 bool SecXPCDictionaryCopyPListOptional(xpc_object_t message, const char *key, CFTypeRef *pobject, CFErrorRef *error) {
311 if (!xpc_dictionary_get_data(message, key, &size)) {
315 *pobject = SecXPCDictionaryCopyPList(message, key, error);
319 CFStringRef SecXPCDictionaryCopyString(xpc_object_t message, const char *key, CFErrorRef *error) {
320 const char *string = xpc_dictionary_get_string(message, key);
324 SecError(errSecAllocate, error, CFSTR("object for key %s failed to convert %s to CFString"), key, string);
328 SecError(errSecParam, error, CFSTR("object for key %s not string"), key);