/** * xmlSecKeyReqDebugDump: * @keyReq: the pointer to key requirements object. * @output: the pointer to output FILE. * * Prints debug information about @keyReq into @output. */ void xmlSecKeyReqDebugDump(xmlSecKeyReqPtr keyReq, FILE* output) { xmlSecAssert(keyReq != NULL); xmlSecAssert(output != NULL); fprintf(output, "=== KeyReq:\n"); fprintf(output, "==== keyId: %s\n", (xmlSecKeyDataKlassGetName(keyReq->keyId)) ? xmlSecKeyDataKlassGetName(keyReq->keyId) : BAD_CAST "NULL"); fprintf(output, "==== keyType: 0x%08x\n", keyReq->keyType); fprintf(output, "==== keyUsage: 0x%08x\n", keyReq->keyUsage); fprintf(output, "==== keyBitsSize: %d\n", keyReq->keyBitsSize); xmlSecPtrListDebugDump(&(keyReq->keyUseWithList), output); }
PyObject *xmlsec_PtrListDebugDump(PyObject *self, PyObject *args) { PyObject *list_obj, *output_obj; FILE *output; xmlSecPtrListPtr list; if (CheckArgs(args, "OO:ptrListDebugDump")) { if (!PyArg_ParseTuple(args, "OO:ptrListDebugDump", &list_obj, &output_obj)) return NULL; } else return NULL; list = xmlSecPtrListPtr_get(list_obj); output = PythonFile_get(output_obj); xmlSecPtrListDebugDump(list, output); Py_INCREF(Py_None); return (Py_None); }
/** * xmlSecKeyDebugDump: * @key: the pointer to key. * @output: the pointer to output FILE. * * Prints the information about the @key to the @output. */ void xmlSecKeyDebugDump(xmlSecKeyPtr key, FILE *output) { xmlSecAssert(xmlSecKeyIsValid(key)); xmlSecAssert(output != NULL); fprintf(output, "== KEY\n"); fprintf(output, "=== method: %s\n", (key->value->id->dataNodeName != NULL) ? (char*)(key->value->id->dataNodeName) : "NULL"); fprintf(output, "=== key type: "); if((xmlSecKeyGetType(key) & xmlSecKeyDataTypeSymmetric) != 0) { fprintf(output, "Symmetric\n"); } else if((xmlSecKeyGetType(key) & xmlSecKeyDataTypePrivate) != 0) { fprintf(output, "Private\n"); } else if((xmlSecKeyGetType(key) & xmlSecKeyDataTypePublic) != 0) { fprintf(output, "Public\n"); } else { fprintf(output, "Unknown\n"); } if(key->name != NULL) { fprintf(output, "=== key name: %s\n", key->name); } fprintf(output, "=== key usage: %d\n", key->usage); if(key->notValidBefore < key->notValidAfter) { fprintf(output, "=== key not valid before: %ld\n", (unsigned long)key->notValidBefore); fprintf(output, "=== key not valid after: %ld\n", (unsigned long)key->notValidAfter); } if(key->value != NULL) { xmlSecKeyDataDebugDump(key->value, output); } if(key->dataList != NULL) { xmlSecPtrListDebugDump(key->dataList, output); } }