显示数字证书信息简要方式

作者在 2009-01-04 17:34:57 发布以下内容
void CFVImpCert::ShowCertMoreInfo(unsigned char *pCert, unsigned long ulCertLen)
{
  char tempStr[MAX_PATH] = {0}, runString[512] = {0};
  STARTUPINFO sSTARTUPINFO;
  PROCESS_INFORMATION sPROCESS_INFORMATION;
  GetTempPath(MAX_PATH,tempStr);
  strcat(tempStr,“~SECTEC~.cer“);
  FILE * fp=fopen(tempStr,“wb“);
  fwrite(pCert, 1, ulCertLen, fp);
  fclose(fp);
  memset(&sSTARTUPINFO,0,sizeof(sSTARTUPINFO));
  sSTARTUPINFO.cb = sizeof(sSTARTUPINFO);
  sprintf(runString,“rundll32 CryptExt.dll,CryptExtOpenCER %s“,tempStr);
  CreateProcess(NULL, runString, NULL,NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL,NULL, &sSTARTUPINFO, &sPROCESS_INFORMATION);
}
 
 
(编程)Work | 阅读 3061 次
文章评论,共0条
游客请输入验证码
浏览318289次