aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/fips_prf/fips_prf.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-09-11 15:35:10 +0200
committerMartin Willi <martin@strongswan.org>2009-09-11 15:39:35 +0200
commit3b878dae7e7bb00f8d886426dc4f75bf45b8113f (patch)
treebe56294135f3b29788390b4695de1c973b454302 /src/libstrongswan/plugins/fips_prf/fips_prf.c
parent3a7bd9bd49685c96313038436b770115651b7caa (diff)
downloadstrongswan-3b878dae7e7bb00f8d886426dc4f75bf45b8113f.tar.bz2
strongswan-3b878dae7e7bb00f8d886426dc4f75bf45b8113f.tar.xz
Removed chunk_from_buf() in favor of a simpler chunk_from_chars() macro
Diffstat (limited to 'src/libstrongswan/plugins/fips_prf/fips_prf.c')
-rw-r--r--src/libstrongswan/plugins/fips_prf/fips_prf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/fips_prf/fips_prf.c b/src/libstrongswan/plugins/fips_prf/fips_prf.c
index ba8158367..123d2a244 100644
--- a/src/libstrongswan/plugins/fips_prf/fips_prf.c
+++ b/src/libstrongswan/plugins/fips_prf/fips_prf.c
@@ -114,7 +114,6 @@ static void get_bytes(private_fips_prf_t *this, chunk_t seed, u_int8_t w[])
u_int8_t sum[this->b];
u_int8_t *xkey = this->key;
u_int8_t one[this->b];
- chunk_t xval_chunk = chunk_from_buf(xval);
memset(one, 0, this->b);
one[this->b - 1] = 0x01;
@@ -129,7 +128,7 @@ static void get_bytes(private_fips_prf_t *this, chunk_t seed, u_int8_t w[])
add_mod(this->b, xkey, xseed, xval);
DBG3("XVAL %b", xval, this->b);
/* b. wi = G(t, XVAL ) */
- this->g(this, xval_chunk, &w[i * this->b]);
+ this->g(this, chunk_create(xval, this->b), &w[i * this->b]);
DBG3("w[%d] %b", i, &w[i * this->b], this->b);
/* c. XKEY = (1 + XKEY + wi) mod 2b */
add_mod(this->b, xkey, &w[i * this->b], sum);