- xmlKey = CFPropertyListCreateXMLData(NULL, key);
- myKeyRef = (xmlData_t)CFDataGetBytePtr(xmlKey);
- myKeyLen = CFDataGetLength(xmlKey);
+ if (!_SCSerialize(key, &xmlKey, (void **)&myKeyRef, &myKeyLen)) {
+ _SCErrorSet(kSCStatusFailed);
+ return FALSE;
+ }