Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to import CA for signing #112

Closed
grimvoodoo opened this issue Mar 27, 2023 · 1 comment
Closed

how to import CA for signing #112

grimvoodoo opened this issue Mar 27, 2023 · 1 comment

Comments

@grimvoodoo
Copy link

Hi,
I have been working on a script which can either import an existing CA, or create one and then use that to sign a server or client certificate.

I have got the bit working where I create a CA and use that to sign a server cert, but what I am trying to do now is to load a CA I have created previously from a pem file and use that to sign a new server cert.

Looking at the docs I thought maybe I should be able to use RemoteKeyPair::public_key to read it but I couldn't figure out how it works. But I may be looking in the wrong place.

@est31
Copy link
Member

est31 commented Mar 27, 2023

You can find some code for your use case in #111, and together with #110 there is probably enough issues to track better docs/examples for creating CAs. It's interesting that these questions are so popular lately :).

The RemoteKeyPair is probably not what you want, it is mainly meant for when you have access to a hsm or such and cannot load the key into memory directly.

@est31 est31 closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants