summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/crc32/crc.c83
-rw-r--r--src/lib/krb5/krb/Imakefile27
-rw-r--r--src/lib/krb5/os/Imakefile9
3 files changed, 119 insertions, 0 deletions
diff --git a/src/lib/crypto/crc32/crc.c b/src/lib/crypto/crc32/crc.c
new file mode 100644
index 000000000..4bc611797
--- /dev/null
+++ b/src/lib/crypto/crc32/crc.c
@@ -0,0 +1,83 @@
+static u_long const crc_table[256] = {
+ 0x00000000, 0x01080082, 0x02100104, 0x03180186,
+ 0x04200208, 0x0528028a, 0x0630030c, 0x0738038e,
+ 0x08400410, 0x09480492, 0x0a500514, 0x0b580596,
+ 0x0c600618, 0x0d68069a, 0x0e70071c, 0x0f78079e,
+ 0x10800820, 0x118808a2, 0x12900924, 0x139809a6,
+ 0x14a00a28, 0x15a80aaa, 0x16b00b2c, 0x17b80bae,
+ 0x18c00c30, 0x19c80cb2, 0x1ad00d34, 0x1bd80db6,
+ 0x1ce00e38, 0x1de80eba, 0x1ef00f3c, 0x1ff80fbe,
+ 0x21001040, 0x200810c2, 0x23101144, 0x221811c6,
+ 0x25201248, 0x242812ca, 0x2730134c, 0x263813ce,
+ 0x29401450, 0x284814d2, 0x2b501554, 0x2a5815d6,
+ 0x2d601658, 0x2c6816da, 0x2f70175c, 0x2e7817de,
+ 0x31801860, 0x308818e2, 0x33901964, 0x329819e6,
+ 0x35a01a68, 0x34a81aea, 0x37b01b6c, 0x36b81bee,
+ 0x39c01c70, 0x38c81cf2, 0x3bd01d74, 0x3ad81df6,
+ 0x3de01e78, 0x3ce81efa, 0x3ff01f7c, 0x3ef81ffe,
+ 0x42002080, 0x43082002, 0x40102184, 0x41182106,
+ 0x46202288, 0x4728220a, 0x4430238c, 0x4538230e,
+ 0x4a402490, 0x4b482412, 0x48502594, 0x49582516,
+ 0x4e602698, 0x4f68261a, 0x4c70279c, 0x4d78271e,
+ 0x528028a0, 0x53882822, 0x509029a4, 0x51982926,
+ 0x56a02aa8, 0x57a82a2a, 0x54b02bac, 0x55b82b2e,
+ 0x5ac02cb0, 0x5bc82c32, 0x58d02db4, 0x59d82d36,
+ 0x5ee02eb8, 0x5fe82e3a, 0x5cf02fbc, 0x5df82f3e,
+ 0x630030c0, 0x62083042, 0x611031c4, 0x60183146,
+ 0x672032c8, 0x6628324a, 0x653033cc, 0x6438334e,
+ 0x6b4034d0, 0x6a483452, 0x695035d4, 0x68583556,
+ 0x6f6036d8, 0x6e68365a, 0x6d7037dc, 0x6c78375e,
+ 0x738038e0, 0x72883862, 0x719039e4, 0x70983966,
+ 0x77a03ae8, 0x76a83a6a, 0x75b03bec, 0x74b83b6e,
+ 0x7bc03cf0, 0x7ac83c72, 0x79d03df4, 0x78d83d76,
+ 0x7fe03ef8, 0x7ee83e7a, 0x7df03ffc, 0x7cf83f7e,
+ 0x84004100, 0x85084182, 0x86104004, 0x87184086,
+ 0x80204308, 0x8128438a, 0x8230420c, 0x8338428e,
+ 0x8c404510, 0x8d484592, 0x8e504414, 0x8f584496,
+ 0x88604718, 0x8968479a, 0x8a70461c, 0x8b78469e,
+ 0x94804920, 0x958849a2, 0x96904824, 0x979848a6,
+ 0x90a04b28, 0x91a84baa, 0x92b04a2c, 0x93b84aae,
+ 0x9cc04d30, 0x9dc84db2, 0x9ed04c34, 0x9fd84cb6,
+ 0x98e04f38, 0x99e84fba, 0x9af04e3c, 0x9bf84ebe,
+ 0xa5005140, 0xa40851c2, 0xa7105044, 0xa61850c6,
+ 0xa1205348, 0xa02853ca, 0xa330524c, 0xa23852ce,
+ 0xad405550, 0xac4855d2, 0xaf505454, 0xae5854d6,
+ 0xa9605758, 0xa86857da, 0xab70565c, 0xaa7856de,
+ 0xb5805960, 0xb48859e2, 0xb7905864, 0xb69858e6,
+ 0xb1a05b68, 0xb0a85bea, 0xb3b05a6c, 0xb2b85aee,
+ 0xbdc05d70, 0xbcc85df2, 0xbfd05c74, 0xbed85cf6,
+ 0xb9e05f78, 0xb8e85ffa, 0xbbf05e7c, 0xbaf85efe,
+ 0xc6006180, 0xc7086102, 0xc4106084, 0xc5186006,
+ 0xc2206388, 0xc328630a, 0xc030628c, 0xc138620e,
+ 0xce406590, 0xcf486512, 0xcc506494, 0xcd586416,
+ 0xca606798, 0xcb68671a, 0xc870669c, 0xc978661e,
+ 0xd68069a0, 0xd7886922, 0xd49068a4, 0xd5986826,
+ 0xd2a06ba8, 0xd3a86b2a, 0xd0b06aac, 0xd1b86a2e,
+ 0xdec06db0, 0xdfc86d32, 0xdcd06cb4, 0xddd86c36,
+ 0xdae06fb8, 0xdbe86f3a, 0xd8f06ebc, 0xd9f86e3e,
+ 0xe70071c0, 0xe6087142, 0xe51070c4, 0xe4187046,
+ 0xe32073c8, 0xe228734a, 0xe13072cc, 0xe038724e,
+ 0xef4075d0, 0xee487552, 0xed5074d4, 0xec587456,
+ 0xeb6077d8, 0xea68775a, 0xe97076dc, 0xe878765e,
+ 0xf78079e0, 0xf6887962, 0xf59078e4, 0xf4987866,
+ 0xf3a07be8, 0xf2a87b6a, 0xf1b07aec, 0xf0b87a6e,
+ 0xffc07df0, 0xfec87d72, 0xfdd07cf4, 0xfcd87c76,
+ 0xfbe07ff8, 0xfae87f7a, 0xf9f07efc, 0xf8f87e7e
+ };
+
+
+static u_long crc(d)
+ krb5_data *d;
+{
+ register u_long c = 0;
+ register int idx;
+ int i;
+
+ for (i=0; i<d->length;i++) {
+ idx = (d->data[i] ^ c);
+ idx &= 0xff;
+ c >>= 8;
+ c ^= crc_table[idx];
+ }
+ return c;
+}
diff --git a/src/lib/krb5/krb/Imakefile b/src/lib/krb5/krb/Imakefile
new file mode 100644
index 000000000..f319b7ce6
--- /dev/null
+++ b/src/lib/krb5/krb/Imakefile
@@ -0,0 +1,27 @@
+NormalLibraryObjectRule()
+
+OBJS= decode_kdc.o \
+ decode_tkt.o \
+ decrypt_tk.o \
+ def_realm.o \
+ encode_kdc.o \
+ encode_tkt.o \
+ encrypt_tk.o \
+ mk_error.o \
+ parse.o \
+ rd_error.o \
+ unparse.o
+
+SRCS= decode_kdc.c \
+ decode_tkt.c \
+ decrypt_tk.c \
+ def_realm.c \
+ encode_kdc.c \
+ encode_tkt.c \
+ encrypt_tk.c \
+ mk_error.c \
+ parse.c \
+ rd_error.c \
+ unparse.c
+
+NormalLibraryTarget(krb,$(OBJS))
diff --git a/src/lib/krb5/os/Imakefile b/src/lib/krb5/os/Imakefile
new file mode 100644
index 000000000..e8c460eba
--- /dev/null
+++ b/src/lib/krb5/os/Imakefile
@@ -0,0 +1,9 @@
+NormalLibraryObjectRule()
+
+OBJS=defname.o getaddr.o lock_file.o mstime.o \
+ read_pwd.o timeofday.o unlock_file.o config_fn.o
+
+SRCS=defname.c getaddr.c lock_file.c mstime.c \
+ read_pwd.c timeofday.c unlock_file.c config_fn.c
+
+NormalLibraryTarget(os,${OBJS})