summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-ssl.h
diff options
context:
space:
mode:
authorGravatar m0gg2007-11-03 22:40:09 +0000
committerGravatar m0gg2007-11-03 22:40:09 +0000
commit8a6946b18003fae6400a137389f0cb13d0ac4bd6 (patch)
tree1fb0e6f58de5596f8dae00998da18472fb4952a1 /nanohttp/nanohttp-ssl.h
parentc1a7b2dabdc691139b744f0d4750f3b797b69073 (diff)
downloadcsoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.gz
csoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.bz2
Split nanoHTTP and cSOAP logging
Diffstat (limited to 'nanohttp/nanohttp-ssl.h')
-rw-r--r--nanohttp/nanohttp-ssl.h99
1 files changed, 42 insertions, 57 deletions
diff --git a/nanohttp/nanohttp-ssl.h b/nanohttp/nanohttp-ssl.h
index e4b7058..008c23a 100644
--- a/nanohttp/nanohttp-ssl.h
+++ b/nanohttp/nanohttp-ssl.h
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-ssl.h,v 1.30 2007/01/25 10:24:10 m0gg Exp $
+* $Id: nanohttp-ssl.h,v 1.31 2007/11/03 22:40:15 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2001-2005 Rochester Institute of Technology
@@ -223,19 +223,25 @@
*
*/
-/**
+/** @file nanohttp-ssl.h SSL wrapper
*
- * Commandline argument to enabled SSL in the nanoHTTP server.
+ * @defgroup NANOHTTP_SSL SSL wrapper
+ * @ingroup NANOHTTP
*
*/
-#define NHTTPD_ARG_HTTPS "-NHTTPS"
+/**@{*/
/**
*
- * @defgroup ssl_errors_group SSL Errors
+ * Commandline argument to enabled SSL in the nanoHTTP server.
*
*/
-/*@{*/
+#define NHTTPD_ARG_HTTPS "-NHTTPS"
+
+/** @defgroup NANOHTTP_SSL_ERRORS SSL Errors
+ * @ingroup NANOHTTP_ERRORS
+ */
+/**@{*/
#define HSSL_ERROR 1700
#define HSSL_ERROR_CA_LIST (HSSL_ERROR + 10)
@@ -246,92 +252,75 @@
#define HSSL_ERROR_SERVER (HSSL_ERROR + 60)
#define HSSL_ERROR_CONNECT (HSSL_ERROR + 70)
-/*@}*/
+#define HSSL_ERROR_SSLCLOSE (HSSL_ERROR + 80)
+#define HSSL_ERROR_SSLCTX (HSSL_ERROR + 90)
+
+/**@}*/
#ifdef __cplusplus
extern "C" {
#endif
-/**
- *
- * Initialization of the SSL module
+/** This function initializes the SSL module.
*
* @return H_OK on success
*
+ * @see hss_module_destroy()
*/
extern herror_t hssl_module_init(int argc, char **argv);
-/**
- *
- * Shutdown of the SSL module.
+/** This functions destroys the SSL module.
*
+ * @see hssl_module_init()
*/
extern void hssl_module_destroy(void);
-/**
- *
- * Sets the SSL certificate to be used.
- *
+/** This function sets the SSL certificate to be used.
*/
extern void hssl_set_certificate(const char *filename);
-/**
- *
- * Sets the password for the SSL certificate.
- *
- * @see hssl_set_certificate
+/** This function sets the password for the SSL certificate.
*
+ * @see hssl_set_certificate()
*/
extern void hssl_set_certpass(const char *password);
-/**
- *
- * Sets the filename for a certification authority list.
- *
+/** This function sets the filename for a certification authority
+ * list.
*/
extern void hssl_set_ca_list(const char *filename);
-/**
- *
- * Enabled SSL in the nanoHTTP server. You have to call this function before
- * calling httpd_run.
- *
- * @see httpd_run
- *
+/** This function enables SSL in the nanoHTTP server. You have to
+ * call this function before calling httpd_run().
*/
extern void hssl_enable(void);
-/**
- *
- * Check if SSL is enabled in the nanoHTTP server.
- *
- * @return 1 if enabled, 0 if disabled.
+/** This function returns if SSL is enabled in the nanoHTTP server.
*
+ * @return 1 if enabled, 0 otherwise.
*/
extern int hssl_enabled(void);
-/**
- *
- * SSL client socket initialization.
+/** This function initializes an SSL client socket.
*
* @return H_OK on success.
*
+ * @see hsl_cleanup()
*/
extern herror_t hssl_client_ssl(struct hsocket_t * sock);
-/**
- *
- * SSL server socket initialization.
+/** This function initializes an SSL server socket.
*
* @return H_OK on success.
*
+ * @see hssl_cleanup()
*/
extern herror_t hssl_server_ssl(struct hsocket_t * sock);
-/**
- *
- * SSL socket cleanup.
+/** This function cleans up an SSL socket.
*
+ * @see hssl_client_ssl
+ * @see httl_server_ssl
*/
extern void hssl_cleanup(struct hsocket_t * sock);
@@ -350,21 +339,15 @@ extern int verify_sn(X509 * cert, int who, int nid, char *str);
*/
extern void hssl_set_user_verify(int func(X509 * cert));
-/**
- *
- * Read from a SSL socket.
- *
- * @see hsocket_read
+/** This function reads from an SSL socket.
*
+ * @see hsocket_read()
*/
extern herror_t hssl_read(struct hsocket_t * sock, char *buf, size_t len, size_t * received);
-/**
- *
- * Write to a SSL socket.
- *
- * @see hsocket_write
+/** This function writes to an SSL socket.
*
+ * @see hsocket_write()
*/
extern herror_t hssl_write(struct hsocket_t * sock, const char *buf, size_t len, size_t * sent);
@@ -372,4 +355,6 @@ extern herror_t hssl_write(struct hsocket_t * sock, const char *buf, size_t len,
}
#endif
+/**@}*/
+
#endif