summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordscho <dscho>2001-09-25 11:58:24 +0000
committerdscho <dscho>2001-09-25 11:58:24 +0000
commit38cbc4b783f6935e2f2d0b2fa4395d9fe5c007a7 (patch)
tree747e31bfe49a23ae119cb7f834393d0901f03905
parent7074bbff92ba73b4bf67192acc3d7492c12f72ed (diff)
downloadlibtdevnc-38cbc4b783f6935e2f2d0b2fa4395d9fe5c007a7.tar.gz
libtdevnc-38cbc4b783f6935e2f2d0b2fa4395d9fe5c007a7.zip
moved vncauth to libvncserver
-rw-r--r--Makefile32
-rw-r--r--classes/vncviewer.jarbin31235 -> 31205 bytes
-rw-r--r--rfb.h13
-rw-r--r--storepasswd.c2
4 files changed, 27 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 11a652a..a8b404b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,8 @@ CFLAGS=-g -Wall
#CFLAGS=-O2 -Wall
RANLIB=ranlib
-INCLUDES=-I. -Ilibvncauth -Iinclude
-# -Iinclude/X11 -Iinclude/Xserver
-VNCAUTHLIB=-Llibvncauth -lvncauth
+INCLUDES=-I. -Iinclude
+VNCAUTHLIB=
VNCSERVERLIB=-L. -lvncserver -lz -ljpeg
# These two lines enable useage of PThreads
@@ -21,15 +20,15 @@ OSX_LIBS = -framework ApplicationServices -framework Carbon
SOURCES=main.c rfbserver.c miregion.c auth.c sockets.c xalloc.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
- zlib.c tight.c httpd.c cursor.o
+ zlib.c tight.c httpd.c cursor.o \
+ d3des.c vncauth.c
OBJS=main.o rfbserver.o miregion.o auth.o sockets.o xalloc.o \
stats.o corre.o hextile.o rre.o translate.o cutpaste.o \
- zlib.o tight.o httpd.o cursor.o
+ zlib.o tight.o httpd.o cursor.o \
+ d3des.o vncauth.o
all: example pnmshow storepasswd
-$(OBJS): rfb.h
-
install_OSX: OSXvnc-server
cp OSXvnc-server storepasswd ../OSXvnc/build/OSXvnc.app/Contents/MacOS
@@ -40,27 +39,24 @@ libvncserver.a: $(OBJS)
$(AR) cru $@ $(OBJS)
$(RANLIB) $@
-example: example.o libvncauth/libvncauth.a libvncserver.a
+example: example.o libvncserver.a
$(CC) -o example example.o $(LIBS)
-pnmshow: pnmshow.o libvncauth/libvncauth.a libvncserver.a
+pnmshow: pnmshow.o libvncserver.a
$(CC) -o pnmshow pnmshow.o $(LIBS)
-OSXvnc-server: mac.o libvncauth/libvncauth.a libvncserver.a
+OSXvnc-server: mac.o libvncserver.a
$(CC) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS)
-storepasswd: storepasswd.o libvncauth/libvncauth.a
- $(CC) -o storepasswd storepasswd.o $(VNCAUTHLIB)
-
-libvncauth/libvncauth.a:
- (cd libvncauth; make)
+storepasswd: storepasswd.o d3des.o vncauth.o
+ $(CC) -o storepasswd storepasswd.o d3des.o vncauth.o
clean:
- rm -f $(OBJS) *~ core "#"* *.bak *.orig storepasswd.o *.a example.o \
- libvncauth/*.o libvncauth/*~ libvncauth/*.a
+ rm -f $(OBJS) *~ core "#"* *.bak *.orig storepasswd.o *.a $(OBJS)
+
realclean: clean
- rm -f OSXvnc-server storepasswd
+ rm -f OSXvnc-server storepasswd example pnmshow
depend:
$(CC) -M $(INCLUDES) $(SOURCES) >.depend
diff --git a/classes/vncviewer.jar b/classes/vncviewer.jar
index 6ae627d..993613a 100644
--- a/classes/vncviewer.jar
+++ b/classes/vncviewer.jar
Binary files differ
diff --git a/rfb.h b/rfb.h
index 8f5a1c8..8c03a22 100644
--- a/rfb.h
+++ b/rfb.h
@@ -49,7 +49,6 @@ int max(int,int);
#include <zlib.h>
#include <rfbproto.h>
-#include <vncauth.h>
#include <netinet/in.h>
#ifdef HAVE_PTHREADS
#include <pthread.h>
@@ -224,6 +223,18 @@ typedef void (*rfbTranslateFnType)(char *table, rfbPixelFormat *in,
int width, int height);
+/*
+ * vncauth.h - describes the functions provided by the vncauth library.
+ */
+
+#define MAXPWLEN 8
+#define CHALLENGESIZE 16
+
+extern int vncEncryptAndStorePasswd(char *passwd, char *fname);
+extern char *vncDecryptPasswdFromFile(char *fname);
+extern void vncRandomBytes(unsigned char *bytes);
+extern void vncEncryptBytes(unsigned char *bytes, char *passwd);
+
/* region stuff */
typedef struct BoxRec {
diff --git a/storepasswd.c b/storepasswd.c
index 6825d0d..1470e4d 100644
--- a/storepasswd.c
+++ b/storepasswd.c
@@ -20,7 +20,7 @@
*/
#include <stdio.h>
-#include "vncauth.h"
+#include "rfb.h"
void usage(void)
{