accesssec_plat/eap_qt_configuration_api/inc/eapqtconfig.h
changeset 26 9abfd4f00d37
child 27 9660a5eb236f
equal deleted inserted replaced
25:e03a3db4489e 26:9abfd4f00d37
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *   EAP method QT configuration
       
    16  *
       
    17  */
       
    18 
       
    19 /*
       
    20  * %version: 1 %
       
    21  */
       
    22 
       
    23 #ifndef EAPQTCONFIG_H
       
    24 #define EAPQTCONFIG_H
       
    25 
       
    26 #include <QList>
       
    27 #include <QVariant>
       
    28 
       
    29 #ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
       
    30 #define EAP_QT_CONFIG_EXPORT Q_DECL_EXPORT
       
    31 #else
       
    32 #define EAP_QT_CONFIG_EXPORT Q_DECL_IMPORT
       
    33 #endif
       
    34 
       
    35 class EapQtConfigPrivate;
       
    36 
       
    37 class EAP_QT_CONFIG_EXPORT EapQtConfig
       
    38 {
       
    39 public:
       
    40 
       
    41     // TODO: document default values
       
    42 
       
    43     enum SettingsId
       
    44     {
       
    45         // see also EapSettings.h
       
    46 
       
    47         /*! bool */
       
    48         UsernameAutomatic,
       
    49         /*! QString */
       
    50         Username,
       
    51         /*! bool */
       
    52         PasswordPrompt,
       
    53         /*! write-only: QString */
       
    54         Password,
       
    55         /*! bool
       
    56          * in read: defines if password already exists in settings database
       
    57          * in write: when true, defines that password is not included in the provided
       
    58          *      configuration since it already exists in settings database, i.e. earlier
       
    59          *      set password remains unchanged */
       
    60         PasswordStored,
       
    61         /*! write-only: bool
       
    62          * true: clears the password from database
       
    63          * false: does nothing
       
    64          */
       
    65         PasswordClear,
       
    66         /*! bool */
       
    67         RealmAutomatic,
       
    68         /*! QString */
       
    69         Realm,
       
    70         /*! bool */
       
    71         UsePseudonyms,
       
    72         /*! bool */
       
    73         VerifyServerRealm,
       
    74         /*! bool */
       
    75         ClientAuthenticationRequired,
       
    76         /*! uint */
       
    77         SessionValidityTime,
       
    78         /*! 
       
    79          * QList<uint> contains RFC numbers for activated ciphersuites
       
    80          *
       
    81          * Refer to RFC2246 chapter A.5 for the values.
       
    82          *
       
    83          * Supported CipherSuites by EAP Server default implementation: 
       
    84          * TLS_NULL_WITH_NULL_NULL = (0x0000), 
       
    85          * - No key exchange, no encryption and no authentication.
       
    86          * TLS_RSA_WITH_RC4_128_MD5 = (0x0004),
       
    87          * - RSA key exchange, RC4_128 encryption and MD5 authentication.
       
    88          *   NOTE this is included only because PEAP requires this cipher 
       
    89          *   suite as a mandatory. Think carefully whether this meets your 
       
    90          *   security requirements.
       
    91          * TLS_RSA_WITH_RC4_128_SHA = (0x0005), 
       
    92          * - RSA key exchange, RC4_128 encryption and SHA1 authentication.
       
    93          *   NOTE this is included only because PEAP requires this cipher 
       
    94          *   suite as a mandatory. Think carefully whether this meets your 
       
    95          *   security
       
    96          *   requirements.
       
    97          * TLS_RSA_WITH_3DES_EDE_CBC_SHA = (0x000a)
       
    98          * - RSA key exchange, 3DES-EDE-CBC encryption and SHA1 
       
    99          *   authentication.
       
   100          * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = (0x0016)
       
   101          * - Diffie-Helmann RSA key exchange, 3DES-EDE-CBC encryption and SHA1
       
   102          *   authentication.
       
   103          * TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = (0x0013)
       
   104          * - Diffie-Helmann DSS key exchange, 3DES-EDE-CBC encryption and SHA1
       
   105          *   authentication.
       
   106          * TLS_RSA_WITH_AES_128_CBC_SHA      = 0x002F
       
   107          * - RSA key exchange, AES-128 encryption and SHA1 authentication.
       
   108          * TLS_DHE_DSS_WITH_AES_128_CBC_SHA  = 0x0032
       
   109          * - Diffie-Helmann DSS key exchange, AES-128-CBC encryption and SHA1
       
   110          *   authentication.
       
   111          * TLS_DHE_RSA_WITH_AES_128_CBC_SHA  = 0x0033
       
   112          * - Diffie-Helmann RSA key exchange, AES-128-CBC encryption and SHA1
       
   113          *   authentication.
       
   114          * TLS_DH_anon_WITH_AES_128_CBC_SHA  = 0x0034,
       
   115          * - Supported when EAP-FAST is supported 
       
   116          * - Diffie-Helmann anonymous key exchange, AES-128-CBC encryption and 
       
   117          *   SHA1 authentication.
       
   118          */
       
   119         CipherSuites,
       
   120         /*! bool */
       
   121         PeapVersion0Allowed,
       
   122         /*! bool */
       
   123         PeapVersion1Allowed,
       
   124         /*! bool */
       
   125         PeapVersion2Allowed,
       
   126         /*! QList< QVariant(EapQtCertificateInfo) > */
       
   127         AuthorityCertificate,
       
   128         /*! QList< QVariant(EapQtCertificateInfo) > */
       
   129         UserCertificate,
       
   130         /*! QList< QVariant(EapQtPluginHandle) > */
       
   131         InnerType,
       
   132         /*!  EapQtPluginHandle */
       
   133         OuterType,
       
   134         /*! bool */
       
   135         ProvisioningModeAuthenticated,
       
   136         /*! bool */
       
   137         ProvisioningModeUnauthenticated,
       
   138         /*! QString */
       
   139         PACGroupReference,
       
   140         /*! bool */
       
   141         WarnADHPNoPAC,
       
   142         /*! bool */
       
   143         WarnADHPNoMatchingPAC,
       
   144         /*! bool */
       
   145         WarnNotDefaultServer,
       
   146         /*! bool */
       
   147         UseIdentityPrivacy,
       
   148         /*! bool */
       
   149         AuthorityCertificateAutomatic,
       
   150         /*! marker for the last entry */
       
   151         SettingsIdLast
       
   152     };
       
   153 
       
   154 public:
       
   155     EapQtConfig();
       
   156     ~EapQtConfig();
       
   157 
       
   158     QVariant value(SettingsId id);
       
   159     void setValue(SettingsId id, QVariant newValue);
       
   160     QList<EapQtConfig::SettingsId> validate(
       
   161         QList<EapQtConfig::SettingsId> ids);
       
   162     void clear();
       
   163 
       
   164 private:
       
   165     Q_DISABLE_COPY(EapQtConfig)
       
   166     QScopedPointer<EapQtConfigPrivate> d_ptr;
       
   167 };
       
   168 
       
   169 #endif