aboutsummaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
authorRichard Basch <probe@mit.edu>1997-02-06 03:29:00 +0000
committerRichard Basch <probe@mit.edu>1997-02-06 03:29:00 +0000
commitdac31082e3cbe6655612d55b8bce1968cbed114a (patch)
tree2ed2f333c262124dd502544634d437aacda8e2ba /src/windows
parenta0b9ce4bee60136363cfff7a93c4e42eab972c02 (diff)
downloadkrb5-dac31082e3cbe6655612d55b8bce1968cbed114a.zip
krb5-dac31082e3cbe6655612d55b8bce1968cbed114a.tar.gz
krb5-dac31082e3cbe6655612d55b8bce1968cbed114a.tar.bz2
Makefile.in: Fixed linking of telnet.exe (win16)
encrypt.c: Replace printf with MessageBox and OutputDebugString encrypt.h: Fixed prototyping of des425 functions (win16) telnet.c: Removed ^M at end of every line git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9790 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/wintel/ChangeLog5
-rw-r--r--src/windows/wintel/Makefile.in4
-rw-r--r--src/windows/wintel/encrypt.c29
-rw-r--r--src/windows/wintel/encrypt.h20
-rw-r--r--src/windows/wintel/telnet.c4
5 files changed, 39 insertions, 23 deletions
diff --git a/src/windows/wintel/ChangeLog b/src/windows/wintel/ChangeLog
index 521c68f..c6179cd 100644
--- a/src/windows/wintel/ChangeLog
+++ b/src/windows/wintel/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 5 22:22:24 1997 Richard Basch <basch@lehman.com>
+
+ * Makefile.in: Fixed win16 linking of telnet.exe
+ * encrypt.c:
+
Wed Jun 12 00:22:02 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* makefile: Renamed to Makefile.in, so that we can do WIN16/WIN32
diff --git a/src/windows/wintel/Makefile.in b/src/windows/wintel/Makefile.in
index 2912ab17..043c5a9 100644
--- a/src/windows/wintel/Makefile.in
+++ b/src/windows/wintel/Makefile.in
@@ -17,7 +17,7 @@ KRB = KRB$(KVERSION)
BUILDTOP =..\..
INCLUDES = /I$(BUILDTOP)\include /I$(BUILDTOP)\include\krb5 \
/I$(BUILDTOP)\lib\crypto\des
-##WIN16##XOBJS = k5stream.obj
+##WIN16##XOBJS = k5stream.obj enc_des.obj
##WIN32##XOBJS = resource.obj k5stream.obj enc_des.obj
!if defined(DEBUG)
@@ -33,7 +33,7 @@ RFLAGS = -D$(KRB)=1 $(KRBOPT)
##### Linker
LINK = link
LIBS = $(KLIB) $(WLIB)
-##WIN16##SYSLIBS = libw llibcew
+##WIN16##SYSLIBS = libw llibcew commdlg winsock
##WIN32##SYSLIBS = libc.lib kernel32.lib wsock32.lib user32.lib gdi32.lib \
##WIN32## comdlg32.lib
!if defined(DEBUG)
diff --git a/src/windows/wintel/encrypt.c b/src/windows/wintel/encrypt.c
index 9c72a47..17216de 100644
--- a/src/windows/wintel/encrypt.c
+++ b/src/windows/wintel/encrypt.c
@@ -93,7 +93,7 @@ int encrypt_verbose = 1;
int encrypt_verbose = 0;
#endif
-char dbgbuf [10240];
+static char dbgbuf [10240];
static int decrypt_mode = 0;
static int encrypt_mode = 0;
@@ -575,8 +575,10 @@ encrypt_start(data, cnt)
* decryption scheme. Send a REQUEST-END to
* attempt to clear the channel...
*/
- printf("Warning, Cannot decrypt input stream!!!\n");
+ /* printf("Warning, Cannot decrypt input stream!!!\n"); */
encrypt_send_request_end();
+ MessageBox(NULL, "Warning, Cannot decrypt input stream!!!", NULL,
+ MB_OK | MB_ICONEXCLAMATION);
return;
}
@@ -600,11 +602,12 @@ encrypt_start(data, cnt)
}
#endif
} else {
- printf("Warning, Cannot decrypt type %s (%d)!!!\n",
- ENCTYPE_NAME_OK(decrypt_mode)
- ? ENCTYPE_NAME(decrypt_mode)
- : "(unknown)",
- decrypt_mode);
+ char buf[1024];
+ wsprintf(buf, "Warning, Cannot decrypt type %s (%d)!!!",
+ ENCTYPE_NAME_OK(decrypt_mode)
+ ? ENCTYPE_NAME(decrypt_mode) : "(unknown)",
+ decrypt_mode);
+ MessageBox(NULL, buf, NULL, MB_OK | MB_ICONEXCLAMATION);
encrypt_send_request_end();
}
}
@@ -645,8 +648,10 @@ encrypt_end()
OutputDebugString(dbgbuf);
}
#endif
- if (encrypt_verbose)
- printf("[ Input is now clear text ]\n");
+ if (encrypt_verbose) {
+ sprintf(dbgbuf, "[ Input is now clear text ]\n");
+ OutputDebugString(dbgbuf);
+ }
}
/*
@@ -884,8 +889,10 @@ encrypt_send_end()
OutputDebugString(dbgbuf);
}
#endif
- if (encrypt_verbose)
- printf("[ Output is now clear text ]\n");
+ if (encrypt_verbose) {
+ sprintf(dbgbuf, "[ Output is now clear text ]\n");
+ OutputDebugString(dbgbuf);
+ }
}
void
diff --git a/src/windows/wintel/encrypt.h b/src/windows/wintel/encrypt.h
index 8029568..605c0de 100644
--- a/src/windows/wintel/encrypt.h
+++ b/src/windows/wintel/encrypt.h
@@ -158,15 +158,17 @@ void ofb64_session P((Session_Key *, int));
int ofb64_keyid P((int, unsigned char *, int *));
void ofb64_printsub P((unsigned char *, int, unsigned char *, int));
-__declspec(dllimport) int __stdcall
-des_new_random_key P((Block));
-__declspec(dllimport) void __stdcall
-des_set_random_generator_seed P((Block));
-__declspec(dllimport) void __stdcall
-des_key_sched P((Block, Schedule));
-__declspec(dllimport) void __stdcall
-des_ecb_encrypt P((Block, Block, Schedule, int));
-int des_string_to_key P((char *, Block));
+KRB5_DLLIMP int KRB5_CALLCONV
+ des_new_random_key P((Block));
+KRB5_DLLIMP void KRB5_CALLCONV
+ des_set_random_generator_seed P((Block));
+KRB5_DLLIMP void KRB5_CALLCONV
+ des_key_sched P((Block, Schedule));
+KRB5_DLLIMP void KRB5_CALLCONV
+ des_ecb_encrypt P((Block, Block, Schedule, int));
+
+/* int des_string_to_key P((char *, Block)); */
+
#ifdef DEBUG
extern int encrypt_debug_mode;
diff --git a/src/windows/wintel/telnet.c b/src/windows/wintel/telnet.c
index 0845b74..32f4118 100644
--- a/src/windows/wintel/telnet.c
+++ b/src/windows/wintel/telnet.c
@@ -87,8 +87,10 @@ WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
if (!InitInstance(hInstance, nCmdShow))
return(FALSE);
-
+
+#ifdef _WIN32
SetDebugErrorLevel(SLE_WARNING);
+#endif
/*
* Acquire and dispatch messages until a WM_QUIT message is received.