summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/crypto
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-09 22:52:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 09:08:23 +0200
commite599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch)
tree1172b8b830a1c3236e45c834c2b80e01325ea144 /freebsd/sys/crypto
parentMove files to match FreeBSD layout (diff)
downloadrtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files are mapped by the translation script: o rtems/bsd/sys/_types.h o rtems/bsd/sys/errno.h o rtems/bsd/sys/lock.h o rtems/bsd/sys/param.h o rtems/bsd/sys/resource.h o rtems/bsd/sys/time.h o rtems/bsd/sys/timespec.h o rtems/bsd/sys/types.h o rtems/bsd/sys/unistd.h It is now possible to include <sys/socket.h> directly for example. Generate one Makefile which builds everything including tests.
Diffstat (limited to 'freebsd/sys/crypto')
-rw-r--r--freebsd/sys/crypto/blowfish/bf_ecb.c10
-rw-r--r--freebsd/sys/crypto/blowfish/bf_enc.c10
-rw-r--r--freebsd/sys/crypto/blowfish/bf_skey.c16
-rw-r--r--freebsd/sys/crypto/camellia/camellia-api.c10
-rw-r--r--freebsd/sys/crypto/camellia/camellia.c16
-rw-r--r--freebsd/sys/crypto/des/des_ecb.c12
-rw-r--r--freebsd/sys/crypto/des/des_enc.c8
-rw-r--r--freebsd/sys/crypto/des/des_locl.h2
-rw-r--r--freebsd/sys/crypto/des/des_setkey.c14
-rw-r--r--freebsd/sys/crypto/rc4/rc4.c14
-rw-r--r--freebsd/sys/crypto/rc4/rc4.h4
-rw-r--r--freebsd/sys/crypto/rijndael/rijndael-alg-fst.c18
-rw-r--r--freebsd/sys/crypto/rijndael/rijndael-api-fst.c14
-rw-r--r--freebsd/sys/crypto/rijndael/rijndael-api-fst.h2
-rw-r--r--freebsd/sys/crypto/rijndael/rijndael-api.c10
-rw-r--r--freebsd/sys/crypto/sha1.c14
-rw-r--r--freebsd/sys/crypto/sha1.h6
-rw-r--r--freebsd/sys/crypto/sha2/sha2.c16
-rw-r--r--freebsd/sys/crypto/sha2/sha2.h2
19 files changed, 99 insertions, 99 deletions
diff --git a/freebsd/sys/crypto/blowfish/bf_ecb.c b/freebsd/sys/crypto/blowfish/bf_ecb.c
index 50f26508..53b1c307 100644
--- a/freebsd/sys/crypto/blowfish/bf_ecb.c
+++ b/freebsd/sys/crypto/blowfish/bf_ecb.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* crypto/bf/bf_ecb.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
@@ -58,12 +58,12 @@
* [including the GNU Public Licence.]
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
-#include <freebsd/crypto/blowfish/blowfish.h>
-#include <freebsd/crypto/blowfish/bf_locl.h>
+#include <rtems/bsd/sys/types.h>
+#include <crypto/blowfish/blowfish.h>
+#include <crypto/blowfish/bf_locl.h>
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
* (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
diff --git a/freebsd/sys/crypto/blowfish/bf_enc.c b/freebsd/sys/crypto/blowfish/bf_enc.c
index 59cb399b..3629f433 100644
--- a/freebsd/sys/crypto/blowfish/bf_enc.c
+++ b/freebsd/sys/crypto/blowfish/bf_enc.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: bf_enc.c,v 1.7 2002/02/27 01:33:59 itojun Exp $ */
@@ -61,12 +61,12 @@
* [including the GNU Public Licence.]
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
-#include <freebsd/crypto/blowfish/blowfish.h>
-#include <freebsd/crypto/blowfish/bf_locl.h>
+#include <rtems/bsd/sys/types.h>
+#include <crypto/blowfish/blowfish.h>
+#include <crypto/blowfish/bf_locl.h>
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
* (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
diff --git a/freebsd/sys/crypto/blowfish/bf_skey.c b/freebsd/sys/crypto/blowfish/bf_skey.c
index cc53ae55..86720555 100644
--- a/freebsd/sys/crypto/blowfish/bf_skey.c
+++ b/freebsd/sys/crypto/blowfish/bf_skey.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: bf_skey.c,v 1.7 2002/02/27 01:33:59 itojun Exp $ */
@@ -61,15 +61,15 @@
* [including the GNU Public Licence.]
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
-#include <freebsd/sys/time.h>
-#include <freebsd/sys/systm.h>
-#include <freebsd/crypto/blowfish/blowfish.h>
-#include <freebsd/crypto/blowfish/bf_locl.h>
-#include <freebsd/crypto/blowfish/bf_pi.h>
+#include <rtems/bsd/sys/types.h>
+#include <rtems/bsd/sys/time.h>
+#include <sys/systm.h>
+#include <crypto/blowfish/blowfish.h>
+#include <crypto/blowfish/bf_locl.h>
+#include <crypto/blowfish/bf_pi.h>
void
BF_set_key(key, len, data)
diff --git a/freebsd/sys/crypto/camellia/camellia-api.c b/freebsd/sys/crypto/camellia/camellia-api.c
index 1b749b48..82e7a61c 100644
--- a/freebsd/sys/crypto/camellia/camellia-api.c
+++ b/freebsd/sys/crypto/camellia/camellia-api.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/*
*
@@ -29,13 +29,13 @@
* $FreeBSD$
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
-#include <freebsd/sys/types.h>
+#include <rtems/bsd/sys/types.h>
#ifdef _KERNEL
-#include <freebsd/sys/systm.h>
+#include <sys/systm.h>
#endif
-#include <freebsd/crypto/camellia/camellia.h>
+#include <crypto/camellia/camellia.h>
void
camellia_set_key(camellia_ctx *ctx, const u_char *key, int bits)
diff --git a/freebsd/sys/crypto/camellia/camellia.c b/freebsd/sys/crypto/camellia/camellia.c
index 512dfd99..6d01a512 100644
--- a/freebsd/sys/crypto/camellia/camellia.c
+++ b/freebsd/sys/crypto/camellia/camellia.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* camellia.h ver 1.1.0
*
@@ -34,18 +34,18 @@
* http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
*/
-#include <freebsd/sys/cdefs.h>
-#include <freebsd/sys/types.h>
-#include <freebsd/sys/endian.h>
+#include <sys/cdefs.h>
+#include <rtems/bsd/sys/types.h>
+#include <sys/endian.h>
#ifdef _KERNEL
-#include <freebsd/sys/systm.h>
+#include <sys/systm.h>
#else
-#include <freebsd/string.h>
-#include <freebsd/assert.h>
+#include <string.h>
+#include <assert.h>
#define KASSERT(exp, msg) assert(exp)
#endif
-#include <freebsd/crypto/camellia/camellia.h>
+#include <crypto/camellia/camellia.h>
/* key constants */
diff --git a/freebsd/sys/crypto/des/des_ecb.c b/freebsd/sys/crypto/des/des_ecb.c
index 7c4c8386..7b950e55 100644
--- a/freebsd/sys/crypto/des/des_ecb.c
+++ b/freebsd/sys/crypto/des/des_ecb.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: des_ecb.c,v 1.6 2001/09/10 04:03:58 itojun Exp $ */
@@ -50,13 +50,13 @@
* [including the GNU Public Licence.]
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/param.h>
-#include <freebsd/sys/systm.h>
-#include <freebsd/crypto/des/des_locl.h>
-#include <freebsd/crypto/des/spr.h>
+#include <rtems/bsd/sys/param.h>
+#include <sys/systm.h>
+#include <crypto/des/des_locl.h>
+#include <crypto/des/spr.h>
/* char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay"; */ /* wrong */
/* char *DES_version="DES part of SSLeay 0.6.4 30-Aug-1996"; */
diff --git a/freebsd/sys/crypto/des/des_enc.c b/freebsd/sys/crypto/des/des_enc.c
index ec5f96dd..fca59b3a 100644
--- a/freebsd/sys/crypto/des/des_enc.c
+++ b/freebsd/sys/crypto/des/des_enc.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: des_enc.c,v 1.1 2001/09/10 04:03:58 itojun Exp $ */
@@ -61,11 +61,11 @@
* [including the GNU Public Licence.]
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
-#include <freebsd/crypto/des/des_locl.h>
+#include <rtems/bsd/sys/types.h>
+#include <crypto/des/des_locl.h>
extern const DES_LONG des_SPtrans[8][64];
diff --git a/freebsd/sys/crypto/des/des_locl.h b/freebsd/sys/crypto/des/des_locl.h
index 6c92eb74..2c3cacc1 100644
--- a/freebsd/sys/crypto/des/des_locl.h
+++ b/freebsd/sys/crypto/des/des_locl.h
@@ -51,7 +51,7 @@
#ifndef HEADER_DES_LOCL_H
#define HEADER_DES_LOCL_H
-#include <freebsd/crypto/des/des.h>
+#include <crypto/des/des.h>
#undef DES_PTR
diff --git a/freebsd/sys/crypto/des/des_setkey.c b/freebsd/sys/crypto/des/des_setkey.c
index 398a89d4..b8519ef2 100644
--- a/freebsd/sys/crypto/des/des_setkey.c
+++ b/freebsd/sys/crypto/des/des_setkey.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: des_setkey.c,v 1.7 2001/09/10 04:03:58 itojun Exp $ */
@@ -58,14 +58,14 @@
* 1.0 First working version
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/param.h>
-#include <freebsd/sys/systm.h>
-#include <freebsd/crypto/des/des_locl.h>
-#include <freebsd/crypto/des/podd.h>
-#include <freebsd/crypto/des/sk.h>
+#include <rtems/bsd/sys/param.h>
+#include <sys/systm.h>
+#include <crypto/des/des_locl.h>
+#include <crypto/des/podd.h>
+#include <crypto/des/sk.h>
int des_check_key=0;
diff --git a/freebsd/sys/crypto/rc4/rc4.c b/freebsd/sys/crypto/rc4/rc4.c
index 417c3b44..ce62c712 100644
--- a/freebsd/sys/crypto/rc4/rc4.c
+++ b/freebsd/sys/crypto/rc4/rc4.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/*
* rc4.c
@@ -36,14 +36,14 @@
* OF SUCH DAMAGE.
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/param.h>
-#include <freebsd/sys/kernel.h>
-#include <freebsd/sys/module.h>
-#include <freebsd/sys/types.h>
-#include <freebsd/crypto/rc4/rc4.h>
+#include <rtems/bsd/sys/param.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <rtems/bsd/sys/types.h>
+#include <crypto/rc4/rc4.h>
static __inline void
swap_bytes(u_char *a, u_char *b)
diff --git a/freebsd/sys/crypto/rc4/rc4.h b/freebsd/sys/crypto/rc4/rc4.h
index 90723ddb..670b1a00 100644
--- a/freebsd/sys/crypto/rc4/rc4.h
+++ b/freebsd/sys/crypto/rc4/rc4.h
@@ -37,8 +37,8 @@
* $FreeBSD$
*/
-#ifndef _SYS_CRYPTO_RC4_RC4_HH_
-#define _SYS_CRYPTO_RC4_RC4_HH_
+#ifndef _SYS_CRYPTO_RC4_RC4_H_
+#define _SYS_CRYPTO_RC4_RC4_H_
struct rc4_state {
u_char perm[256];
diff --git a/freebsd/sys/crypto/rijndael/rijndael-alg-fst.c b/freebsd/sys/crypto/rijndael/rijndael-alg-fst.c
index 351f6526..14ac56ba 100644
--- a/freebsd/sys/crypto/rijndael/rijndael-alg-fst.c
+++ b/freebsd/sys/crypto/rijndael/rijndael-alg-fst.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: rijndael-alg-fst.c,v 1.10 2003/07/15 10:47:16 itojun Exp $ */
/**
@@ -26,21 +26,21 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/cdefs.h>
-#include <freebsd/sys/types.h>
+#include <sys/cdefs.h>
+#include <rtems/bsd/sys/types.h>
#ifdef _KERNEL
-#include <freebsd/sys/systm.h>
+#include <sys/systm.h>
#else
-#include <freebsd/string.h>
-#include <freebsd/assert.h>
+#include <string.h>
+#include <assert.h>
#define KASSERT(exp, msg) assert(exp)
#endif
-#include <freebsd/crypto/rijndael/rijndael.h>
-#include <freebsd/crypto/rijndael/rijndael_local.h>
+#include <crypto/rijndael/rijndael.h>
+#include <crypto/rijndael/rijndael_local.h>
/*
Te0[x] = S [x].[02, 01, 01, 03];
diff --git a/freebsd/sys/crypto/rijndael/rijndael-api-fst.c b/freebsd/sys/crypto/rijndael/rijndael-api-fst.c
index d63997e5..e715c9b7 100644
--- a/freebsd/sys/crypto/rijndael/rijndael-api-fst.c
+++ b/freebsd/sys/crypto/rijndael/rijndael-api-fst.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: rijndael-api-fst.c,v 1.10 2001/05/27 09:34:18 itojun Exp $ */
@@ -17,18 +17,18 @@
* This code is placed in the public domain.
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/param.h>
+#include <rtems/bsd/sys/param.h>
#ifdef _KERNEL
-#include <freebsd/sys/systm.h>
+#include <sys/systm.h>
#else
-#include <freebsd/string.h>
+#include <string.h>
#endif
-#include <freebsd/crypto/rijndael/rijndael_local.h>
-#include <freebsd/crypto/rijndael/rijndael-api-fst.h>
+#include <crypto/rijndael/rijndael_local.h>
+#include <crypto/rijndael/rijndael-api-fst.h>
#ifndef TRUE
#define TRUE 1
diff --git a/freebsd/sys/crypto/rijndael/rijndael-api-fst.h b/freebsd/sys/crypto/rijndael/rijndael-api-fst.h
index f21cb790..122bf52d 100644
--- a/freebsd/sys/crypto/rijndael/rijndael-api-fst.h
+++ b/freebsd/sys/crypto/rijndael/rijndael-api-fst.h
@@ -11,7 +11,7 @@
#ifndef __RIJNDAEL_API_FST_H
#define __RIJNDAEL_API_FST_H
-#include <freebsd/crypto/rijndael/rijndael.h>
+#include <crypto/rijndael/rijndael.h>
/* Generic Defines */
#define DIR_ENCRYPT 0 /* Are we encrpyting? */
diff --git a/freebsd/sys/crypto/rijndael/rijndael-api.c b/freebsd/sys/crypto/rijndael/rijndael-api.c
index 2134aa5c..46823e7d 100644
--- a/freebsd/sys/crypto/rijndael/rijndael-api.c
+++ b/freebsd/sys/crypto/rijndael/rijndael-api.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: rijndael.c,v 1.3 2003/08/28 14:20:22 itojun Exp $ */
@@ -28,15 +28,15 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
+#include <rtems/bsd/sys/types.h>
#ifdef _KERNEL
-#include <freebsd/sys/systm.h>
+#include <sys/systm.h>
#endif
-#include <freebsd/crypto/rijndael/rijndael.h>
+#include <crypto/rijndael/rijndael.h>
void
rijndael_set_key(rijndael_ctx *ctx, const u_char *key, int bits)
diff --git a/freebsd/sys/crypto/sha1.c b/freebsd/sys/crypto/sha1.c
index 76b938af..a850eb60 100644
--- a/freebsd/sys/crypto/sha1.c
+++ b/freebsd/sys/crypto/sha1.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: sha1.c,v 1.5 2000/11/08 06:13:08 itojun Exp $ */
/*
@@ -36,15 +36,15 @@
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
-#include <freebsd/sys/cdefs.h>
-#include <freebsd/sys/time.h>
-#include <freebsd/sys/systm.h>
+#include <rtems/bsd/sys/types.h>
+#include <sys/cdefs.h>
+#include <rtems/bsd/sys/time.h>
+#include <sys/systm.h>
-#include <freebsd/crypto/sha1.h>
+#include <crypto/sha1.h>
/* sanity check */
#if BYTE_ORDER != BIG_ENDIAN
diff --git a/freebsd/sys/crypto/sha1.h b/freebsd/sys/crypto/sha1.h
index 18aedda0..3686d7dd 100644
--- a/freebsd/sys/crypto/sha1.h
+++ b/freebsd/sys/crypto/sha1.h
@@ -35,8 +35,8 @@
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/
-#ifndef _NETINET6_SHA1_HH_
-#define _NETINET6_SHA1_HH_
+#ifndef _NETINET6_SHA1_H_
+#define _NETINET6_SHA1_H_
struct sha1_ctxt {
union {
@@ -69,4 +69,4 @@ typedef struct sha1_ctxt SHA1_CTX;
#define SHA1_RESULTLEN (160/8)
-#endif /*_NETINET6_SHA1_HH_*/
+#endif /*_NETINET6_SHA1_H_*/
diff --git a/freebsd/sys/crypto/sha2/sha2.c b/freebsd/sys/crypto/sha2/sha2.c
index 3303a318..c5330f31 100644
--- a/freebsd/sys/crypto/sha2/sha2.c
+++ b/freebsd/sys/crypto/sha2/sha2.c
@@ -1,4 +1,4 @@
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
/* $KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $ */
@@ -36,18 +36,18 @@
* SUCH DAMAGE.
*/
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <freebsd/sys/types.h>
-#include <freebsd/sys/time.h>
+#include <rtems/bsd/sys/types.h>
+#include <rtems/bsd/sys/time.h>
#ifdef _KERNEL
-#include <freebsd/sys/systm.h>
+#include <sys/systm.h>
#else
-#include <freebsd/string.h>
+#include <string.h>
#endif
-#include <freebsd/machine/endian.h>
-#include <freebsd/crypto/sha2/sha2.h>
+#include <machine/rtems-bsd-endian.h>
+#include <crypto/sha2/sha2.h>
/*
* ASSERT NOTE:
diff --git a/freebsd/sys/crypto/sha2/sha2.h b/freebsd/sys/crypto/sha2/sha2.h
index a2443ca1..446d2ea6 100644
--- a/freebsd/sys/crypto/sha2/sha2.h
+++ b/freebsd/sys/crypto/sha2/sha2.h
@@ -72,7 +72,7 @@ typedef unsigned long long u_int64_t; /* 8-bytes (64-bits) */
* uintXX_t types defined by very recent ANSI C standards and included
* in the file:
*
- * #include <freebsd/inttypes.h>
+ * #include <inttypes.h>
*
* If you choose to use <inttypes.h> then please define:
*