From: Richard Basch Date: Thu, 6 Feb 1997 03:29:00 +0000 (+0000) Subject: Makefile.in: Fixed linking of telnet.exe (win16) X-Git-Tag: krb5-1.1-beta1~1381 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dac31082e3cbe6655612d55b8bce1968cbed114a;p=krb5.git 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 --- diff --git a/src/windows/wintel/ChangeLog b/src/windows/wintel/ChangeLog index 521c68f58..c6179cdcf 100644 --- a/src/windows/wintel/ChangeLog +++ b/src/windows/wintel/ChangeLog @@ -1,3 +1,8 @@ +Wed Feb 5 22:22:24 1997 Richard Basch + + * Makefile.in: Fixed win16 linking of telnet.exe + * encrypt.c: + Wed Jun 12 00:22:02 1996 Theodore Ts'o * 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 2912ab172..043c5a909 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 9c72a478f..17216dec3 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 80295681c..605c0de32 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 0845b74c6..32f411812 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.