从XEnroll acceptPKCS7(string cert)到CertEnroll InstallResponse? [英] From XEnroll acceptPKCS7(string cert) to CertEnroll InstallResponse ?

查看:170
本文介绍了从XEnroll acceptPKCS7(string cert)到CertEnroll InstallResponse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我正在尝试将一些XEnroll调用转换为CertEnroll调用,而我在acceptPKCS7方面遇到了一些麻烦.尝试手动安装从服务器获取的证书,编码为STRING_BASE64HEADER.

这一切都可以,但是当我尝试使用InstallResponse进行注册时,得到了未经处理的COMException:

CertEnroll :: CX509Enrollment :: p_InstallResponse:找不到对象或属性. 0x80092004(-2146885628)

代码:

CERTENROLLLib.CX509EnrollmentClass enroll = new CERTENROLLLib.CX509EnrollmentClass();

解决方案

这篇文章有进展吗?

我遇到了同样的问题,如果我使用XCN_CRYPT_STRING_BASE64HEADER,则会收到无效数据".一切都会导致找不到对象或属性".

非常欢迎您的帮助.


Hi!

I'm trying to convert some XEnroll calls to CertEnroll calls and I'm having some trouble with acceptPKCS7.

I manage to create a request ok, and I have tried manually installing the certificate that I get back from the server, encoded as STRING_BASE64HEADER.

This all works but when I try to enroll using the InstallResponse I get an unhandeled COMException:

CertEnroll::CX509Enrollment:: p_InstallResponse: Cannot find object or property. 0x80092004 (-2146885628)

The code:

CERTENROLLLib.CX509EnrollmentClass enroll = new CERTENROLLLib.CX509EnrollmentClass();

enroll.InitializeFromRequest(req);
enroll.InstallResponse(CERTENROLLLib.InstallResponseRestrictionFlags.AllowNone,sCertificate, CERTENROLLLib.EncodingType.XCN_CRYPT_STRING_BASE64HEADER, null);


Where sCertifcate is the certificate string and req is the CERTENROLLLib.CX509CertificateRequestPkcs10Class that was used to create the certificate.

I also tried changing XCN_CRYPT_STRING_BASE64HEADERto XCN_CRYPT_STRING_BASE64 even though it have headers and then I get "invalid data". However this is the only encoding type that have resulted in anything else then "Cannot find object or property".

Any help what so ever would be very much appreciated.

解决方案

Any progress on this post?

 

I'm facing the same problem, if I use XCN_CRYPT_STRING_BASE64HEADER I get "invalid data" everything else leads to "Cannot find object or property".

 

Your help is more than welcome.

 


这篇关于从XEnroll acceptPKCS7(string cert)到CertEnroll InstallResponse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆