summaryrefslogtreecommitdiffabout
path: root/include/opkele
authorMichael Krelin <hacker@klever.net>2007-12-21 21:22:54 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-04 18:34:12 (UTC)
commit14f6295f3ffb22848d848265042b088a28451677 (patch) (unidiff)
treed0ee0b91728aa635c435b9859193cb903c849087 /include/opkele
parentb52ad4dc051835fdf8417f748bf40ba4c17449d4 (diff)
downloadlibopkele-14f6295f3ffb22848d848265042b088a28451677.zip
libopkele-14f6295f3ffb22848d848265042b088a28451677.tar.gz
libopkele-14f6295f3ffb22848d848265042b088a28451677.tar.bz2
id_res_cancel and id_res_bad_nonce exceptions
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/exception.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/opkele/exception.h b/include/opkele/exception.h
index 64f189e..d003ce4 100644
--- a/include/opkele/exception.h
+++ b/include/opkele/exception.h
@@ -163,48 +163,66 @@ namespace opkele {
163 string setup_url; 163 string setup_url;
164 id_res_setup(OPKELE_E_PARS,const string& su) 164 id_res_setup(OPKELE_E_PARS,const string& su)
165 : id_res_failed(OPKELE_E_CONS), setup_url(su) { } 165 : id_res_failed(OPKELE_E_CONS), setup_url(su) { }
166 ~id_res_setup() throw() { } 166 ~id_res_setup() throw() { }
167 }; 167 };
168 /** 168 /**
169 * thrown in case of signature mismatch 169 * thrown in case of signature mismatch
170 */ 170 */
171 class id_res_mismatch : public id_res_failed { 171 class id_res_mismatch : public id_res_failed {
172 public: 172 public:
173 id_res_mismatch(OPKELE_E_PARS) 173 id_res_mismatch(OPKELE_E_PARS)
174 : id_res_failed(OPKELE_E_CONS) { } 174 : id_res_failed(OPKELE_E_CONS) { }
175 }; 175 };
176 176
177 /** 177 /**
178 * thrown if the association has expired before it could've been verified. 178 * thrown if the association has expired before it could've been verified.
179 */ 179 */
180 class id_res_expired_on_delivery : public id_res_failed { 180 class id_res_expired_on_delivery : public id_res_failed {
181 public: 181 public:
182 id_res_expired_on_delivery(OPKELE_E_PARS) 182 id_res_expired_on_delivery(OPKELE_E_PARS)
183 : id_res_failed(OPKELE_E_CONS) { } 183 : id_res_failed(OPKELE_E_CONS) { }
184 }; 184 };
185 185
186 /** 186 /**
187 * thown when the user cancelled authentication process.
188 */
189 class id_res_cancel : public id_res_failed {
190 public:
191 id_res_cancel(OPKELE_E_PARS)
192 : id_res_failed(OPKELE_E_CONS) { }
193 };
194
195 /**
196 * thrown in case of nonce reuse or otherwise imperfect nonce.
197 */
198 class id_res_bad_nonce : public id_res_failed {
199 public:
200 id_res_bad_nonce(OPKELE_E_PARS)
201 : id_res_failed(OPKELE_E_CONS) { }
202 };
203
204 /**
187 * openssl malfunction occured 205 * openssl malfunction occured
188 */ 206 */
189 class exception_openssl : public exception { 207 class exception_openssl : public exception {
190 public: 208 public:
191 unsigned long _error; 209 unsigned long _error;
192 string _ssl_string; 210 string _ssl_string;
193 exception_openssl(OPKELE_E_PARS); 211 exception_openssl(OPKELE_E_PARS);
194 ~exception_openssl() throw() { } 212 ~exception_openssl() throw() { }
195 }; 213 };
196 214
197 /** 215 /**
198 * network operation related error occured 216 * network operation related error occured
199 */ 217 */
200 class exception_network : public exception { 218 class exception_network : public exception {
201 public: 219 public:
202 exception_network(OPKELE_E_PARS) 220 exception_network(OPKELE_E_PARS)
203 : exception(OPKELE_E_CONS) { } 221 : exception(OPKELE_E_CONS) { }
204 }; 222 };
205 223
206 /** 224 /**
207 * network operation related error occured, specifically, related to 225 * network operation related error occured, specifically, related to
208 * libcurl 226 * libcurl
209 */ 227 */
210 class exception_curl : public exception_network { 228 class exception_curl : public exception_network {