Is IX509CertificateRequestPkcs10.SmimeCapabilities equivalent to CSmimeCapabilities.AddAvailableSmimeCapabilities?

Tuesday, July 8, 2014

I'm using Certenroll to generate a certificate request.



CX509Enrollment objEnroll = new CX509Enrollment();
objEnroll.InitializeFromTemplateName(
X509CertificateEnrollmentContext.ContextUser,
templateName);
IX509CertificateRequest iRequest = objEnroll.Request;
IX509CertificateRequestPkcs10 iRequestPkcs10 =
iInnerRequest as IX509CertificateRequestPkcs10;

iRequestPkcs10.SmimeCapabilities = true;


Is the last line above similar to this?



// SMIME Capabilities - add all supported by the default RSA cryptographic provider
CSmimeCapabilities smimes = new CSmimeCapabilities();
smimes.AddAvailableSmimeCapabilities(false);
CX509ExtensionSmimeCapabilities smimeExt = new CX509ExtensionSmimeCapabilities();
smimeExt.InitializeEncode(smimes);
iRequestPkcs10.X509Extensions.Add((CX509Extension)smimeExt);






http://ift.tt/1n4Neb9