You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ka...@apache.org on 2007/03/12 14:33:06 UTC
svn commit: r517211 - in /webservices/axis2/trunk/c/rampart:
include/oxs_signature.h include/oxs_xml_signature.h
samples/omxmlsec/xmlenc/enc.c
Author: kaushalye
Date: Mon Mar 12 06:33:05 2007
New Revision: 517211
URL: http://svn.apache.org/viewvc?view=rev&rev=517211
Log:
Documenting OMXMLSecurity
Modified:
webservices/axis2/trunk/c/rampart/include/oxs_signature.h
webservices/axis2/trunk/c/rampart/include/oxs_xml_signature.h
webservices/axis2/trunk/c/rampart/samples/omxmlsec/xmlenc/enc.c
Modified: webservices/axis2/trunk/c/rampart/include/oxs_signature.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/oxs_signature.h?view=diff&rev=517211&r1=517210&r2=517211
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/oxs_signature.h (original)
+++ webservices/axis2/trunk/c/rampart/include/oxs_signature.h Mon Mar 12 06:33:05 2007
@@ -36,7 +36,15 @@
extern "C"
{
#endif
-
+/**
+ * Signs an input buffer @input using the RSA-SHA1 algorithm.
+ * Result will be placed in output buffer @output
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @input input buffer
+ * @output output buffer
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_sig_sign_rsa_sha1(const axis2_env_t *env,
oxs_sign_ctx_t *sign_ctx,
@@ -48,6 +56,11 @@
* available in the signature context @sign_ctx.
* The result will be placed in the buffer @output.
* Note that the result is base64 encoded.
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @input input buffer
+ * @output output buffer
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_sig_sign(const axis2_env_t *env,
@@ -59,12 +72,18 @@
* Verifies a @signature with @content using the information
* available in the signature content @sign_ctx.
* Note that the signature should be the base64 encoded value of a digital signature.
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @content the content that's signed
+ * @signature the signature value
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_sig_verify(const axis2_env_t *env,
oxs_sign_ctx_t *sign_ctx,
axis2_char_t *content,
axis2_char_t *signature);
+
/** @} */
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/rampart/include/oxs_xml_signature.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/oxs_xml_signature.h?view=diff&rev=517211&r1=517210&r2=517211
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/oxs_xml_signature.h (original)
+++ webservices/axis2/trunk/c/rampart/include/oxs_xml_signature.h Mon Mar 12 06:33:05 2007
@@ -38,7 +38,12 @@
{
#endif
/**
- * Sign
+ * Sign according to the information available in the @sign_ctx.
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @parent the node that the ds:Signature element should be attached.
+ * @sig_node a reference to the ds:Signature node
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_xml_sig_sign(const axis2_env_t *env,
@@ -49,34 +54,62 @@
/**
- * Verify
+ * Verify a single signature part @sign_part.
+ * Do transforms, Generate digest and compare with the digest in hand
+ * @env pointer to environment struct
+ * @sign_part the signature part
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
*/
-/* Do transforms, Generate digest and compare with the digest in hand
- * For a single signature part*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_xml_sig_verify_sign_part(const axis2_env_t *env,
oxs_sign_part_t *sign_part);
-/*Verify all digests in signature parts*/
+/**
+ * Verify all digests in signature parts of a single signature context @sign_ctx
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_xml_sig_verify_digests(const axis2_env_t *env,
oxs_sign_ctx_t *sign_ctx);
-/*Verify a complete xml document*/
+/**
+ * Verify a complete xml document
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @signature_node the ds:Signature node
+ * @scope_node the root node in which the referenced are found
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_xml_sig_verify(const axis2_env_t *env,
oxs_sign_ctx_t *sign_ctx,
axiom_node_t *signature_node,
axiom_node_t *scope_node);
-/*Process the ds:Reference node. Populate a signature part*/
+/**
+ * Process the ds:Reference node. Populate a signature part
+ * @env pointer to environment struct
+ * @sign_part the signature part
+ * @ref_node the ds:Reference node
+ * @scope_node the root node in which the referenced are found
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_xml_sig_process_ref_node(const axis2_env_t *env,
oxs_sign_part_t *sign_part,
axiom_node_t *ref_node,
axiom_node_t *scope_node);
-/*Process the ds:Signature node. Populate a signature context*/
+/**
+ * Process the ds:Signature node. Populate a signature context
+ * @env pointer to environment struct
+ * @sign_ctx the signature context
+ * @signature_node the ds:Signature node
+ * @scope_node the root node in which the referenced are found
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
AXIS2_EXTERN axis2_status_t AXIS2_CALL
oxs_xml_sig_process_signature_node(const axis2_env_t *env,
oxs_sign_ctx_t *sign_ctx,
Modified: webservices/axis2/trunk/c/rampart/samples/omxmlsec/xmlenc/enc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/samples/omxmlsec/xmlenc/enc.c?view=diff&rev=517211&r1=517210&r2=517211
==============================================================================
--- webservices/axis2/trunk/c/rampart/samples/omxmlsec/xmlenc/enc.c (original)
+++ webservices/axis2/trunk/c/rampart/samples/omxmlsec/xmlenc/enc.c Mon Mar 12 06:33:05 2007
@@ -99,6 +99,7 @@
outf = fopen("decrypted-result.xml", "wb");
fwrite(serialized_data, 1, AXIS2_STRLEN(serialized_data), outf);
fclose(outf);
+ printf("Node decrypted successfully. Result is written to decrypted-result.xml\n");
return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org