The unified diff between revisions [6abc32a1..] and [7ff4e3d6..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "Makefile.in"
# from [a966a512173c44ca454efb39437d750985d62a01]
# to [d2a36b44d5f8af4c19809573b14ac16913d3f91c]
#
# patch "crypt_cipher_descriptor.c"
# from [71a8898598165f89bba6aa0223301954e46df852]
# to [27e8562c0d8db90ee7f961d19970df54c4e6c44a]
#
# patch "crypt_hash_descriptor.c"
# from [4afc0dec08ae027f08ea05a25bd3feb8d0b4f7bc]
# to [b61a1e8498c1c9284824157ddb1514c9ce796dee]
#
# patch "md5.c"
# from [abecf8a85d63217c556f52977f652da55d9cf253]
# to [4c809dc68e0dce8c239d9d22f7f275376097d6e2]
#
# patch "mycrypt_custom.h"
# from [8a022a3c8b9e4edcf21d12aa8f3b2810ae9322c0]
# to [b90dc18b1e16687a2abdc152e621f0155d04d284]
#
# patch "mycrypt_hash.h"
# from [46df185acbf3b49fec53b7c772ce02102e07ec7e]
# to [d8beb58f178bedd5e801d559d39b2e3fbba9b972]
#
# patch "mycrypt_pk.h"
# from [cd373d7f826907d5b389a81acb29e79b24ee12e2]
# to [422add7f5fd05a9df54b50375d8581dd4a8f8b83]
#
# patch "sha1.c"
# from [12c92c03463df7c4d67a5ab9ccc18b873ece9876]
# to [8f3ef3e9bebf35bd8cf00c73aa432df3b5b80d2d]
#
============================================================
--- Makefile.in a966a512173c44ca454efb39437d750985d62a01
+++ Makefile.in d2a36b44d5f8af4c19809573b14ac16913d3f91c
@@ -6,6 +6,9 @@ VERSION=0.99
# The version
VERSION=0.99
+VPATH=@srcdir@
+srcdir=@srcdir@
+
# Compiler and Linker Names
#CC=gcc
#LD=ld
@@ -111,15 +114,6 @@ hmac_done.o hmac_file.o hmac_init.o h
\
hmac_done.o hmac_file.o hmac_init.o hmac_memory.o hmac_process.o hmac_test.o \
\
-pkcs_1_mgf1.o pkcs_1_oaep_encode.o pkcs_1_oaep_decode.o \
-pkcs_1_pss_encode.o pkcs_1_pss_decode.o pkcs_1_i2osp.o pkcs_1_os2ip.o \
-pkcs_1_v15_es_encode.o pkcs_1_v15_es_decode.o pkcs_1_v15_sa_encode.o pkcs_1_v15_sa_decode.o \
-\
-pkcs_5_1.o pkcs_5_2.o \
-\
-der_encode_integer.o der_decode_integer.o der_length_integer.o \
-der_put_multi_integer.o der_get_multi_integer.o \
-\
burn_stack.o zeromem.o \
\
$(MPIOBJECT)
============================================================
--- crypt_cipher_descriptor.c 71a8898598165f89bba6aa0223301954e46df852
+++ crypt_cipher_descriptor.c 27e8562c0d8db90ee7f961d19970df54c4e6c44a
@@ -10,5 +10,12 @@
*/
#include "mycrypt.h"
+struct _cipher_descriptor cipher_descriptor[TAB_SIZE] = {
+ /* This is ugly, but OS X's ar seems broken and leaves the
+ * cipher_descriptor symbol out of the .a if we don't
+ * initialise it here. */
+ {NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL},
+ {NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL},
+ {NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL},
+ {NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL},
+};
-struct _cipher_descriptor cipher_descriptor[TAB_SIZE];
-
============================================================
--- crypt_hash_descriptor.c 4afc0dec08ae027f08ea05a25bd3feb8d0b4f7bc
+++ crypt_hash_descriptor.c b61a1e8498c1c9284824157ddb1514c9ce796dee
@@ -10,5 +10,10 @@
*/
#include "mycrypt.h"
+struct _hash_descriptor hash_descriptor[TAB_SIZE] = {
+ /* OS X has a broken ar, so we need to initialise. */
+ {NULL, 0, 0, 0, NULL, NULL, NULL, NULL},
+ {NULL, 0, 0, 0, NULL, NULL, NULL, NULL},
+ {NULL, 0, 0, 0, NULL, NULL, NULL, NULL},
+ {NULL, 0, 0, 0, NULL, NULL, NULL, NULL},
+};
-struct _hash_descriptor hash_descriptor[TAB_SIZE];
-
============================================================
--- md5.c abecf8a85d63217c556f52977f652da55d9cf253
+++ md5.c 4c809dc68e0dce8c239d9d22f7f275376097d6e2
@@ -23,10 +23,13 @@ const struct _hash_descriptor md5_desc =
64,
/* DER identifier */
+#if 0
+ /* matt */
{ 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86,
0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00,
0x04, 0x10 },
18,
+#endif
&md5_init,
&md5_process,
============================================================
--- mycrypt_custom.h 8a022a3c8b9e4edcf21d12aa8f3b2810ae9322c0
+++ mycrypt_custom.h b90dc18b1e16687a2abdc152e621f0155d04d284
@@ -74,6 +74,7 @@
/* Various tidbits of modern neatoness */
#define BASE64
+#define FORTUNA_POOLS 0
#endif
============================================================
--- mycrypt_hash.h 46df185acbf3b49fec53b7c772ce02102e07ec7e
+++ mycrypt_hash.h d8beb58f178bedd5e801d559d39b2e3fbba9b972
@@ -127,8 +127,11 @@ extern struct _hash_descriptor {
unsigned char ID;
unsigned long hashsize; /* digest output size in bytes */
unsigned long blocksize; /* the block size the hash uses */
+#if 0
+ /*matt - we don't need these and they make the intialisers more ugly.*/
unsigned char DER[64]; /* DER encoded identifier */
unsigned long DERlen; /* length of DER encoding */
+#endif
int (*init)(hash_state *);
int (*process)(hash_state *, const unsigned char *, unsigned long);
int (*done)(hash_state *, unsigned char *);
============================================================
--- mycrypt_pk.h cd373d7f826907d5b389a81acb29e79b24ee12e2
+++ mycrypt_pk.h 422add7f5fd05a9df54b50375d8581dd4a8f8b83
@@ -276,10 +276,13 @@ typedef struct {
#endif
+/* ifdef added by matt - a bit of a hack */
+#ifdef MPI
/* DER handling */
int der_encode_integer(mp_int *num, unsigned char *out, unsigned long *outlen);
int der_decode_integer(const unsigned char *in, unsigned long *inlen, mp_int *num);
int der_length_integer(mp_int *num, unsigned long *len);
int der_put_multi_integer(unsigned char *dst, unsigned long *outlen, mp_int *num, ...);
int der_get_multi_integer(const unsigned char *src, unsigned long *inlen, mp_int *num, ...);
+#endif
============================================================
--- sha1.c 12c92c03463df7c4d67a5ab9ccc18b873ece9876
+++ sha1.c 8f3ef3e9bebf35bd8cf00c73aa432df3b5b80d2d
@@ -21,10 +21,13 @@ const struct _hash_descriptor sha1_desc
20,
64,
+#if 0
+ /* matt */
/* DER identifier */
{ 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E,
0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14 },
15,
+#endif
&sha1_init,
&sha1_process,