Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

nettransportssl.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: nettransportssl.h,v $
00003  -------------------
00004  cvs         : $Id: nettransportssl.h,v 1.11 2005/01/19 01:33:32 aquamaniac Exp $
00005  begin       : Wed May 05 2004
00006  copyright   : (C) 2004 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00029 #ifndef GWEN_NETTRANSPORTSSL_H
00030 #define GWEN_NETTRANSPORTSSL_H
00031 
00032 #include <gwenhywfar/nettransport.h>
00033 #include <gwenhywfar/db.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 
00044 
00055 typedef int (*GWEN_NETTRANSPORTSSL_GETPASSWD_FN)(GWEN_NETTRANSPORT *tr,
00056                                                  char *buffer, int num,
00057                                                  int rwflag);
00061 GWENHYWFAR_API
00062   void
00063   GWEN_NetTransportSSL_SetGetPasswordFn(GWEN_NETTRANSPORTSSL_GETPASSWD_FN fn);
00064 
00068 GWENHYWFAR_API
00069   GWEN_NETTRANSPORTSSL_GETPASSWD_FN
00070   GWEN_NetTransportSSL_GetGetPasswordFn();
00078 typedef enum {
00080     GWEN_NetTransportSSL_AskAddCertResultError=0,
00082     GWEN_NetTransportSSL_AskAddCertResultNo,
00084     GWEN_NetTransportSSL_AskAddCertResultTmp,
00086     GWEN_NetTransportSSL_AskAddCertResultPerm,
00088     GWEN_NetTransportSSL_AskAddCertResultIncoming
00089 } GWEN_NETTRANSPORTSSL_ASKADDCERT_RESULT;
00090 
00097 typedef GWEN_NETTRANSPORTSSL_ASKADDCERT_RESULT
00098   (*GWEN_NETTRANSPORTSSL_ASKADDCERT_FN)(GWEN_NETTRANSPORT *tr,
00099                                         GWEN_DB_NODE *cert);
00100 
00101 typedef GWEN_NETTRANSPORTSSL_ASKADDCERT_RESULT
00102   (*GWEN_NETTRANSPORTSSL_ASKADDCERT_FN2)(GWEN_NETTRANSPORT *tr,
00103                                          GWEN_DB_NODE *cert,
00104                                          void *user_data);
00105 
00110 GWENHYWFAR_API
00111   void
00112   GWEN_NetTransportSSL_SetAskAddCertFn(GWEN_NETTRANSPORTSSL_ASKADDCERT_FN fn);
00113 
00117 GWENHYWFAR_API
00118   GWEN_NETTRANSPORTSSL_ASKADDCERT_FN
00119   GWEN_NetTransportSSL_GetAskAddCertFn();
00120 
00121 
00122 GWENHYWFAR_API
00123   void
00124   GWEN_NetTransportSSL_SetAskAddCertFn2(GWEN_NETTRANSPORTSSL_ASKADDCERT_FN2 fn,
00125                                        void *user_data);
00126 
00138 GWENHYWFAR_API
00139 GWEN_NETTRANSPORT *GWEN_NetTransportSSL_new(GWEN_SOCKET *sk,
00140                                             const char *capath,
00141                                             const char *newcapath,
00142                                             const char *ownCertFile,
00143                                             const char *dhfile,
00144                                             int secure,
00145                                             int takeOver);
00146 
00156 GWENHYWFAR_API
00157   void GWEN_NetTransportSSL_SetCipherList(GWEN_NETTRANSPORT *tr,
00158                                           const char *ciphers);
00159 
00171 GWENHYWFAR_API
00172   GWEN_DB_NODE *GWEN_NetTransportSSL_GetCipherList();
00173 
00198 GWENHYWFAR_API
00199   int GWEN_NetTransportSSL_GenerateCertAndKeyFile(const char *fname,
00200                                                   int bits,
00201                                                   int serial,
00202                                                   int days,
00203                                                   GWEN_DB_NODE *db);
00204 
00218 GWENHYWFAR_API
00219 int GWEN_NetTransportSSL_GenerateDhFile(const char *fname, int bits);
00220 
00226 GWENHYWFAR_API
00227   GWEN_DB_NODE*
00228   GWEN_NetTransportSSL_GetPeerCertificate(const GWEN_NETTRANSPORT *tr);
00229 
00230 GWENHYWFAR_API
00231   int GWEN_NetTransportSSL_IsSecure(const GWEN_NETTRANSPORT *tr);
00232 
00233 GWENHYWFAR_API
00234   int GWEN_NetTransportSSL_IsOfType(GWEN_NETTRANSPORT *tr);
00235 
00239 #ifdef __cplusplus
00240 }
00241 #endif
00242 
00243 
00244 #endif /* GWEN_NETTRANSPORTSSL_H */
00245 
00246 

Generated on Wed Oct 5 15:12:37 2005 for gwenhywfar by  doxygen 1.4.4