Kerberos v5 源代码


Kerberos v5 在windows 上的源代码,该代码适当的编译后,可以直接在windows下运行
资源截图
代码片段和文件信息

/*
this is part of Project Mandarin Inc.‘s 
“Kerberos Lite“ software.  it parallels our
“Kerberos Client for Windows“ software but
it uses a different kind of security.

Copyright ?1996 by Project Mandarin Inc.

Project type: Windows dynamic-link library
Memory model: small
Segment setup: SS!=DS  DS NOT loaded on function entry
link with kclient.lib winsock.lib 

Notes:
Incoming msg buffer is static (for now).

To Do:
Do I want to pass on Service I received from GetTicketForService()?

(Tabs set to 4 in this source file)
*/

#include 
#include 

#include 
#include 
#include 

#include “klite.h“
#include “ahssp.h“
#include “klite_rc.h“

#define MAXBUFF 256 

/* ********************** Global Variables** **************** */
HANDLE hInst ;
TC tc ; // Transaction Context
LPTC lpTc ; // lp to TC

WSADATA wskData ; // Windows socket fun
LPHOSTENT lph ; // lp to hostent
LPSERVENT lps ; // lp to servent
SOCKADDR l_assoc ; // stores connection info
LPSOCKADDR_IN lpl_assoc ; // alleviates some casting

int iLastRC ; // last return code received from ahSSP server
LPSTR lpszRecvList[10] ; // array of LPSTRs for recv()ing parameters
LPSTR FAR * lpFakeParams ; // fake parameter pointer
WORD iNoop ; // number of incoming parameters
LPWORD lpiNoop ;

FAKETICKET ft ; // fake ticket
LPFAKETICKET lpFt ;

char szRecv[2048] ; // receive buffer for incoming
char szSend[1024] ; // send() buffer for outgoing
char message[MAXMSG] ; // ahssp compose buffer
char incoming[MAXMSG] ; // ahssp decompose buffer
char szTrace[MAXBUFF] ; // Trace messages stored here before displaying
char szTemp[MAXBUFF] ; // LPSTR to PSTR conversion purposes
char szErrorText[MAXBUFF] ; // error text

char  szCmd[MAXBUFF] ; // ahSSP command
char  szHost[MAXBUFF] ; // KLite “server“
WORD   iVer ; // ahSSP version
int iPort ; // test port

LPSTR lpszCmd  ; // ahSSP command
LPSTR lpszHost ; // test host
LPSTR lpszTrace ; // alleviates some casting
LPSTR lpSend ;
LPSTR lpRecv ;
LPSTR lpszTemp ;
LPSTR lpMessage ;
LPSTR lpIncoming ;
LPSTR lpszErrorText ;
LPSTR lpszDLL = “klite.dll ->“ ; // for easy trace reading

BOOL bTraceL1 ; // Socket trace option
BOOL bTraceL2 ; // ahssp trace option
BOOL bTraceIncoming  ; // Incoming temp file trace options
BOOL bTraceToWindow ; // Trace to window option
HWND hWndTrace = 0x00 ; // hWnd to send traces to

UINT iCnt ;    // number of bytes received from incoming/outgoing
int iWrite ; // number of bytes written to temp file

fd_set set ; // used with select()
TIMEVAL tv ; // used with select()
BOOL bReturn ; // all purpose return value

UINT iEoc = 0xefff ; // EOchunk  - already in network byte order
UINT iEom = 0xedff ; // EOmessge - already in network byte order
UINT iBb  = 0xbbff ;       // begin binary - already in network b

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2007-10-22 09:18  kfw-3-2-2-final
     目录           0  2007-10-22 09:22  kfw-3-2-2-finalsrc
     目录           0  2007-10-22 09:22  kfw-3-2-2-finalsrcathena
     文件         577  2006-10-17 13:03  kfw-3-2-2-finalsrcathenaMakefile.dir
     目录           0  2007-10-22 09:22  kfw-3-2-2-finalsrcathenaauth
     文件         104  2007-09-29 17:44  kfw-3-2-2-finalsrcathenaauthMakefile.dir
     目录           0  2007-10-22 09:18  kfw-3-2-2-finalsrcathenaauthkrb4
     文件       26510  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4kerb-rel.html
     文件          26  1999-07-23 16:32  kfw-3-2-2-finalsrcathenaauthkrb4Makefile.dir
     目录           0  2007-10-22 09:18  kfw-3-2-2-finalsrcathenaauthkrb4include
     文件        1496  2007-08-06 13:58  kfw-3-2-2-finalsrcathenaauthkrb4includecom_err.h
     文件        2153  1999-09-01 03:21  kfw-3-2-2-finalsrcathenaauthkrb4includeconf-pc.h
     文件        1470  1999-08-09 22:27  kfw-3-2-2-finalsrcathenaauthkrb4includeconf.h
     文件        3256  1999-09-01 03:21  kfw-3-2-2-finalsrcathenaauthkrb4includedes.h
     文件        2793  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4includekadm_err.h
     文件       17728  2004-03-15 17:05  kfw-3-2-2-finalsrcathenaauthkrb4includekrb.h
     文件         602  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4includekrberr.h
     文件        1057  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4includekrblayer.h
     文件        1036  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4includemit_copy.h
     文件        1307  1999-08-09 22:27  kfw-3-2-2-finalsrcathenaauthkrb4includeosconf.h
     文件        3202  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4includeprot.h
     文件         683  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4includewinkrbid.h
     目录           0  2007-10-22 09:18  kfw-3-2-2-finalsrcathenaauthkrb4kclient
     文件          10  1999-07-23 16:32  kfw-3-2-2-finalsrcathenaauthkrb4kclientMakefile.dir
     目录           0  2007-10-22 09:18  kfw-3-2-2-finalsrcathenaauthkrb4kclientdoc
     文件       27696  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4kclientdockclient.rtf
     文件        7680  1999-10-04 19:26  kfw-3-2-2-finalsrcathenaauthkrb4kclientdockclient.wri
     目录           0  2007-10-22 09:18  kfw-3-2-2-finalsrcathenaauthkrb4kclientinclude
     文件        1440  1999-08-03 21:37  kfw-3-2-2-finalsrcathenaauthkrb4kclientincludekclient.h
     文件        3206  1999-03-12 18:04  kfw-3-2-2-finalsrcathenaauthkrb4kclientincludekcmacerr.h
     目录           0  2007-10-22 09:18  kfw-3-2-2-finalsrcathenaauthkrb4kclientsrc
............此处省略3549个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)