XML Security Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
struct xmlSecDSigCtx; struct xmlSecDSigResult; enum xmlSecReferenceType; struct xmlSecReferenceResult; |
struct xmlSecDSigCtx { int processManifests; int storeSignatures; int storeReferences; int storeManifests; int fakeSignatures; xmlSecKeyInfoCtx keyInfoCtx; }; |
XML DSig context.
int processManifests | if 0 then <dsig:Manifests> nodes are not processed. |
int storeSignatures | store the signed content just (<dsig:SignedInfo> element) before applying signature. |
int storeReferences | store the result of processing <dsig:Reference> nodes in <dsig:SignedInfo> nodes just before digesting. |
int storeManifests | store the result of processing <dsig:Reference> nodes in <dsig:Manifest> nodes just before digesting (ignored if processManifest is 0). |
int fakeSignatures | for performance testing only. |
xmlSecKeyInfoCtx keyInfoCtx |
struct xmlSecDSigResult { xmlSecDSigCtxPtr ctx; void *context; xmlNodePtr self; int sign; xmlSecTransformStatus result; xmlSecTransformId signMethod; xmlSecKeyPtr key; xmlSecReferenceResultPtr firstSignRef; xmlSecReferenceResultPtr lastSignRef; xmlSecReferenceResultPtr firstManifestRef; xmlSecReferenceResultPtr lastManifestRef; xmlSecBufferPtr buffer; }; |
XML DSig Result.
the DSig context xmlSecDSigCtx. | |
void *context | the pointer to application specific data. |
the pointer to <dsig:Signature> node. | |
int sign | the sign/verify flag. |
xmlSecTransformStatus result | the signature verification/generation status. |
xmlSecTransformId signMethod | the signature algorithm . |
the pointer to signature key. | |
the pointer to the first <dsig:SignedInfo> reference result. | |
the pointer to the last <dsig:SignedInfo> reference result. | |
the pointer to the first <dsig:Manifest> reference result
(valid only if the | |
the pointer to the last <dsig:Manifest> reference result
(valid only if the | |
the pointer to the signed content - the canonicalization of
<dsig:SignedInfo> node (valid only if the |
typedef enum { xmlSecSignedInfoReference, xmlSecManifestReference } xmlSecReferenceType; |
The possible <dsig:Reference> node locations: in the <dsig:SignedInfo> node or in the <dsig:Manifest> node.
struct xmlSecReferenceResult { xmlSecDSigCtxPtr ctx; xmlNodePtr self; xmlSecReferenceType refType; xmlSecTransformStatus result; xmlSecReferenceResultPtr next; xmlSecReferenceResultPtr prev; xmlChar *uri; xmlChar *id; xmlChar *type; xmlSecTransformId digestMethod; xmlSecBufferPtr buffer; }; |
The result of <dsig:Reference> processing.
the pointer to DSig context. | |
the pointer to <dsig:Reference> node. | |
xmlSecReferenceType refType | the <dsig:Reference> node location. |
xmlSecTransformStatus result | the verification/generation result. |
the next reference result. | |
the prev reference result. | |
the <dsig:Reference> node URI attribute. | |
the <dsig:Reference> node Id attribute. | |
the <dsig:Reference> node Type attribute. | |
xmlSecTransformId digestMethod | the used digest algorithm id. |
the pointer to digested content (valid only if
the |
|
Creates new xmlSecDSigCtx structure.
keysMngr : | |
Returns : | pointer to newly allocated xmlSecDSigCtx structure or NULL if an error occurs. |
void xmlSecDSigCtxDestroy ( |
Destroys xmlSecDSigCtx structure ctx.
ctx : | the pointer to xmlSecDSigCtx structure. |
int xmlSecDSigValidate ( |
Validates the signature in signNode and stores the pointer to validation result structure xmlSecDSigResult in the result.
ctx : | the pointer to xmlSecDSigCtx structure. |
context : | the pointer to application specific data that will be passed to all callback functions. |
key : | the key to use (if NULL then the key specified in <dsig:KeyInfo> will be used). |
signNode : | the pointer to <dsig:Signature> node that will be validated. |
result : | the pointer where to store validation results. |
Returns : | 0 if there were no processing errors during validation or a negative
value otherwise. The return value equal to 0 DOES NOT mean that the signature
is valid: check the |
int xmlSecDSigGenerate ( |
Signs the data according to the template in signNode node.
ctx : | the pointer to xmlSecDSigCtx structure. |
context : | the pointer to application specific data that will be passed to all callback functions. |
key : | the key to use (if NULL then the key specified in <dsig:KeyInfo> will be used). |
signNode : | the pointer to <dsig:Signature> template node. |
result : | the pointer where to store signature results. |
Returns : | 0 on success and a negative value otherwise. |
|
Creates new xmlSecDSigResult structure.
ctx : | the pointer to xmlSecDSigCtx structure. |
context : | the pointer to application specific data that will be passed to all callback functions. |
signNode : | the pointer to <dsig:Signature> node that will be validated. |
sign : | the sign or verify flag. |
Returns : | newly created xmlSecDSigResult structure or NULL if an error occurs. |
void xmlSecDSigResultDestroy ( |
Destroys the xmlSecDSigResult structure result.
result : | the pointer to xmlSecDSigResult structure. |
void xmlSecDSigResultDebugDump ( |
Prints the xmlSecDSigResult structure result to file output.
result : | the pointer to xmlSecDSigResult structure. |
output : | the pointer to destination FILE. |
void xmlSecDSigResultDebugXmlDump ( |
Prints the xmlSecDSigResult structure result to file output in XML format.
result : | the pointer to xmlSecDSigResult structure. |
output : | the pointer to destination FILE. |