aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/encoding/payloads/auth_payload.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-12-03 14:47:58 +0000
committerJan Hutter <jhutter@hsr.ch>2005-12-03 14:47:58 +0000
commit8d68033e5cf37ea91eb160e7b8e1c2d171a356f7 (patch)
tree5dbb4a65d0e65bd22873ed7fce9b2fdcb890a330 /Source/charon/encoding/payloads/auth_payload.c
parentebae15f0a03dae6b4b04f75b2f690cce4e7d308a (diff)
downloadstrongswan-8d68033e5cf37ea91eb160e7b8e1c2d171a356f7.tar.bz2
strongswan-8d68033e5cf37ea91eb160e7b8e1c2d171a356f7.tar.xz
- authentication with preshared key working but code MUST be cleaned
Diffstat (limited to 'Source/charon/encoding/payloads/auth_payload.c')
-rw-r--r--Source/charon/encoding/payloads/auth_payload.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/charon/encoding/payloads/auth_payload.c b/Source/charon/encoding/payloads/auth_payload.c
index 1070826c2..e9dad81b4 100644
--- a/Source/charon/encoding/payloads/auth_payload.c
+++ b/Source/charon/encoding/payloads/auth_payload.c
@@ -215,6 +215,14 @@ static void set_data (private_auth_payload_t *this, chunk_t data)
*/
static chunk_t get_data (private_auth_payload_t *this)
{
+ return (this->auth_data);
+}
+
+/**
+ * Implementation of auth_payload_t.get_data_clone.
+ */
+static chunk_t get_data_clone (private_auth_payload_t *this)
+{
chunk_t cloned_data;
if (this->auth_data.ptr == NULL)
{
@@ -259,6 +267,7 @@ auth_payload_t *auth_payload_create()
this->public.set_auth_method = (void (*) (auth_payload_t *,auth_method_t)) set_auth_method;
this->public.get_auth_method = (auth_method_t (*) (auth_payload_t *)) get_auth_method;
this->public.set_data = (void (*) (auth_payload_t *,chunk_t)) set_data;
+ this->public.get_data_clone = (chunk_t (*) (auth_payload_t *)) get_data_clone;
this->public.get_data = (chunk_t (*) (auth_payload_t *)) get_data;
/* private variables */