+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
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)
##### 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)
int encrypt_verbose = 0;
#endif
-char dbgbuf [10240];
+static char dbgbuf [10240];
static int decrypt_mode = 0;
static int encrypt_mode = 0;
* 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;
}
}
#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();
}
}
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);
+ }
}
/*
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
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;
if (!InitInstance(hInstance, nCmdShow))
return(FALSE);
-
+
+#ifdef _WIN32
SetDebugErrorLevel(SLE_WARNING);
+#endif
/*
* Acquire and dispatch messages until a WM_QUIT message is received.