c# - Add Private Key to X509Certificate -
i'm working on code uses openssl.net create public/private key pair certificate signing request. request equipped public key , sent ca returns signed certificate. created private key added certificate:
mycert.privatekey = cryptokey.fromprivatekey(rsa.privatekeyaspem, null);
the problem need .net x509certificate because rest of software uses sslstream , other .net classes tls.
i able create certificate ca's response, did not find way add private key it. tried creating openssl certificate ca's response, exporting der or pem , creating .net certificate that, ignores private key.
any ideas on how solve problem?
i guess maybe missing conceptual ideas here?
a certificate not supposed contain private key. private key private, certificate binds public key distinguished name. in other words certificate document signed authority confirms particular public key, share world, belongs , no 1 else. therefore never can contain private key, because share certificate world!
Comments
Post a Comment