summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-ssl.h
diff options
context:
space:
mode:
authorGravatar m0gg2006-12-01 10:55:59 +0000
committerGravatar m0gg2006-12-01 10:55:59 +0000
commit1e0e97fe7b654ecd7f5315d129df6e57f3e63371 (patch)
treedce178f3f876c04f4e5b1385f388c81fc1b6994c /nanohttp/nanohttp-ssl.h
parent77ce98ff186515cce217814886d9d5b899380c7b (diff)
downloadcsoap-1e0e97fe7b654ecd7f5315d129df6e57f3e63371.tar.gz
csoap-1e0e97fe7b654ecd7f5315d129df6e57f3e63371.tar.bz2
Fix nanoHTTP HTTPS client (still needs port in URL)
Diffstat (limited to 'nanohttp/nanohttp-ssl.h')
-rw-r--r--nanohttp/nanohttp-ssl.h49
1 files changed, 41 insertions, 8 deletions
diff --git a/nanohttp/nanohttp-ssl.h b/nanohttp/nanohttp-ssl.h
index 8902ea3..6dbcad4 100644
--- a/nanohttp/nanohttp-ssl.h
+++ b/nanohttp/nanohttp-ssl.h
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-ssl.h,v 1.23 2006/11/30 14:24:00 m0gg Exp $
+* $Id: nanohttp-ssl.h,v 1.24 2006/12/01 10:56:00 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2001-2005 Rochester Institute of Technology
@@ -51,8 +51,27 @@ extern herror_t hssl_module_init(int argc, char **argv);
*/
extern void hssl_module_destroy(void);
+/**
+ *
+ * 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
+ *
+ */
extern void hssl_set_certpass(const char *password);
+
+/**
+ *
+ * Sets the filename for a certification authority list.
+ *
+ */
extern void hssl_set_ca_list(const char *filename);
/**
@@ -99,25 +118,39 @@ extern herror_t hssl_server_ssl(struct hsocket_t * sock);
*/
extern void hssl_cleanup(struct hsocket_t * sock);
-/*
- * Quick function for verifying a portion of the cert
- * nid is any NID_ defined in <openssl/objects.h>
- * returns non-zero if everything went ok
- */
#define CERT_SUBJECT 1
+/**
+ *
+ * Quick function for verifying a portion of the cert nid is any NID_ defined
+ * in <openssl/objects.h> returns non-zero if everything went ok
+ *
+ */
extern int verify_sn(X509 * cert, int who, int nid, char *str);
/**
*
- * Called by framework for verification of client or server supplied
- * certificate.
+ * Called by framework for verification of client or server supplied certificate.
*
*/
extern void hssl_set_user_verify(int func(X509 * cert));
+/**
+ *
+ * Read from a 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
+ *
+ */
extern herror_t hssl_write(struct hsocket_t * sock, const char *buf, size_t len, size_t * sent);
#ifdef __cplusplus