Top |
xmlNodePtr xmlSecTmplSignatureCreate (xmlDocPtr doc
,xmlSecTransformId c14nMethodId
,xmlSecTransformId signMethodId
,const xmlChar *id
);
Creates new <dsig:Signature/> node with the mandatory <dsig:SignedInfo/>, <dsig:CanonicalizationMethod/>, <dsig:SignatureMethod/> and <dsig:SignatureValue/> children and sub-children. 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 |
|
c14nMethodId |
the signature canonicalization method. |
|
signMethodId |
the signature method. |
|
id |
the node id (may be NULL). |
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 |
|
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 |
xmlNodePtr xmlSecTmplSignatureEnsureKeyInfo (xmlNodePtr signNode
,const xmlChar *id
);
Adds (if necessary) <dsig:KeyInfo/> node to the <dsig:Signature/>
node signNode
.
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
.
signNode |
the pointer to <dsig:Signature/> node. |
|
digestMethodId |
the reference digest method. |
|
id |
the node id (may be NULL). |
|
uri |
the reference node uri (may be NULL). |
|
type |
the reference node type (may be NULL). |
xmlNodePtr xmlSecTmplSignatureAddObject (xmlNodePtr signNode
,const xmlChar *id
,const xmlChar *mimeType
,const xmlChar *encoding
);
Adds <dsig:Object/> node to the <dsig:Signature/> node signNode
.
signNode |
the pointer to <dsig:Signature/> node. |
|
id |
the node id (may be NULL). |
|
mimeType |
the object mime type (may be NULL). |
|
encoding |
the object encoding (may be NULL). |
xmlNodePtr
xmlSecTmplSignatureGetSignMethodNode (xmlNodePtr signNode
);
Gets pointer to <dsig:SignatureMethod/> child of <dsig:KeyInfo/> node.
xmlNodePtr
xmlSecTmplSignatureGetC14NMethodNode (xmlNodePtr signNode
);
Gets pointer to <dsig:CanonicalizationMethod/> child of <dsig:KeyInfo/> node.
xmlNodePtr xmlSecTmplReferenceAddTransform (xmlNodePtr referenceNode
,xmlSecTransformId transformId
);
Adds <dsig:Transform/> node to the <dsig:Reference/> node referenceNode
.
referenceNode |
the pointer to <dsig:Reference/> node. |
|
transformId |
the transform method id. |
xmlNodePtr xmlSecTmplObjectAddSignProperties (xmlNodePtr objectNode
,const xmlChar *id
,const xmlChar *target
);
Adds <dsig:SignatureProperties/> node to the <dsig:Object/> node objectNode
.
objectNode |
the pointer to <dsig:Object/> node. |
|
id |
the node id (may be NULL). |
|
target |
the Target (may be NULL). |
xmlNodePtr xmlSecTmplObjectAddManifest (xmlNodePtr objectNode
,const xmlChar *id
);
Adds <dsig:Manifest/> node to the <dsig:Object/> node objectNode
.
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
.
manifestNode |
the pointer to <dsig:Manifest/> node. |
|
digestMethodId |
the reference digest method. |
|
id |
the node id (may be NULL). |
|
uri |
the reference node uri (may be NULL). |
|
type |
the reference node type (may be NULL). |
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 |
|
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) |
xmlNodePtr xmlSecTmplEncDataEnsureKeyInfo (xmlNodePtr encNode
,const xmlChar *id
);
Adds <dsig:KeyInfo/> to the <enc:EncryptedData/> node encNode
.
xmlNodePtr xmlSecTmplEncDataEnsureEncProperties (xmlNodePtr encNode
,const xmlChar *id
);
Adds <enc:EncryptionProperties/> node to the <enc:EncryptedData/>
node encNode
.
xmlNodePtr xmlSecTmplEncDataAddEncProperty (xmlNodePtr encNode
,const xmlChar *id
,const xmlChar *target
);
Adds <enc:EncryptionProperty/> node (and the parent
<enc:EncryptionProperties/> node if required) to the
<enc:EncryptedData/> node encNode
.
encNode |
the pointer to <enc:EncryptedData/> node. |
|
id |
the Id attribute (optional). |
|
target |
the Target attribute (optional). |
xmlNodePtr
xmlSecTmplEncDataEnsureCipherValue (xmlNodePtr encNode
);
Adds <enc:CipherValue/> to the <enc:EncryptedData/> node encNode
.
xmlNodePtr xmlSecTmplEncDataEnsureCipherReference (xmlNodePtr encNode
,const xmlChar *uri
);
Adds <enc:CipherReference/> node with specified URI attribute uri
to the <enc:EncryptedData/> node encNode
.
xmlNodePtr
xmlSecTmplEncDataGetEncMethodNode (xmlNodePtr encNode
);
Gets pointer to <enc:EncryptionMethod/> node.
xmlNodePtr xmlSecTmplCipherReferenceAddTransform (xmlNodePtr cipherReferenceNode
,xmlSecTransformId transformId
);
Adds <dsig:Transform/> node (and the parent <dsig:Transforms/> node)
with specified transform methods transform
to the <enc:CipherReference/>
child node of the <enc:EncryptedData/> node encNode
.
cipherReferenceNode |
the pointer to <enc:CipherReference/> node. |
|
transformId |
the transform id. |
xmlNodePtr xmlSecTmplReferenceListAddDataReference (xmlNodePtr encNode
,const xmlChar *uri
);
Adds <enc:DataReference/> and the parent <enc:ReferenceList/> node (if needed).
xmlNodePtr xmlSecTmplReferenceListAddKeyReference (xmlNodePtr encNode
,const xmlChar *uri
);
Adds <enc:KeyReference/> and the parent <enc:ReferenceList/> node (if needed).
xmlNodePtr xmlSecTmplKeyInfoAddKeyName (xmlNodePtr keyInfoNode
,const xmlChar *name
);
Adds <dsig:KeyName/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlNodePtr
xmlSecTmplKeyInfoAddKeyValue (xmlNodePtr keyInfoNode
);
Adds <dsig:KeyValue/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlNodePtr
xmlSecTmplKeyInfoAddX509Data (xmlNodePtr keyInfoNode
);
Adds <dsig:X509Data/> node to the <dsig:KeyInfo/> node keyInfoNode
.
xmlNodePtr xmlSecTmplKeyInfoAddRetrievalMethod (xmlNodePtr keyInfoNode
,const xmlChar *uri
,const xmlChar *type
);
Adds <dsig:RetrievalMethod/> node to the <dsig:KeyInfo/> node keyInfoNode
.
keyInfoNode |
the pointer to <dsig:KeyInfo/> node. |
|
uri |
the URI attribute (optional). |
|
type |
the Type attribute(optional). |
xmlNodePtr xmlSecTmplRetrievalMethodAddTransform (xmlNodePtr retrMethodNode
,xmlSecTransformId transformId
);
Adds <dsig:Transform/> node (and the parent <dsig:Transforms/> node
if required) to the <dsig:RetrievalMethod/> node retrMethod
.
retrMethodNode |
the pointer to <dsig:RetrievalMethod/> node. |
|
transformId |
the transform id. |
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
.
keyInfoNode |
the pointer to <dsig:KeyInfo/> node. |
|
encMethodId |
the encryption method (optional). |
|
id |
the Id attribute (optional). |
|
type |
the Type attribute (optional). |
|
recipient |
the Recipient attribute (optional). |
xmlNodePtr
xmlSecTmplX509DataAddIssuerSerial (xmlNodePtr x509DataNode
);
Adds <dsig:X509IssuerSerial/> node to the given <dsig:X509Data/> node.
xmlNodePtr xmlSecTmplX509IssuerSerialAddIssuerName (xmlNodePtr x509IssuerSerialNode
,const xmlChar *issuerName
);
Adds <dsig:X509IssuerName/> node to the <dsig:X509IssuerSerial/> node x509IssuerSerialNode
.
x509IssuerSerialNode |
the pointer to <dsig:X509IssuerSerial/> node. |
|
issuerName |
the issuer name (optional). |
xmlNodePtr xmlSecTmplX509IssuerSerialAddSerialNumber (xmlNodePtr x509IssuerSerialNode
,const xmlChar *serial
);
Adds <dsig:X509SerialNumber/> node to the <dsig:X509IssuerSerial/> node x509IssuerSerialNode
.
x509IssuerSerialNode |
the pointer to <dsig:X509IssuerSerial/> node. |
|
serial |
the serial number (optional). |
xmlNodePtr
xmlSecTmplX509DataAddSubjectName (xmlNodePtr x509DataNode
);
Adds <dsig:X509SubjectName/> node to the given <dsig:X509Data/> node.
xmlNodePtr
xmlSecTmplX509DataAddSKI (xmlNodePtr x509DataNode
);
Adds <dsig:X509SKI/> node to the given <dsig:X509Data/> node.
xmlNodePtr xmlSecTmplX509DataAddDigest (xmlNodePtr x509DataNode
,const xmlChar *digestAlgorithm
);
Adds <dsig11:X509Digest/> node to the given <dsig:X509Data/> node.
x509DataNode |
the pointer to <dsig:X509Data/> node. |
|
digestAlgorithm |
the digest algorithm URL. |
xmlNodePtr
xmlSecTmplX509DataAddCertificate (xmlNodePtr x509DataNode
);
Adds <dsig:X509Certificate/> node to the given <dsig:X509Data/> node.
xmlNodePtr
xmlSecTmplX509DataAddCRL (xmlNodePtr x509DataNode
);
Adds <dsig:X509CRL/> node to the given <dsig:X509Data/> node.
int xmlSecTmplTransformAddHmacOutputLength (xmlNodePtr transformNode
,xmlSecSize bitsLen
);
Creates <dsig:HMACOutputLength/> child for the HMAC transform
node node
.
int xmlSecTmplTransformAddRsaOaepParam (xmlNodePtr transformNode
,const xmlSecByte *buf
,xmlSecSize size
);
Creates <enc:OAEPParam/> child node in the node
.
transformNode |
the pointer to <dsig:Transform/> node. |
|
buf |
the OAEP param buffer. |
|
size |
the OAEP param buffer size. |
int xmlSecTmplTransformAddXsltStylesheet (xmlNodePtr transformNode
,const xmlChar *xslt
);
Writes the XSLT transform expression to the node
.
int xmlSecTmplTransformAddC14NInclNamespaces (xmlNodePtr transformNode
,const xmlChar *prefixList
);
Adds "inclusive" namespaces to the ExcC14N transform node node
.
transformNode |
the pointer to <dsig:Transform/> node. |
|
prefixList |
the white space delimited list of namespace prefixes, where "default" indicates the default namespace (optional). |
int xmlSecTmplTransformAddXPath (xmlNodePtr transformNode
,const xmlChar *expression
,const xmlChar **nsList
);
Writes XPath transform information to the <dsig:Transform/> node
node
.
transformNode |
the pointer to the <dsig:Transform/> node. |
|
expression |
the XPath expression. |
|
nsList |
the NULL terminated list of namespace prefix/href pairs (optional). |
int xmlSecTmplTransformAddXPath2 (xmlNodePtr transformNode
,const xmlChar *type
,const xmlChar *expression
,const xmlChar **nsList
);
Writes XPath2 transform information to the <dsig:Transform/> node
node
.
transformNode |
the pointer to the <dsig:Transform/> node. |
|
type |
the XPath2 transform type ("union", "intersect" or "subtract"). |
|
expression |
the XPath expression. |
|
nsList |
the NULL terminated list of namespace prefix/href pairs. (optional). |
int xmlSecTmplTransformAddXPointer (xmlNodePtr transformNode
,const xmlChar *expression
,const xmlChar **nsList
);
Writes XPointer transform information to the <dsig:Transform/> node
node
.
transformNode |
the pointer to the <dsig:Transform/> node. |
|
expression |
the XPath expression. |
|
nsList |
the NULL terminated list of namespace prefix/href pairs. (optional). |