pkiutilities/ocsp/inc/ocsppolicy.h
changeset 0 164170e6151a
child 59 881d92421467
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file contains classes providing functionality to read the OCSP policy repository.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21 */
       
    22 
       
    23 #ifndef __OCSPPOLICY_H__
       
    24 #define __OCSPPOLICY_H__
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 // Security settings.
       
    29 #include <SecSettings/SecSettingsclient.h>
       
    30 
       
    31 #include <securityerr.h>
       
    32 
       
    33 // Following settings are read from the OCSP repository.
       
    34 //   KGenerateResponseForMissingUri = True/False
       
    35 //   KEnableHttpGETMethod = True/False
       
    36 //
       
    37 
       
    38 // Key for the setting - KGenerateResponseForMissingUri.
       
    39 const TUint32 KGenerateResponseForMissingUri = 0x1;
       
    40 
       
    41 // Key for the setting - KEnableHttpGetMethod.
       
    42 const TUint32 KEnableHttpGetMethod = 0x2;
       
    43 
       
    44 /*
       
    45  * COcspPolicy class - Implementation to read the OCSP central repository
       
    46  * settings.
       
    47  */
       
    48 class COcspPolicy : public CBase
       
    49 	{
       
    50 public:
       
    51 	/**
       
    52 	 * This function returns the setting for KGenerateResponseForMissingUri
       
    53 	 */
       
    54 	IMPORT_C TBool IsGenerateResponseForMissingUriEnabled() const;
       
    55 
       
    56 	/**
       
    57 	 * This function returns the setting for KEnableHttpGETMethod
       
    58 	 */
       
    59 	IMPORT_C TBool IsHttpGETMethodEnabled() const;
       
    60 
       
    61 
       
    62 	/**
       
    63   	 * This function is used to access the instance of this class. 
       
    64 	 * TLS is used to store pointer of the instance.
       
    65   	 */
       
    66 	IMPORT_C static COcspPolicy* NewL();
       
    67 
       
    68 private:	
       
    69 	COcspPolicy();
       
    70 
       
    71 
       
    72 	/**
       
    73 	 * The second-phase constructor. It reads the settings from
       
    74 	 * the repository.
       
    75 	 */
       
    76 	void ConstructL();
       
    77 
       
    78 private:
       
    79 	TBool iGenerateResponseForMissingUri;
       
    80 	TBool iEnableHttpGETMethod;
       
    81 	};
       
    82 
       
    83 
       
    84 #endif // __OCSPPOLICY_H__