使用HSE_REQ_GET_CERT_INFO_EX调用ServerSupportFunction后,pCertInfo为null
问题说明
  我试图从ISAPI扩展中获取主题备用名称(电子邮件地址)。但是,pCertInfo始终为null。
I am trying to get the subject alternative name (email address) from within an ISAPI Extension. However, pCertInfo is always null.
CERT_CONTEXT_EX certContextEx;
memset(&certContextEx,0,sizeof(CERT_CONTEXT_EX));
char certbuf[64*1024];
certContextEx.cbAllocated =sizeof(certbuf);
certContextEx.CertContext.pbCertEncoded =(BYTE *)&certbuf;
BOOL gotCert = pECB->ServerSupportFunction(pECB->ConnID, HSE_REQ_GET_CERT_INFO_EX,&certContextEx,0,0);
logFile << "got cert context ex successfully? " << (gotCert==1?"true":"false") << std::endl;
logFile.flush();
char certTemp[BUFFER_SIZE];
wsprintf(certTemp,"cert encoded size %d\n",certContextEx.CertContext.cbCertEncoded);
logFile << certTemp;
logFile.flush();
logFile << "pbCertEncoded " << certContextEx.CertContext.pbCertEncoded << std::endl;
logFile.flush();
logFile << "pCert Info " << certContextEx.CertContext.pCertInfo << std::endl;
logFile.flush();
输出
**********
**********
成功获得证书上下文? true
got cert context ex successfully? true
证书编码大小1290
cert encoded size 1290
pbCertEncoded 0,0, î [1] [1] [1]
2ÒÌ0
pbCertEncoded 0‚0‚ î [1][1][1] 2ÒÌ0
*†H†÷
pCert Info 00000000
pCert Info 00000000
**************** ****
********************
我认为我需要做以下的事情来获得正确的扩展。 当然'j'需要是正确的索引,但pCertInfo始终为null。
I believe I need to do something like the following to get the right extension. Of course 'j' would need to be the right index but pCertInfo is always null.
certContextEx.CertContext.pCertInfo->->rgExtension[j]
那么我该如何得到pCertInfo值?
So how do I get the pCertInfo to be value?
正确答案
也许你可以试试IIS论坛:
http://forums.iis.net/
perhaps you can try IIS forum: http://forums.iis.net/
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcbijgh
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
检查邮件是否发送成功
it1352 07-25 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20