summaryrefslogtreecommitdiffstats
path: root/libcsoap/soap-xmlsec.h
diff options
context:
space:
mode:
authorGravatar m0gg2006-11-28 23:45:57 +0000
committerGravatar m0gg2006-11-28 23:45:57 +0000
commit9a0670ad01e00ab01cfb4f308f1b124941968fa2 (patch)
tree616729b1bcd2c837eee563e904faac091f5cb813 /libcsoap/soap-xmlsec.h
parent17d9b98c8525c74cd83a421f151062825fe66890 (diff)
downloadcsoap-9a0670ad01e00ab01cfb4f308f1b124941968fa2.tar.gz
csoap-9a0670ad01e00ab01cfb4f308f1b124941968fa2.tar.bz2
XML signature improvements
Diffstat (limited to 'libcsoap/soap-xmlsec.h')
-rw-r--r--libcsoap/soap-xmlsec.h84
1 files changed, 75 insertions, 9 deletions
diff --git a/libcsoap/soap-xmlsec.h b/libcsoap/soap-xmlsec.h
index fc24fc5..9943498 100644
--- a/libcsoap/soap-xmlsec.h
+++ b/libcsoap/soap-xmlsec.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-xmlsec.h,v 1.2 2006/11/27 11:15:27 m0gg Exp $
+ * $Id: soap-xmlsec.h,v 1.3 2006/11/28 23:45:57 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2006 Heiko Ronsdorf
@@ -31,13 +31,17 @@
* This module is implemented using the xmlsec1 library.
*
* @author H. Ronsdorf
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*
- * @see http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss
- * http://www.aleksey.com/xmlsec/,
+ * @see http://www.w3.org/TR/SOAP-dsig/,
+ * http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss,
+ * http://www.aleksey.com/xmlsec/
*
*/
+#define SOAP_SECURITY_NAMESPACE "http://schemas.xmlsoap.org/soap/security/2000-12"
+#define SOAP_SECURITY_PREFIX "SOAP-SEC"
+
/**
*
* Commandline argument to enabled WS-Security.
@@ -45,6 +49,28 @@
*/
#define CSOAP_ENABLE_XMLSEC "-CSOAPxmlsec"
+/**
+ *
+ * Commandline argument to set the keyfile. If this argument is not specified a
+ * random key will be used.
+ *
+ */
+#define CSOAP_XMLSEC_KEYFILE "-CSOAPkeyfile"
+
+/**
+ *
+ * Commandline argument to set the password of the key.
+ *
+ */
+#define CSOAP_XMLSEC_PASSWORD "-CSOAPpassword"
+
+/**
+ *
+ * Commandline argument to set a file of certificates.
+ *
+ */
+#define CSOAP_XMLSEC_CERTFILE "-CSOAPcertfile"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -56,19 +82,45 @@ extern "C" {
* @param argc commandline arg count
* @param argv commandline arg vector
*
- * @returns H_OK on success
+ * @return H_OK on success
*
*/
-extern herror_t soap_xmlsec_init_args(int argc, char **argv);
+extern herror_t soap_xmlsec_server_init_args(int argc, char **argv);
/**
*
- * Sign a XML document contained in a SOAP Envelope
+ * Initializes the WS-Security subsystem.
+ *
+ * @param argc commandline arg count
+ * @param argv commandline arg vector
+ *
+ * @return H_OK on success
+ *
+ */
+extern herror_t soap_xmlsec_client_init_args(int argc, char **argv);
+
+/**
+ *
+ * Sign a XML document contained in a SOAP Envelope. The key specified on the
+ * commandline is used for signating the document.
*
* @param envelope The SOAP envelope to be signed.
*
+ * @return H_OK on success
+ *
*/
-extern herror_t soap_xmlsec_sign(struct SoapEnv *envelope);
+extern herror_t soap_xmlsec_sign(struct SoapCtx *context);
+
+/**
+ *
+ * Verify a XML documents signature contained in a SOAP Envelope.
+ *
+ * @param envelope The SOAP envelope to be verified.
+ *
+ * @return H_OK on success
+ *
+ */
+extern herror_t soap_xmlsec_verify(struct SoapCtx *context);
/**
*
@@ -76,8 +128,22 @@ extern herror_t soap_xmlsec_sign(struct SoapEnv *envelope);
*
* @param envelope The SOAP envelope to be encrypted.
*
+ * @return H_OK on success
+ *
+ */
+extern herror_t soap_xmlsec_encrypt(struct SoapCtx *context);
+
+/**
+ *
+ * Decrupt a XML document contained in a SOAP envelope.
+ *
+ * @param envelope The SOAP envelope to be decrypted.
+ *
+ * @return H_OK on success
+ *
*/
-extern herror_t soap_xmlsec_encrypt(struct SoapEnv *envelope);
+extern herror_t soap_xmlsec_decrypt(struct SoapCtx *context);
+
/**
*