Commit 00ab4702 authored by Rich Evans's avatar Rich Evans
Browse files

cleanup library and some basic tests. Includes, add guards to includes

parent e83ac1d7
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if !defined(POLARSSL_ARC4_ALT)
// Regular implementation
......
......@@ -30,12 +30,12 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <stddef.h>
#if defined(POLARSSL_BIGNUM_C)
#include "bignum.h"
#endif
#include <string.h>
/**
* \addtogroup asn1_module
* \{
......
......@@ -24,7 +24,7 @@
#ifndef POLARSSL_BASE64_H
#define POLARSSL_BASE64_H
#include <string.h>
#include <stddef.h>
#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */
#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */
......
......@@ -24,14 +24,14 @@
#ifndef POLARSSL_BIGNUM_H
#define POLARSSL_BIGNUM_H
#include <string.h>
#if !defined(POLARSSL_CONFIG_FILE)
#include "config.h"
#else
#include POLARSSL_CONFIG_FILE
#endif
#include <stddef.h>
#if defined(POLARSSL_FS_IO)
#include <stdio.h>
#endif
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
......
......@@ -33,6 +33,8 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <stddef.h>
#if defined(POLARSSL_GCM_C) || defined(POLARSSL_CCM_C)
#define POLARSSL_CIPHER_MODE_AEAD
#endif
......@@ -41,8 +43,6 @@
#define POLARSSL_CIPHER_MODE_WITH_PADDING
#endif
#include <string.h>
#if defined(_MSC_VER) && !defined(inline)
#define inline _inline
#else
......
......@@ -31,6 +31,7 @@
#else
#include POLARSSL_CONFIG_FILE
#endif
#include "cipher.h"
#ifdef __cplusplus
......
......@@ -24,8 +24,6 @@
#ifndef POLARSSL_CTR_DRBG_H
#define POLARSSL_CTR_DRBG_H
#include <string.h>
#include "aes.h"
#define POLARSSL_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */
......
......@@ -29,7 +29,9 @@
#else
#include POLARSSL_CONFIG_FILE
#endif
#include "ssl.h"
#if defined(POLARSSL_ECP_C)
#include "ecp.h"
#endif
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
......
......@@ -24,14 +24,14 @@
#ifndef POLARSSL_ENTROPY_H
#define POLARSSL_ENTROPY_H
#include <string.h>
#if !defined(POLARSSL_CONFIG_FILE)
#include "config.h"
#else
#include POLARSSL_CONFIG_FILE
#endif
#include <stddef.h>
#if defined(POLARSSL_SHA512_C) && !defined(POLARSSL_ENTROPY_FORCE_SHA256)
#include "sha512.h"
#define POLARSSL_ENTROPY_SHA512_ACCUMULATOR
......
......@@ -24,14 +24,14 @@
#ifndef POLARSSL_ENTROPY_POLL_H
#define POLARSSL_ENTROPY_POLL_H
#include <string.h>
#if !defined(POLARSSL_CONFIG_FILE)
#include "config.h"
#else
#include POLARSSL_CONFIG_FILE
#endif
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -24,7 +24,7 @@
#ifndef POLARSSL_ERROR_H
#define POLARSSL_ERROR_H
#include <string.h>
#include <stddef.h>
/**
* Error code layout.
......
......@@ -24,7 +24,7 @@
#ifndef POLARSSL_HAVEGE_H
#define POLARSSL_HAVEGE_H
#include <string.h>
#include <stddef.h>
#define COLLECT_SIZE 1024
......
......@@ -26,7 +26,7 @@
#ifndef POLARSSL_MD_H
#define POLARSSL_MD_H
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(inline)
#define inline _inline
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#define POLARSSL_ERR_MD2_FILE_IO_ERROR -0x0070 /**< Read/write error in file. */
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
......
......@@ -30,7 +30,7 @@
#include POLARSSL_CONFIG_FILE
#endif
#include <string.h>
#include <stddef.h>
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment