nanohttp-ssl.h

Go to the documentation of this file.
00001 /******************************************************************
00002 *  $Id: nanohttp-ssl.h,v 1.30 2007/01/25 10:24:10 m0gg Exp $
00003 *
00004 * CSOAP Project:  A http client/server library in C
00005 * Copyright (C) 2001-2005  Rochester Institute of Technology
00006 *
00007 * This library is free software; you can redistribute it and/or
00008 * modify it under the terms of the GNU Library General Public
00009 * License as published by the Free Software Foundation; either
00010 * version 2 of the License, or (at your option) any later version.
00011 *
00012 * This library is distributed in the hope that it will be useful,
00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 * Library General Public License for more details.
00016 *
00017 * You should have received a copy of the GNU Library General Public
00018 * License along with this library; if not, write to the
00019 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020 * Boston, MA  02111-1307, USA.
00021 *
00022 * Author: Matt Campbell
00023 ******************************************************************/
00024 #ifndef __nanohttp_ssl_h
00025 #define __nanohttp_ssl_h
00026 
00231 #define NHTTPD_ARG_HTTPS        "-NHTTPS"
00232 
00239 
00240 #define HSSL_ERROR                      1700
00241 #define HSSL_ERROR_CA_LIST              (HSSL_ERROR + 10)
00242 #define HSSL_ERROR_CONTEXT              (HSSL_ERROR + 20)
00243 #define HSSL_ERROR_CERTIFICATE          (HSSL_ERROR + 30)
00244 #define HSSL_ERROR_PEM                  (HSSL_ERROR + 40)
00245 #define HSSL_ERROR_CLIENT               (HSSL_ERROR + 50)
00246 #define HSSL_ERROR_SERVER               (HSSL_ERROR + 60)
00247 #define HSSL_ERROR_CONNECT              (HSSL_ERROR + 70)
00248 
00251 #ifdef __cplusplus
00252 extern "C" {
00253 #endif
00254 
00262 extern herror_t hssl_module_init(int argc, char **argv);
00263 
00269 extern void hssl_module_destroy(void);
00270 
00276 extern void hssl_set_certificate(const char *filename);
00277 
00285 extern void hssl_set_certpass(const char *password);
00286 
00292 extern void hssl_set_ca_list(const char *filename);
00293 
00302 extern void hssl_enable(void);
00303 
00311 extern int hssl_enabled(void);
00312 
00320 extern herror_t hssl_client_ssl(struct hsocket_t * sock);
00321 
00329 extern herror_t hssl_server_ssl(struct hsocket_t * sock);
00330 
00336 extern void hssl_cleanup(struct hsocket_t * sock);
00337 
00344 extern int verify_sn(X509 * cert, int who, int nid, char *str);
00345 
00351 extern void hssl_set_user_verify(int func(X509 * cert));
00352 
00360 extern herror_t hssl_read(struct hsocket_t * sock, char *buf, size_t len, size_t * received);
00361 
00369 extern herror_t hssl_write(struct hsocket_t * sock, const char *buf, size_t len, size_t * sent);
00370 
00371 #ifdef __cplusplus
00372 }
00373 #endif
00374 
00375 #endif

Generated on Thu Jan 25 23:36:03 2007 for csoap by  doxygen 1.4.6