惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - lmllouk

找nopcommerce兼职人员 ArachNode.Net 之配置 CS2001 CS2008 Adobe CS4 Dreamweaver 产品许可证已过期 CSS实现网页背景渐变 jQuery 多级下拉菜单解决方案 确保已安装类型(.aspx)的应用程序 sql server 行合并 灌水 的论坛 取消svn版本控制 - lmllouk - 博客园 抓屏 - lmllouk - 博客园 fatal error C1083: Cannot open include file: 'ceconfig.h': No such file or directory PowerDesigner constraint name 长度限制问题 不同服务器数据库之间的数据操作 使用PowerDesigner进行代码生成(转) 怎样给 ActiveX 控件签名并打包发布 温州到杭州火车 orcale 常见错误 C++ BUILDER AnsiString 用法 - lmllouk
通过CertEnroll在CA上(1创建证书请求2得到证书3安装证书)
lmllouk · 2009-11-23 · via 博客园 - lmllouk

http://www.cnblogs.com/rippleyong/archive/2008/12/15/1355417.html 适用windows server 2008以上

http://www.cnblogs.com/stephenxie/articles/1114804.html

vc++

BSTR bstrDN = NULL;
BSTR bstrReq = NULL;
BSTR bstrOID = NULL;
ICEnroll4 * pEnroll = NULL;
HRESULT hr;

// initialize COM
hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
if (FAILED(hr))
{
    printf("Failed CoInitializeEx - %x\n", hr);
    goto error;
}

hr = CoCreateInstance( __uuidof(CEnroll),
       NULL,
       CLSCTX_INPROC_SERVER,
       __uuidof(ICEnroll4),
       (void **)&pEnroll);
if (FAILED(hr))
{
    printf("Failed CoCreateInstance - pEnroll [%x]\n", hr);
    goto error;
}
// generate the DN for the cert request
bstrDN = SysAllocString( TEXT("CN=Your Name")   // common name
      TEXT(",OU=Your Unit")  // org unit
      TEXT(",O=Your Org")    // organization
      TEXT(",L=Your City")   // locality
      TEXT(",S=Your State")  // state
      TEXT(",C=Your Country") );  // country/region
if (NULL == bstrDN)
{
    printf("Memory allocation failed for bstrDN.\n");
    goto error;
}

// generate the OID, for example, "1.3.6.1.4.1.311.2.1.21".
bstrOID = SysAllocString(TEXT("<OIDHERE>"));
if (NULL == bstrOID)
{
    printf("Memory allocation failed for bstrOID.\n");
    goto error;
}

// create the PKCS10
hr = pEnroll->createPKCS10( bstrDN, bstrOID, &bstrReq );
if (FAILED(hr))
{
    printf("Failed createPKCS10 - %x\n", hr);
    goto error;
}
else
// do something with the PKCS10 (bstrReq);

error:

//clean up resources, etc.
if ( bstrDN )
SysFreeString( bstrDN );
if ( bstrOID )
SysFreeString( bstrOID );
if ( bstrReq )
SysFreeString( bstrReq );
if ( pEnroll )
pEnroll->Release();

CoUninitialize();