cleanup TLV code
[mech_eap.orig] / util_attr.h
index b0e3c05..c256e82 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -39,6 +39,7 @@
 
 #ifdef __cplusplus
 #include <string>
+#include <new>
 
 struct gss_eap_attr_provider;
 struct gss_eap_attr_ctx;
@@ -116,6 +117,9 @@ public:
 
     virtual time_t getExpiryTime(void) const { return 0; }
 
+    virtual OM_uint32 mapException(OM_uint32 *minor, std::exception &e) const
+    { return GSS_S_CONTINUE_NEEDED; }
+
     static bool init(void) { return true; }
     static void finalize(void) {}
 
@@ -208,6 +212,7 @@ public:
     unregisterProvider(unsigned int type);
 
     time_t getExpiryTime(void) const;
+    OM_uint32 mapException(OM_uint32 *minor, std::exception &e) const;
 
 private:
     bool providerEnabled(unsigned int type) const;
@@ -231,9 +236,6 @@ private:
 
 #ifdef __cplusplus
 
-#include <string>
-#include <new>
-
 static inline void
 duplicateBuffer(gss_buffer_desc &src, gss_buffer_t dst)
 {
@@ -272,7 +274,8 @@ OM_uint32
 gssEapCreateAttrContext(OM_uint32 *minor,
                         gss_cred_id_t acceptorCred,
                         gss_ctx_id_t acceptorCtx,
-                        struct gss_eap_attr_ctx **pAttrCtx);
+                        struct gss_eap_attr_ctx **pAttrCtx,
+                        time_t *pExpiryTime);
 
 OM_uint32
 gssEapInquireName(OM_uint32 *minor,