vpnengine/ikepolparser/inc/ikepolparser.h
branchRCL_3
changeset 44 735de8341ce4
parent 41 e06095241a65
child 46 29c8f9bc68e1
equal deleted inserted replaced
41:e06095241a65 44:735de8341ce4
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   IKE policy parser main module
    14 * Description:  IKE policy parser main module
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #ifndef __IKEPOLPARSER_H
    18 #ifndef __IKEPOLPARSER_H
    19 #define __IKEPOLPARSER_H
    19 #define __IKEPOLPARSER_H
    20 
    20 
    21 #include <f32file.h>
    21 #include <f32file.h>
    22 #include <badesca.h>
    22 #include <badesca.h>
    23 #include <in_sock.h>
    23 #include <in_sock.h>
       
    24 
       
    25 #include "pkidefs.h"
       
    26 
    24 
    27 
    25 #define FIRST_SEC_PARSER_VERSION    1
    28 #define FIRST_SEC_PARSER_VERSION    1
    26 #define SEC_PARSER_VERSION          3
    29 #define SEC_PARSER_VERSION          3
    27 
    30 
    28 #define IKE_HOST_SEPARATOR  _L("[HOST]")
    31 #define IKE_HOST_SEPARATOR  _L("[HOST]")
    77 const TInt KSecParserErrUseIntAddr          = -5295;
    80 const TInt KSecParserErrUseIntAddr          = -5295;
    78 const TInt KSecParserErrUseNATProbe         = -5296;
    81 const TInt KSecParserErrUseNATProbe         = -5296;
    79 const TInt KSecParserErrUnknown             = -5297;
    82 const TInt KSecParserErrUnknown             = -5297;
    80 
    83 
    81 
    84 
    82 
       
    83 //Values for the choice lists used in the .RSS
    85 //Values for the choice lists used in the .RSS
    84 enum {IKE_PARSER_MAIN,
    86 enum {IKE_PARSER_MAIN,
    85       IKE_PARSER_AGGRESSIVE};       //Modes
    87       IKE_PARSER_AGGRESSIVE};       //Modes
    86 enum {IKE_PARSER_DES_CBC, 
    88 enum {IKE_PARSER_DES_CBC, 
    87       IKE_PARSER_DES3_CBC, 
    89       IKE_PARSER_DES3_CBC, 
   152     KEY_ID   = 3,
   154     KEY_ID   = 3,
   153     APPL_UID = 4			   
   155     APPL_UID = 4			   
   154 };
   156 };
   155 
   157 
   156 
   158 
   157 //RSA Encryption peer public keys
   159 // RSA Encryption peer public keys
   158 struct TCertInfo
   160 struct TCertInfo
   159 {
   161 {
   160     TCertFormat iFormat;
   162     TCertFormat       iFormat;
   161     TFileName   iData;    
   163     TBuf<KMaxX500DN>  iData;    
   162 };
   164 };
   163 
   165 
   164 
   166 
   165 enum TIdentityAsRfc822Name
   167 enum TIdentityAsRfc822Name
   166     {
   168     {
   170     };
   172     };
   171 
   173 
   172 //Own certificates
   174 //Own certificates
   173 struct TOwnCertInfo
   175 struct TOwnCertInfo
   174 {
   176 {
   175     TCertFormat iFormat;
   177     TCertFormat            iFormat;
   176     TFileName iData;    //File containing the peer RSA public key
   178     TFileName              iData;  // File containing the peer cert
   177     TBuf<128> iRfc822NameFqdn;
   179     TBuf<KMaxRfc822>       iRfc822NameFqdn;
   178     TIdentityAsRfc822Name iIdentityAsRfc822Name;
   180     TIdentityAsRfc822Name  iIdentityAsRfc822Name;
   179     TBuf<256> iSubjectDnSuffix;
   181     TBuf<KMaxX500DN>       iSubjectDnSuffix;
   180     TInt iPrivateKeyLength;
   182     TInt                   iPrivateKeyLength;
   181     TInt iOwnCertExists;                     // 0 = no own cert   1 = own cert exists
   183     TInt                   iOwnCertExists;  // 0=no own cert, 1=own cert exists
   182 };
   184 };
   183 
   185 
   184 class TStringData
   186 class TStringData
   185 {
   187 {
   186 	public:
   188 	public: