Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

eap_tls_mng.hxx

00001 /* BEGIN_COPYRIGHT                                                        */
00002 /*                                                                        */
00003 /* Open Diameter: Open-source software for the Diameter and               */
00004 /*                Diameter related protocols                              */
00005 /*                                                                        */
00006 /* Copyright (C) 2002-2004 Open Diameter Project                          */
00007 /*                                                                        */
00008 /* This program is free software; you can redistribute it and/or modify   */
00009 /* it under the terms of the GNU General Public License as published by   */
00010 /* the Free Software Foundation; either version 2 of the License, or      */
00011 /* (at your option) any later version.                                    */
00012 /*                                                                        */          
00013 /* This program 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          */
00016 /* GNU General Public License for more details.                           */
00017 /*                                                                        */
00018 /* You should have received a copy of the GNU General Public License      */
00019 /* along with this program; if not, write to the Free Software            */
00020 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
00021 /* USA.                                                                   */
00022 /*                                                                        */
00023 /* In addition, when you copy and redistribute some or the entire part of */
00024 /* the source code of this software with or without modification, you     */
00025 /* MUST include this copyright notice in each copy.                       */
00026 /*                                                                        */
00027 /* If you make any changes that are appeared to be useful, please send    */
00028 /* sources that include the changed part to                               */
00029 /* diameter-developers@lists.sourceforge.net so that we can reflect your  */
00030 /* changes to one unified version of this software.                       */
00031 /*                                                                        */
00032 /* END_COPYRIGHT                                                          */
00033 /***************************************************************************
00034                           eap_tls_mng.hxx  -  description
00035                              -------------------
00036     begin                : jue mar 11 2004
00037     copyright            : (C) 2004 by 
00038     email                : 
00039  ***************************************************************************/
00040 
00041 /***************************************************************************
00042  *                                                                         *
00043  *   This program is free software; you can redistribute it and/or modify  *
00044  *   it under the terms of the GNU General Public License as published by  *
00045  *   the Free Software Foundation; either version 2 of the License, or     *
00046  *   (at your option) any later version.                                   *
00047  *                                                                         *
00048  ***************************************************************************/
00049 
00050 
00051 #ifndef  __EAP_TLS_MNG_H__
00052 #define  __EAP_TLS_MNG_H__
00053 
00054 #include "eap_tls.hxx"
00055 #include "eap_tls_session.hxx"
00056 
00057 class EAPTLS_tls_mng
00058 {
00059   public:
00060   EAPTLS_tls_mng() {};
00061   virtual ~EAPTLS_tls_mng(){};
00062   /*
00063   * TODO: Check for the type of key exchange
00064   *  like conf->dh_key
00065  */
00066   ACE_INT32 load_dh_params(TLS_context *ctx, std::string &file);
00067   ACE_INT32 generate_eph_rsa_key(TLS_context *ctx);
00068   /*
00069   * Create Global context SSL and use it in every new session
00070   * # Load the trusted CAs
00071   * # Load the Private key & the certificate
00072   * # Set the Context options & Verify options
00073   */
00074   ACE_INT32 tls_handshake_recv(EAPTLS_session_t *ssn);
00075   static void tls_session_information(EAPTLS_session_t *tls_session);
00076   void tls_check_state(TLS_data *s, ACE_INT32 ret);
00077 
00078         enum EapTLSMngState
00079         {
00080                 StOk,
00081                 StAlertReceive,
00082                 StAlertSend
00083         };
00084 };
00085 
00086 class EAPTLS_tls_mng_peer : public EAPTLS_tls_mng
00087 {
00088   public:
00089     EAPTLS_tls_mng_peer():EAPTLS_tls_mng(){};
00090     TLS_context *init_tls_ctx(EAPTLS_config &conf);  
00091 };
00092 
00093 class EAPTLS_tls_mng_auth : public EAPTLS_tls_mng
00094 {
00095   public:
00096     EAPTLS_tls_mng_auth():EAPTLS_tls_mng(){};
00097     TLS_context *init_tls_ctx(EAPTLS_config &conf,ACE_INT32 session_id_context);
00098 };
00099 
00100 
00101 #endif

Generated on Fri Jun 25 19:16:16 2004 for EAP State Machine by doxygen 1.3.5