diff options
Diffstat (limited to 'src/libstrongswan/plugins/fips_prf/fips_prf.c')
-rw-r--r-- | src/libstrongswan/plugins/fips_prf/fips_prf.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/libstrongswan/plugins/fips_prf/fips_prf.c b/src/libstrongswan/plugins/fips_prf/fips_prf.c index 27a3b9cc6..ee71f6efd 100644 --- a/src/libstrongswan/plugins/fips_prf/fips_prf.c +++ b/src/libstrongswan/plugins/fips_prf/fips_prf.c @@ -106,12 +106,8 @@ static void chunk_mod(size_t length, chunk_t chunk, u_int8_t buffer[]) * 0xcb, 0x0f, 0x6c, 0x55, 0xba, 0xbb, 0x13, 0x78, * 0x8e, 0x20, 0xd7, 0x37, 0xa3, 0x27, 0x51, 0x16 */ -<<<<<<< HEAD -static void get_bytes(private_fips_prf_t *this, chunk_t seed, u_int8_t w[]) -======= METHOD(prf_t, get_bytes, void, private_fips_prf_t *this, chunk_t seed, u_int8_t w[]) ->>>>>>> upstream/4.5.1 { int i; u_int8_t xval[this->b]; @@ -144,19 +140,6 @@ METHOD(prf_t, get_bytes, void, /* 3.3 done already, mod q not used */ } -<<<<<<< HEAD -/** - * Implementation of prf_t.get_block_size. - */ -static size_t get_block_size(private_fips_prf_t *this) -{ - return 2 * this->b; -} -/** - * Implementation of prf_t.allocate_bytes. - */ -static void allocate_bytes(private_fips_prf_t *this, chunk_t seed, chunk_t *chunk) -======= METHOD(prf_t, get_block_size, size_t, private_fips_prf_t *this) { @@ -164,34 +147,19 @@ METHOD(prf_t, get_block_size, size_t, } METHOD(prf_t, allocate_bytes, void, private_fips_prf_t *this, chunk_t seed, chunk_t *chunk) ->>>>>>> upstream/4.5.1 { *chunk = chunk_alloc(get_block_size(this)); get_bytes(this, seed, chunk->ptr); } -<<<<<<< HEAD -/** - * Implementation of prf_t.get_key_size. - */ -static size_t get_key_size(private_fips_prf_t *this) -======= METHOD(prf_t, get_key_size, size_t, private_fips_prf_t *this) ->>>>>>> upstream/4.5.1 { return this->b; } -<<<<<<< HEAD -/** - * Implementation of prf_t.set_key. - */ -static void set_key(private_fips_prf_t *this, chunk_t key) -======= METHOD(prf_t, set_key, void, private_fips_prf_t *this, chunk_t key) ->>>>>>> upstream/4.5.1 { /* save key as "key mod 2^b" */ chunk_mod(this->b, key, this->key); @@ -223,15 +191,8 @@ void g_sha1(private_fips_prf_t *this, chunk_t c, u_int8_t res[]) this->keyed_prf->get_bytes(this->keyed_prf, c, res); } -<<<<<<< HEAD -/** - * Implementation of prf_t.destroy. - */ -static void destroy(private_fips_prf_t *this) -======= METHOD(prf_t, destroy, void, private_fips_prf_t *this) ->>>>>>> upstream/4.5.1 { this->keyed_prf->destroy(this->keyed_prf); free(this->key); @@ -243,16 +204,6 @@ METHOD(prf_t, destroy, void, */ fips_prf_t *fips_prf_create(pseudo_random_function_t algo) { -<<<<<<< HEAD - private_fips_prf_t *this = malloc_thing(private_fips_prf_t); - - this->public.prf_interface.get_bytes = (void (*) (prf_t *,chunk_t,u_int8_t*))get_bytes; - this->public.prf_interface.allocate_bytes = (void (*) (prf_t*,chunk_t,chunk_t*))allocate_bytes; - this->public.prf_interface.get_block_size = (size_t (*) (prf_t*))get_block_size; - this->public.prf_interface.get_key_size = (size_t (*) (prf_t*))get_key_size; - this->public.prf_interface.set_key = (void (*) (prf_t *,chunk_t))set_key; - this->public.prf_interface.destroy = (void (*) (prf_t *))destroy; -======= private_fips_prf_t *this; INIT(this, @@ -267,7 +218,6 @@ fips_prf_t *fips_prf_create(pseudo_random_function_t algo) }, }, ); ->>>>>>> upstream/4.5.1 switch (algo) { |