aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2002-09-03 18:44:24 +0000
committerNick Mathewson <nickm@torproject.org>2002-09-03 18:44:24 +0000
commitfdb31225b7206fdd35d62d00b5369ac81691003b (patch)
tree7e8aebcbca6d607a3e0922083c0f81dde539ebfc /src/common
parent8878d8cc27d94839053063aa8925d6f2620f4c20 (diff)
downloadtor-fdb31225b7206fdd35d62d00b5369ac81691003b.tar
tor-fdb31225b7206fdd35d62d00b5369ac81691003b.tar.gz
Port to MacOS X
svn:r88
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile.am4
-rw-r--r--src/common/crypto.c4
-rw-r--r--src/common/utils.c8
3 files changed, 10 insertions, 6 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index cc585e5a8..40b495ad6 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -3,9 +3,9 @@ noinst_LIBRARIES = libor.a
#CFLAGS = -Wall -Wpointer-arith -O2
-libor_a_SOURCES = config.c log.c utils.c crypto.c
+libor_a_SOURCES = config.c log.c utils.c crypto.c fakepoll.c
noinst_HEADERS = config.h log.h \
policies.h utils.h \
- ss.h version.h crypto.h
+ ss.h version.h crypto.h fakepoll.h
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 2a457897a..40aaa319b 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -508,7 +508,7 @@ int crypto_cipher_decrypt_init_cipher(crypto_cipher_env_t *env)
return 0;
}
-int crypto_cipher_encrypt(crypto_cipher_env_t *env, unsigned char *from, size_t fromlen, unsigned char *to)
+int crypto_cipher_encrypt(crypto_cipher_env_t *env, unsigned char *from, unsigned int fromlen, unsigned char *to)
{
int tolen;
@@ -517,7 +517,7 @@ int crypto_cipher_encrypt(crypto_cipher_env_t *env, unsigned char *from, size_t
return !(EVP_EncryptUpdate((EVP_CIPHER_CTX *)env->aux, to, &tolen, from, fromlen));
}
-int crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *from, size_t fromlen, unsigned char *to)
+int crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *from, unsigned int fromlen, unsigned char *to)
{
int tolen;
diff --git a/src/common/utils.c b/src/common/utils.c
index 1a6fa6498..70094e885 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -8,8 +8,11 @@
/*
* Changes :
* $Log$
- * Revision 1.1 2002/06/26 22:45:50 arma
- * Initial revision
+ * Revision 1.2 2002/09/03 18:44:23 nickm
+ * Port to MacOS X
+ *
+ * Revision 1.1.1.1 2002/06/26 22:45:50 arma
+ * initial commit: current code
*
* Revision 1.6 2002/03/03 00:06:45 mp292
* Modifications to support re-transmission.
@@ -38,6 +41,7 @@
#include <unistd.h>
#include <sys/socket.h>
#include <stdio.h>
+#include <string.h>
#include "utils.h"
#include "log.h"