8000 How to merge private key into a certificate · Issue #44 · openssl-net/openssl-net · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

How to merge private key into a certificate #44

Open
marcelopetersen opened this issue Aug 14, 2017 · 2 comments
Open

How to merge private key into a certificate #44

marcelopetersen opened this issue Aug 14, 2017 · 2 comments

Comments

@marcelopetersen
Copy link

Hello,

I've searched for how to merge a private key file into a certificate file, but I didnt't have success.
I need to create a pfx file, using in some cases "RSA Private Key" key file, and sometimes, "Private Key" key file (pkcs8), and I didn't find any usage like that on test projects.

Do you have any documentation about that? Is it possible to achieve it?

Thank you

@marcelopetersen
Copy link
Author

An additional information to clarify my questions is I want to achieve the behavior like the following command line:

openssl.exe pkcs12 -export -out D:\store\certificate_final.pfx -inkey D:\store\pk.key -in D:\store\certificate.cer

Basically, this command merges a private key file and a certificate file, generating a pfx file. Using it, I don't need to worry about private key format (RSA Private Key ou Private Key), because openssl.exe executable knows how to treat both.

I don't want to call openssl.exe directly in my code if I could achieve the same output using native code libraries.

Tks

@captain-bugs
Copy link

An additional information to clarify my questions is I want to achieve the behavior like the following command line:

openssl.exe pkcs12 -export -out D:\store\certificate_final.pfx -inkey D:\store\pk.key -in D:\store\certificate.cer

Basically, this command merges a private key file and a certificate file, generating a pfx file. Using it, I don't need to worry about private key format (RSA Private Key ou Private Key), because openssl.exe executable knows how to treat both.

I don't want to call openssl.exe directly in my code if I could achieve the same output using native code libraries.

Tks

did you find any?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0