00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INCL_CREDENTIAL_HANDLER
00020 #define INCL_CREDENTIAL_HANDLER
00021
00023 #include "base/fscapi.h"
00024 #include "base/constants.h"
00025 #include "base/util/utils.h"
00026 #include "spds/constants.h"
00027 #include "syncml/core/TagNames.h"
00028 #include "syncml/core/ObjectDel.h"
00029
00030 class CredentialHandler{
00031
00032 private:
00033
00034 char* username;
00035 char* password;
00036 char* clientAuthType;
00037 char* clientNonce;
00038
00039 char* serverID;
00040 char* serverPWD;
00041 char* serverAuthType;
00042 char* serverNonce;
00043
00044 BOOL isServerAuthRequired;
00045
00049 void initialize() EXTRA_SECTION_01;
00050 void generateNonce(char nonce[16]) EXTRA_SECTION_01;
00051
00052 public:
00053
00054
00055
00056 CredentialHandler() EXTRA_SECTION_01;
00057
00058 ~CredentialHandler() EXTRA_SECTION_01;
00059
00060
00061
00062
00063
00064
00065
00066 CredentialHandler(const char* key) EXTRA_SECTION_01;
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 void setUsername(const char* t) EXTRA_SECTION_01;
00077 const char* getUsername() EXTRA_SECTION_01;
00078 void setPassword(const char* t) EXTRA_SECTION_01;
00079 const char* getPassword() EXTRA_SECTION_01;
00080 void setClientAuthType(const char* t) EXTRA_SECTION_01;
00081 void setClientNonce(const char* t) EXTRA_SECTION_01;
00082 const char* getClientAuthType() EXTRA_SECTION_01;
00083 const char* getClientNonce() EXTRA_SECTION_01;
00084
00085 void setServerID(const char* t) EXTRA_SECTION_01;
00086 void setServerPWD(const char* t) EXTRA_SECTION_01;
00087 void setServerAuthType(const char* t) EXTRA_SECTION_01;
00088 void setServerNonce(const char* t) EXTRA_SECTION_01;
00089 const char* getServerAuthType() EXTRA_SECTION_01;
00090 const char* getServerNonce() EXTRA_SECTION_01;
00091
00092 void setServerAuthRequired(BOOL t) EXTRA_SECTION_01;
00093 BOOL getServerAuthRequired() EXTRA_SECTION_01;
00094
00095 Cred* getClientCredential() EXTRA_SECTION_01;
00096 Cred* getServerCredential() EXTRA_SECTION_01;
00097 Chal* getServerChal(BOOL isServerAuthenticated) EXTRA_SECTION_01;
00098 BOOL performServerAuth(Cred* cred) EXTRA_SECTION_01;
00099
00100 };
00101
00103 #endif