资源简介
cryptlib.zip
cryptlib.zip 的源代码
代码片段和文件信息
/****************************************************************************
* *
* cryptlib External API Interface *
* Copyright Peter Gutmann 1997-2008 *
* *
****************************************************************************/
/* NSA motto: In God we trust... all others we monitor.
-- Stanley Miller */
#include “crypt.h“
#if defined( INC_ALL )
#include “rpc.h“
#else
#include “misc/rpc.h“
#endif /* Compiler-specific includes */
/* Handlers for the various commands */
static int cmdCertCheck( void *stateInfo COMMAND_INFO *cmd )
{
assert( cmd->type == COMMAND_CERTCHECK );
assert( cmd->flags == COMMAND_FLAG_NONE );
assert( cmd->noArgs == 2 );
assert( cmd->noStrArgs == 0 );
UNUSED_ARG( stateInfo );
/* Perform basic server-side error checking */
if( !isHandleRangeValid( cmd->arg[ 0 ] ) )
return( CRYPT_ARGERROR_object );
if( !isHandleRangeValid( cmd->arg[ 1 ] ) && \
( cmd->arg[ 1 ] != CRYPT_UNUSED ) )
return( CRYPT_ARGERROR_NUM1 );
return( krnlSendMessage( cmd->arg[ 0 ] MESSAGE_CRT_SIGCHECK NULL
cmd->arg[ 1 ] ) );
}
static int cmdCertMgmt( void *stateInfo COMMAND_INFO *cmd )
{
MESSAGE_CERTMGMT_INFO certMgmtInfo;
int status;
assert( cmd->type == COMMAND_CERTMGMT );
assert( cmd->flags == COMMAND_FLAG_NONE || \
cmd->flags == COMMAND_FLAG_RET_NONE );
assert( cmd->noArgs == 4 );
assert( cmd->noStrArgs == 0 );
UNUSED_ARG( stateInfo );
/* Perform basic server-side error checking */
if( !isHandleRangeValid( cmd->arg[ 0 ] ) )
return( CRYPT_ARGERROR_object );
if( cmd->arg[ 1 ] < CRYPT_CERTACTION_FIRST_USER || \
cmd->arg[ 1 ] > CRYPT_CERTACTION_LAST_USER )
return( CRYPT_ARGERROR_VALUE );
if( !isHandleRangeValid( cmd->arg[ 2 ] ) && \
!( ( cmd->arg[ 1 ] == CRYPT_CERTACTION_EXPIRE_CERT || \
cmd->arg[ 1 ] == CRYPT_CERTACTION_CLEANUP ) && \
cmd->arg[ 2 ] == CRYPT_UNUSED ) )
return( CRYPT_ARGERROR_NUM1 );
if( !isHandleRangeValid( cmd->arg[ 3 ] ) && \
!( ( cmd->arg[ 1 ] == CRYPT_CERTACTION_ISSUE_CRL || \
cmd->arg[ 1 ] == CRYPT_CERTACTION_EXPIRE_CERT || \
cmd->arg[ 1 ] == CRYPT_CERTACTION_CLEANUP ) && \
cmd->arg[ 3 ] == CRYPT_UNUSED ) )
return( CRYPT_ARGERROR_NUM2 );
setMessageCertMgmtInfo( &certMgmtInfo cmd->arg[ 2 ] cmd->arg[ 3 ] );
if( cmd->flags == COMMAND_FLAG_RET_NONE )
/* If we aren‘t interested in the return value set the crypt handle
to CRYPT_UNUSED to indicate that there‘s no need to return the
created cert object */
certMgmtInfo.cryptCert = CRYPT_UNUSED;
status = krnlSendMessage( cmd->arg[ 0 ] MESSAGE_KEY_CERTMGMT
&certMgmtInfo cmd->arg[ 1 ] );
if( cryptStatusOK( status ) && cmd->flags != COMMAND_FLAG_RET_NONE )
cmd->arg[ 0 ] = certMgmtInfo.cryptCert;
return( status );
}
static int cmdCertSign( void *stateInfo COMMAND_INFO *cmd )
{
assert( cmd->type == COMMAND_CERT
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 45238 2010-10-07 01:56 README
文件 3639 2010-10-07 01:13 COPYING
文件 36898 2010-12-14 21:40 crypt.h
文件 56554 2010-11-15 00:42 cryptkrn.h
文件 100043 2010-11-30 16:05 cryptlib.h
文件 138301 2010-11-05 17:32 cryptapi.c
文件 55633 2010-09-28 02:20 cryptcrt.c
文件 37629 2010-10-20 00:42 cryptctx.c
文件 32476 2010-09-17 23:07 cryptdev.c
文件 36085 2010-09-17 23:07 cryptenv.c
文件 45507 2010-11-14 16:43 cryptkey.c
文件 17118 2010-09-16 04:11 cryptlib.c
文件 23671 2010-09-17 23:08 cryptses.c
文件 22674 2010-09-17 23:08 cryptusr.c
文件 111021 2010-11-19 04:08 makefile
文件 33461 2010-09-03 02:34 cryptlib.asn
文件 1141 2006-12-14 04:53 cryptlib.exp
文件 1739 2006-12-14 04:54 cryptlib.sld
文件 92000 2006-04-26 02:55 crypt16.mak
文件 86188 2007-03-10 02:58 crypt16bc.ide
文件 2312 2010-03-30 13:41 crypt32.def
文件 34608 2010-10-13 23:48 crypt32.dsp
文件 537 2006-04-05 03:46 crypt32.dsw
文件 8166 1997-06-23 00:58 crypt32.ico
文件 1778 2010-06-09 01:20 crypt32.rc
文件 1610 2009-05-10 23:48 crypt32.sln
文件 253373 2010-10-13 23:57 crypt32.vcproj
文件 1555856 2010-10-31 17:25 crypt32ce.vcp
文件 546 2004-01-03 20:57 crypt32ce.vcw
文件 6906 2006-04-26 03:12 test16.mak
文件 5385 2010-12-05 20:36 test32.dsp
............此处省略905个文件信息
- 上一篇:通过例题学习计量经济学
- 下一篇:3dmax航母文件
评论
共有 条评论