tome
驱动中牛
驱动中牛
  • 注册日期2002-02-21
  • 最后登录2007-11-28
  • 粉丝0
  • 关注0
  • 积分99分
  • 威望11点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
阅读:3196回复:4

csp 想说爱你不容易

楼主#
更多 发布于:2005-02-22 14:31
Tnnd 偶搞不定csp了
有人作过CSP吗?怎么在WINXP下测试啊?

按照CSPDK中所说的:To install the ADVAPI32.DLL on your Windows 98, Windows NT 4.0 or Windows 2000
computer:

1. Go to the %systemroot%\\system32 folder (windows\\system for Windows 98).
2. Rename the current advapi.dll to advapi32.bak
3. Expand the appropriate ADVAPI32.DLL for your test platform to the
%systemroot%\\system32 folder (windows\\system for Windows 98).
4. Copy the cspsign.exe to the %systemroot%\\system32 folder (windows\\system for
Windows 98).
5. Reboot.


可是只有Windows 98, Windows NT 4.0 or Windows 2000的没有WINXP的,这可怎么测试:(

我用expand WIN2000目录下的ADVAPI32.DL_到winxp系统目录下,可WINXP系统无法正常启动!!

如果使用WINXP系统本身的ADVAPI32.DLL,用下面的方法:

1. Copy CSP.DLL, CSPINSTL.EXE and TESTCSP.EXE to the %systemroot%\\system32
folder (windows\\system for Windows 98).
2. Sign the sample CSP by running the following command line:

cspSign s csp.dll csp.sig (Windows 98 and Windows NT 4.0 registry based
signature)
cspSign c csp.dll (Windows 2000 for DLL resource based signature)
cspSign c csp.dll csp.sig (Both)

3. Install the sample CSP by running the command, \"regsvr32 csp.dll\".
Alternatively, the old CSPINSTL.EXE program may also be used.
4. Run the sample application by running TESTCSP.EXE

再用CSPDK中的cspinstl.c进行安装,对注册表中的值进行修改。

测试时发现:
bResult = CryptAcquireContext(&hProv, NULL, \"CSP Eleven\",
CSP11_PROV_TYPE, 0);

if (bResult == TRUE)
printf(\"SUCCEED\\n\");
else
{
printf(\"CryptAcquireConext returned error %x\\n\", GetLastError());
return(TRUE);
}

这个函数返回0x80090006L错误,明显是签名错误,天哪!! 我可是按CSPDK中的说明一步步作的!!!

请大家帮忙!!

 :( :( :(
不错 ,不错,真不错。
yxiner
驱动牛犊
驱动牛犊
  • 注册日期2004-08-13
  • 最后登录2005-04-20
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-02-22 22:13
可能是系统盗版的原因.
OTTOWANG
驱动牛犊
驱动牛犊
  • 注册日期2004-12-08
  • 最后登录2007-11-19
  • 粉丝0
  • 关注0
  • 积分11分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-02-23 18:05
若没有获得签名建议在2000或98下测试!!!
若已经获得签名在XP下可以测试,但若装了SP2的补丁,我没有试过!
宠辱不惊闲看庭间花开花落 去留无意漫随天外云卷云舒
tome
驱动中牛
驱动中牛
  • 注册日期2002-02-21
  • 最后登录2007-11-28
  • 粉丝0
  • 关注0
  • 积分99分
  • 威望11点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-02-25 09:20
谢谢  只有先试试WIN2k了 :(
不错 ,不错,真不错。
Sweery
驱动牛犊
驱动牛犊
  • 注册日期2001-10-24
  • 最后登录2006-10-15
  • 粉丝0
  • 关注0
  • 积分32分
  • 威望4点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2005-03-21 16:42
对ADVAPI32.DLL进行破解,去掉签名部分的检查,然后在安全模式下覆盖原文件,注意NT体系下的DLLCACHE中也要替换.
SweetJerry
游客

返回顶部