Skip to content

Commit

Permalink
lib:crypto: Include only the required header files
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
  • Loading branch information
cryptomilk authored and vlendec committed Feb 27, 2019
1 parent 0045a91 commit 0ee398e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 12 deletions.
3 changes: 2 additions & 1 deletion lib/crypto/aes_ccm_128.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*/

#include "replace.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/aes.h"
#include "lib/crypto/aes_ccm_128.h"
#include "lib/util/byteorder.h"

#define M_ ((AES_CCM_128_M - 2) / 2)
Expand Down
5 changes: 3 additions & 2 deletions lib/crypto/aes_ccm_128_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
*/
#include "replace.h"
#include "../lib/util/samba_util.h"
#include "../lib/crypto/crypto.h"
#include "../lib/crypto/aes_test.h"
#include "lib/crypto/aes.h"
#include "lib/crypto/aes_ccm_128.h"
#include "lib/crypto/aes_test.h"

#ifndef AES_CCM_128_ONLY_TESTVECTORS
struct torture_context;
Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/aes_cmac_128.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
*/

#include "replace.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/aes.h"
#include "lib/crypto/aes_cmac_128.h"

static const uint8_t const_Zero[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/aes_cmac_128_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
*/
#include "replace.h"
#include "../lib/util/samba_util.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/aes.h"
#include "lib/crypto/aes_cmac_128.h"

struct torture_context;
bool torture_local_crypto_aes_cmac_128(struct torture_context *torture);
Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/aes_gcm_128.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*/

#include "replace.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/aes.h"
#include "lib/crypto/aes_gcm_128.h"
#include "lib/util/byteorder.h"

static inline void aes_gcm_128_inc32(uint8_t inout[AES_BLOCK_SIZE])
Expand Down
5 changes: 3 additions & 2 deletions lib/crypto/aes_gcm_128_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
*/
#include "replace.h"
#include "../lib/util/samba_util.h"
#include "../lib/crypto/crypto.h"
#include "../lib/crypto/aes_test.h"
#include "lib/crypto/aes.h"
#include "lib/crypto/aes_gcm_128.h"
#include "lib/crypto/aes_test.h"

#ifndef AES_GCM_128_ONLY_TESTVECTORS
struct torture_context;
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto/hmacmd5test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
#include "replace.h"
#include "../lib/util/samba_util.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/hmacmd5.h"

struct torture_context;
bool torture_local_crypto_hmacmd5(struct torture_context *torture);
Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/hmacsha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
*/

#include "replace.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/sha256.h"
#include "lib/crypto/hmacsha256.h"

/***********************************************************************
the rfc 2104/2202 version of hmac_sha256 initialisation.
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto/md4test.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "replace.h"
#include "../lib/util/samba_util.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/md4.h"

struct torture_context;
bool torture_local_crypto_md4(struct torture_context *torture);
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto/md5test.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "replace.h"
#include "../lib/util/samba_util.h"
#include "../lib/crypto/crypto.h"
#include "lib/crypto/md5.h"

struct torture_context;

Expand Down

0 comments on commit 0ee398e

Please sign in to comment.