certenroll

C# Generate a non self signed client CX509Certificate Request without a CA using the certenroll.dll

蓝咒 提交于 2019-12-19 04:07:55
问题 I have a self signed root certificate that I generated in C# using CERTENROLL.dll's CX509CertificateRequest Certificate functionality. I would like to write a function that generates client certificates signed by my root using the same API. However the only CertEnroll option I can find that does not generate a self signed certificate requires a authenticated CA. There seems to be a flag for setting a SignerCertificate but it always fails to initialize. //Initialize cert var cert = new

adding extensions to a certificate request ( password-challenge ) with C# and CertENrollLib

别说谁变了你拦得住时间么 提交于 2019-12-11 07:58:22
问题 I have to add extensions to a certificate request ( CSR ) in such a way that I respect a given structure. Namely this one On the left is the structure I must respect for the chalenge password, on the right the structure I get when I simply generate a OID object from the challenge-password OID value, then embedding all this directly into the extension list of the PKCS10 request: CObjectId cp_oid = new CObjectId(); // OID 1.2.840.113549.1.9.7 // cp_oid.InitializeFromName(CERTENROLL_OBJECTID.XCN

Issues compiling in Windows 10

三世轮回 提交于 2019-12-03 19:21:19
问题 I have identified an issue related to building apps that use C:\Windows\System32\CertEnroll.dll as a reference. The following code works fine when compiled using VS 2015 on Windows 7 and then ran on a Windows 7 machine. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CERTENROLLLib; namespace CertTest { class Program { static void Main(string[] args) { try { CX509PrivateKey key = new CX509PrivateKey(); key.ContainerName

C# Generate a non self signed client CX509Certificate Request without a CA using the certenroll.dll

旧巷老猫 提交于 2019-12-01 00:45:09
I have a self signed root certificate that I generated in C# using CERTENROLL.dll's CX509CertificateRequest Certificate functionality. I would like to write a function that generates client certificates signed by my root using the same API. However the only CertEnroll option I can find that does not generate a self signed certificate requires a authenticated CA. There seems to be a flag for setting a SignerCertificate but it always fails to initialize. //Initialize cert var cert = new CX509CertificateRequestCertificate(); //take care of signer cert.Issuer = issuen; CSignerCertificate sc = new