gwenhywfar  4.3.1
syncio_tls.h
Go to the documentation of this file.
00001 /***************************************************************************
00002  begin       : Wed Apr 28 2010
00003  copyright   : (C) 2010 by Martin Preuss
00004  email       : martin@libchipcard.de
00005 
00006  ***************************************************************************
00007  *                                                                         *
00008  *   This library is free software; you can redistribute it and/or         *
00009  *   modify it under the terms of the GNU Lesser General Public            *
00010  *   License as published by the Free Software Foundation; either          *
00011  *   version 2.1 of the License, or (at your option) any later version.    *
00012  *                                                                         *
00013  *   This library is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00016  *   Lesser General Public License for more details.                       *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU Lesser General Public      *
00019  *   License along with this library; if not, write to the Free Software   *
00020  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00021  *   MA  02111-1307  USA                                                   *
00022  *                                                                         *
00023  ***************************************************************************/
00024 
00025 
00026 #ifndef GWENHYWFAR_SYNCIO_TLS_H
00027 #define GWENHYWFAR_SYNCIO_TLS_H
00028 
00029 #include <gwenhywfar/syncio.h>
00030 #include <gwenhywfar/ssl_cert_descr.h>
00031 
00032 
00033 #define GWEN_SYNCIO_TLS_TYPE "tls"
00034 
00035 
00036 #define GWEN_SYNCIO_TLS_FLAGS_REQUEST_CERT        0x00000001
00037 #define GWEN_SYNCIO_TLS_FLAGS_FORCE_SSL_V3        0x00000002
00038 #define GWEN_SYNCIO_TLS_FLAGS_ALLOW_V1_CA_CRT     0x00000004
00039 #define GWEN_SYNCIO_TLS_FLAGS_NEED_PEER_CERT      0x00000008
00040 #define GWEN_SYNCIO_TLS_FLAGS_ADD_TRUSTED_CAS     0x00000010
00041 #define GWEN_SYNCIO_TLS_FLAGS_SET_PASSV_HOST_NAME 0x00000020
00042 #define GWEN_SYNCIO_TLS_FLAGS_SET_PASSV_HOST_IP   0x00000020
00043 
00044 #define GWEN_SYNCIO_TLS_FLAGS_SECURE              0x00008000
00045 
00046 
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 
00053 GWENHYWFAR_API
00054 GWEN_SYNCIO *GWEN_SyncIo_Tls_new(GWEN_SYNCIO *baseIo);
00055 
00056 
00057 GWENHYWFAR_API const char *GWEN_SyncIo_Tls_GetLocalCertFile(const GWEN_SYNCIO *sio);
00058 GWENHYWFAR_API void GWEN_SyncIo_Tls_SetLocalCertFile(GWEN_SYNCIO *sio, const char *s);
00059 
00060 GWENHYWFAR_API const char *GWEN_SyncIo_Tls_GetLocalKeyFile(const GWEN_SYNCIO *sio);
00061 GWENHYWFAR_API void GWEN_SyncIo_Tls_SetLocalKeyFile(GWEN_SYNCIO *sio, const char *s);
00062 
00063 GWENHYWFAR_API const char *GWEN_SyncIo_Tls_GetLocalTrustFile(const GWEN_SYNCIO *sio);
00064 GWENHYWFAR_API void GWEN_SyncIo_Tls_SetLocalTrustFile(GWEN_SYNCIO *sio, const char *s);
00065 
00066 GWENHYWFAR_API const char *GWEN_SyncIo_Tls_GetDhParamFile(const GWEN_SYNCIO *sio);
00067 GWENHYWFAR_API void GWEN_SyncIo_Tls_SetDhParamFile(GWEN_SYNCIO *sio, const char *s);
00068 
00069 GWENHYWFAR_API const char *GWEN_SyncIo_Tls_GetRemoteHostName(const GWEN_SYNCIO *sio);
00070 GWENHYWFAR_API void GWEN_SyncIo_Tls_SetRemoteHostName(GWEN_SYNCIO *sio, const char *s);
00071 
00072 GWENHYWFAR_API GWEN_SSLCERTDESCR *GWEN_SyncIo_Tls_GetPeerCertDescr(const GWEN_SYNCIO *sio);
00073 
00074 
00075 
00076 #ifdef __cplusplus
00077 }
00078 #endif
00079 
00080 
00081 #endif
00082 
00083