Synopsis
xmlNodePtrxmlSecTmplSignatureCreate (xmlDocPtr doc
,
xmlSecTransformId c14nMethodId
,
xmlSecTransformId signMethodId
,
const xmlChar *id
);
xmlNodePtrxmlSecTmplSignatureCreateNsPref (xmlDocPtr doc
,
xmlSecTransformId c14nMethodId
,
xmlSecTransformId signMethodId
,
const xmlChar *id
,
const xmlChar *nsPrefix
);
xmlNodePtrxmlSecTmplSignatureEnsureKeyInfo (xmlNodePtr signNode
,
const xmlChar *id
);
xmlNodePtrxmlSecTmplSignatureAddReference (xmlNodePtr signNode
,
xmlSecTransformId digestMethodId
,
const xmlChar *id
,
const xmlChar *uri
,
const xmlChar *type
);
xmlNodePtrxmlSecTmplSignatureAddObject (xmlNodePtr signNode
,
const xmlChar *id
,
const xmlChar *mimeType
,
const xmlChar *encoding
);
xmlNodePtrxmlSecTmplSignatureGetSignMethodNode
(xmlNodePtr signNode
);
xmlNodePtrxmlSecTmplSignatureGetC14NMethodNode
(xmlNodePtr signNode
);
xmlNodePtrxmlSecTmplReferenceAddTransform (xmlNodePtr referenceNode
,
xmlSecTransformId transformId
);
xmlNodePtrxmlSecTmplObjectAddSignProperties (xmlNodePtr objectNode
,
const xmlChar *id
,
const xmlChar *target
);
xmlNodePtrxmlSecTmplObjectAddManifest (xmlNodePtr objectNode
,
const xmlChar *id
);
xmlNodePtrxmlSecTmplManifestAddReference (xmlNodePtr manifestNode
,
xmlSecTransformId digestMethodId
,
const xmlChar *id
,
const xmlChar *uri
,
const xmlChar *type
);
xmlNodePtrxmlSecTmplEncDataCreate (xmlDocPtr doc
,
xmlSecTransformId encMethodId
,
const xmlChar *id
,
const xmlChar *type
,
const xmlChar *mimeType
,
const xmlChar *encoding
);
xmlNodePtrxmlSecTmplEncDataEnsureKeyInfo (xmlNodePtr encNode
,
const xmlChar *id
);
xmlNodePtrxmlSecTmplEncDataEnsureEncProperties
(xmlNodePtr encNode
,
const xmlChar *id
);
xmlNodePtrxmlSecTmplEncDataAddEncProperty (xmlNodePtr encNode
,
const xmlChar *id
,
const xmlChar *target
);
xmlNodePtrxmlSecTmplEncDataEnsureCipherValue (xmlNodePtr encNode
);
xmlNodePtrxmlSecTmplEncDataEnsureCipherReference
(xmlNodePtr encNode
,
const xmlChar *uri
);
xmlNodePtrxmlSecTmplEncDataGetEncMethodNode (xmlNodePtr encNode
);
xmlNodePtrxmlSecTmplCipherReferenceAddTransform
(xmlNodePtr cipherReferenceNode
,
xmlSecTransformId transformId
);
xmlNodePtrxmlSecTmplReferenceListAddDataReference
(xmlNodePtr encNode
,
const xmlChar *uri
);
xmlNodePtrxmlSecTmplReferenceListAddKeyReference
(xmlNodePtr encNode
,
const xmlChar *uri
);
xmlNodePtrxmlSecTmplKeyInfoAddKeyName (xmlNodePtr keyInfoNode
,
const xmlChar *name
);
xmlNodePtrxmlSecTmplKeyInfoAddKeyValue (xmlNodePtr keyInfoNode
);
xmlNodePtrxmlSecTmplKeyInfoAddX509Data (xmlNodePtr keyInfoNode
);
xmlNodePtrxmlSecTmplKeyInfoAddRetrievalMethod (xmlNodePtr keyInfoNode
,
const xmlChar *uri
,
const xmlChar *type
);
xmlNodePtrxmlSecTmplRetrievalMethodAddTransform
(xmlNodePtr retrMethodNode
,
xmlSecTransformId transformId
);
xmlNodePtrxmlSecTmplKeyInfoAddEncryptedKey (xmlNodePtr keyInfoNode
,
xmlSecTransformId encMethodId
,
const xmlChar *id
,
const xmlChar *type
,
const xmlChar *recipient
);
xmlNodePtrxmlSecTmplX509DataAddIssuerSerial (xmlNodePtr x509DataNode
);
xmlNodePtrxmlSecTmplX509IssuerSerialAddIssuerName
(xmlNodePtr x509IssuerSerialNode
,
const xmlChar *issuerName
);
xmlNodePtrxmlSecTmplX509IssuerSerialAddSerialNumber
(xmlNodePtr x509IssuerSerialNode
,
const xmlChar *serial
);
xmlNodePtrxmlSecTmplX509DataAddSubjectName (xmlNodePtr x509DataNode
);
xmlNodePtrxmlSecTmplX509DataAddSKI (xmlNodePtr x509DataNode
);
xmlNodePtrxmlSecTmplX509DataAddCertificate (xmlNodePtr x509DataNode
);
xmlNodePtrxmlSecTmplX509DataAddCRL (xmlNodePtr x509DataNode
);
intxmlSecTmplTransformAddHmacOutputLength
(xmlNodePtr transformNode
,
xmlSecSize bitsLen
);
intxmlSecTmplTransformAddRsaOaepParam (xmlNodePtr transformNode
,
const xmlSecByte *buf
,
xmlSecSize size
);
intxmlSecTmplTransformAddXsltStylesheet
(xmlNodePtr transformNode
,
const xmlChar *xslt
);
intxmlSecTmplTransformAddC14NInclNamespaces
(xmlNodePtr transformNode
,
const xmlChar *prefixList
);
intxmlSecTmplTransformAddXPath (xmlNodePtr transformNode
,
const xmlChar *expression
,
const xmlChar **nsList
);
intxmlSecTmplTransformAddXPath2 (xmlNodePtr transformNode
,
const xmlChar *type
,
const xmlChar *expression
,
const xmlChar **nsList
);
intxmlSecTmplTransformAddXPointer (xmlNodePtr transformNode
,
const xmlChar *expression
,
const xmlChar **nsList
);
Details
xmlSecTmplSignatureCreateNsPref ()
xmlNodePtr xmlSecTmplSignatureCreateNsPref (xmlDocPtr doc
,
xmlSecTransformId c14nMethodId
,
xmlSecTransformId signMethodId
,
const xmlChar *id
,
const xmlChar *nsPrefix
);
Creates new <dsig:Signature/> node with the mandatory
<dsig:SignedInfo/>, <dsig:CanonicalizationMethod/>,
<dsig:SignatureMethod/> and <dsig:SignatureValue/> children and
sub-children. This method differs from xmlSecTmplSignatureCreate in
that it will define the http://www.w3.org/2000/09/xmldsig#
namespace with the given prefix that will be used for all of the
appropriate child nodes. The application is responsible for
inserting the returned node in the XML document.
doc : |
the pointer to signature document or NULL; in the
second case, application must later call xmlSetTreeDoc
to ensure that all the children nodes have correct
pointer to XML document. |
c14nMethodId : |
the signature canonicalization method. |
signMethodId : |
the signature method. |
id : |
the node id (may be NULL). |
nsPrefix : |
the namespace prefix for the signature element (e.g. "dsig"), or NULL |
Returns : |
the pointer to newly created <dsig:Signature/> node or NULL if an
error occurs. |
xmlSecTmplSignatureEnsureKeyInfo ()
xmlNodePtr xmlSecTmplSignatureEnsureKeyInfo (xmlNodePtr signNode
,
const xmlChar *id
);
Adds (if necessary) <dsig:KeyInfo/> node to the <dsig:Signature/>
node signNode
.
xmlSecTmplSignatureAddReference ()
xmlNodePtr xmlSecTmplSignatureAddReference (xmlNodePtr signNode
,
xmlSecTransformId digestMethodId
,
const xmlChar *id
,
const xmlChar *uri
,
const xmlChar *type
);
Adds <dsig:Reference/> node with given URI (uri
), Id (id
) and
Type (type
) attributes and the required children <dsig:DigestMethod/> and
<dsig:DigestValue/> to the <dsig:SignedInfo/> child of signNode
.
xmlSecTmplSignatureAddObject ()
xmlNodePtr xmlSecTmplSignatureAddObject (xmlNodePtr signNode
,
const xmlChar *id
,
const xmlChar *mimeType
,
const xmlChar *encoding
);
Adds <dsig:Object/> node to the <dsig:Signature/> node signNode
.
xmlSecTmplReferenceAddTransform ()
xmlNodePtr xmlSecTmplReferenceAddTransform (xmlNodePtr referenceNode
,
xmlSecTransformId transformId
);
Adds <dsig:Transform/> node to the <dsig:Reference/> node referenceNode
.
xmlSecTmplObjectAddSignProperties ()
xmlNodePtr xmlSecTmplObjectAddSignProperties (xmlNodePtr objectNode
,
const xmlChar *id
,
const xmlChar *target
);
Adds <dsig:SignatureProperties/> node to the <dsig:Object/> node objectNode
.
xmlSecTmplObjectAddManifest ()
xmlNodePtr xmlSecTmplObjectAddManifest (xmlNodePtr objectNode
,
const xmlChar *id
);
Adds <dsig:Manifest/> node to the <dsig:Object/> node objectNode
.
xmlSecTmplManifestAddReference ()
xmlNodePtr xmlSecTmplManifestAddReference (xmlNodePtr manifestNode
,
xmlSecTransformId digestMethodId
,
const xmlChar *id
,
const xmlChar *uri
,
const xmlChar *type
);
Adds <dsig:Reference/> node with specified URI (uri
), Id (id
) and
Type (type
) attributes and the required children <dsig:DigestMethod/> and
<dsig:DigestValue/> to the <dsig:Manifest/> node manifestNode
.
xmlSecTmplEncDataCreate ()
xmlNodePtr xmlSecTmplEncDataCreate (xmlDocPtr doc
,
xmlSecTransformId encMethodId
,
const xmlChar *id
,
const xmlChar *type
,
const xmlChar *mimeType
,
const xmlChar *encoding
);
Creates new <enc:EncryptedData /> node for encryption template.
doc : |
the pointer to signature document or NULL; in the later
case, application must later call xmlSetTreeDoc to ensure
that all the children nodes have correct pointer to XML document. |
encMethodId : |
the encryption method (may be NULL). |
id : |
the Id attribute (optional). |
type : |
the Type attribute (optional) |
mimeType : |
the MimeType attribute (optional) |
encoding : |
the Encoding attribute (optional) |
Returns : |
the pointer newly created <enc:EncryptedData/> node or NULL
if an error occurs. |
xmlSecTmplEncDataEnsureKeyInfo ()
xmlNodePtr xmlSecTmplEncDataEnsureKeyInfo (xmlNodePtr encNode
,
const xmlChar *id
);
Adds <dsig:KeyInfo/> to the <enc:EncryptedData/> node encNode
.
xmlSecTmplEncDataEnsureCipherReference ()
xmlNodePtr xmlSecTmplEncDataEnsureCipherReference
(xmlNodePtr encNode
,
const xmlChar *uri
);
Adds <enc:CipherReference/> node with specified URI attribute uri
to the <enc:EncryptedData/> node encNode
.
xmlSecTmplEncDataGetEncMethodNode ()
xmlNodePtr xmlSecTmplEncDataGetEncMethodNode (xmlNodePtr encNode
);
Gets pointer to <enc:EncrytpionMethod/> node.
xmlSecTmplReferenceListAddDataReference ()
xmlNodePtr xmlSecTmplReferenceListAddDataReference
(xmlNodePtr encNode
,
const xmlChar *uri
);
Adds <enc:DataReference/> and the parent <enc:ReferenceList/> node (if needed).
xmlSecTmplReferenceListAddKeyReference ()
xmlNodePtr xmlSecTmplReferenceListAddKeyReference
(xmlNodePtr encNode
,
const xmlChar *uri
);
Adds <enc:KeyReference/> and the parent <enc:ReferenceList/> node (if needed).
xmlSecTmplKeyInfoAddKeyName ()
xmlNodePtr xmlSecTmplKeyInfoAddKeyName (xmlNodePtr keyInfoNode
,
const xmlChar *name
);
Adds <dsig:KeyName/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlSecTmplKeyInfoAddKeyValue ()
xmlNodePtr xmlSecTmplKeyInfoAddKeyValue (xmlNodePtr keyInfoNode
);
Adds <dsig:KeyValue/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlSecTmplKeyInfoAddX509Data ()
xmlNodePtr xmlSecTmplKeyInfoAddX509Data (xmlNodePtr keyInfoNode
);
Adds <dsig:X509Data/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlSecTmplKeyInfoAddRetrievalMethod ()
xmlNodePtr xmlSecTmplKeyInfoAddRetrievalMethod (xmlNodePtr keyInfoNode
,
const xmlChar *uri
,
const xmlChar *type
);
Adds <dsig:RetrievalMethod/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlSecTmplKeyInfoAddEncryptedKey ()
xmlNodePtr xmlSecTmplKeyInfoAddEncryptedKey (xmlNodePtr keyInfoNode
,
xmlSecTransformId encMethodId
,
const xmlChar *id
,
const xmlChar *type
,
const xmlChar *recipient
);
Adds <enc:EncryptedKey/> node with given attributes to
the <dsig:KeyInfo/> node keyInfoNode
.
xmlSecTmplX509IssuerSerialAddIssuerName ()
xmlNodePtr xmlSecTmplX509IssuerSerialAddIssuerName
(xmlNodePtr x509IssuerSerialNode
,
const xmlChar *issuerName
);
Adds <dsig:X509IssuerName/> node to the <dsig:X509IssuerSerial/> node x509IssuerSerialNode
.
xmlSecTmplX509IssuerSerialAddSerialNumber ()
xmlNodePtr xmlSecTmplX509IssuerSerialAddSerialNumber
(xmlNodePtr x509IssuerSerialNode
,
const xmlChar *serial
);
Adds <dsig:X509SerialNumber/> node to the <dsig:X509IssuerSerial/> node x509IssuerSerialNode
.
xmlSecTmplTransformAddHmacOutputLength ()
int xmlSecTmplTransformAddHmacOutputLength
(xmlNodePtr transformNode
,
xmlSecSize bitsLen
);
Creates <dsig:HMACOutputLength/> child for the HMAC transform
node node
.
xmlSecTmplTransformAddRsaOaepParam ()
int xmlSecTmplTransformAddRsaOaepParam (xmlNodePtr transformNode
,
const xmlSecByte *buf
,
xmlSecSize size
);
Creates <enc:OAEPParam/> child node in the node
.
xmlSecTmplTransformAddXsltStylesheet ()
int xmlSecTmplTransformAddXsltStylesheet
(xmlNodePtr transformNode
,
const xmlChar *xslt
);
Writes the XSLT transform expression to the node
.
xmlSecTmplTransformAddC14NInclNamespaces ()
int xmlSecTmplTransformAddC14NInclNamespaces
(xmlNodePtr transformNode
,
const xmlChar *prefixList
);
Adds "inclusive" namespaces to the ExcC14N transform node node
.
xmlSecTmplTransformAddXPath ()
int xmlSecTmplTransformAddXPath (xmlNodePtr transformNode
,
const xmlChar *expression
,
const xmlChar **nsList
);
Writes XPath transform infromation to the <dsig:Transform/> node
node
.
xmlSecTmplTransformAddXPath2 ()
int xmlSecTmplTransformAddXPath2 (xmlNodePtr transformNode
,
const xmlChar *type
,
const xmlChar *expression
,
const xmlChar **nsList
);
Writes XPath2 transform infromation to the <dsig:Transform/> node
node
.
xmlSecTmplTransformAddXPointer ()
int xmlSecTmplTransformAddXPointer (xmlNodePtr transformNode
,
const xmlChar *expression
,
const xmlChar **nsList
);
Writes XPoniter transform infromation to the <dsig:Transform/> node
node
.