aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/library.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-02-12 15:56:47 +0000
committerMartin Willi <martin@strongswan.org>2007-02-12 15:56:47 +0000
commitf27f6296e6ae5beece739342fd54528cf91e5394 (patch)
treec868a123b98b8a244b249473ab91b0bd4a764b31 /src/libstrongswan/library.c
parent6fda18d99d2b6eac921e731a52229d9c1cf8a295 (diff)
downloadstrongswan-f27f6296e6ae5beece739342fd54528cf91e5394.tar.bz2
strongswan-f27f6296e6ae5beece739342fd54528cf91e5394.tar.xz
merged EAP framework from branch into trunk
includes a lot of other modifications
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r--src/libstrongswan/library.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index ce3f827fa..3a76a5a05 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -43,6 +43,7 @@ ENUM(status_names, SUCCESS, DESTROY_ME,
"VERIFY_ERROR",
"INVALID_STATE",
"DESTROY_ME",
+ "NEED_MORE",
);
/**
@@ -59,6 +60,18 @@ void *clalloc(void * pointer, size_t size)
}
/**
+ * Described in header.
+ */
+void memxor(u_int8_t dest[], u_int8_t src[], size_t n)
+{
+ size_t i;
+ for (i = 0; i < n; i++)
+ {
+ dest[i] ^= src[i];
+ }
+}
+
+/**
* We use a single mutex for all refcount variables. This
* is not optimal for performance, but the critical section
* is not that long...