Skip to content
New issue

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

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

Already on GitHub? # to your account

Create client from intermediate? #190

Closed
pnill opened this issue Feb 12, 2018 · 4 comments
Closed

Create client from intermediate? #190

pnill opened this issue Feb 12, 2018 · 4 comments

Comments

@pnill
Copy link

pnill commented Feb 12, 2018

I see no option to create a client based on an intermediate CA? Is this a feature that's lacking or am I missing something?

@pnill
Copy link
Author

pnill commented Feb 14, 2018

So I've noticed build-ca has "nopass" and "subca" but if you try to use either of these options they appear to do nothing currently, nopass I still get prompted for a password and was able to confirm the private key was still exported with a password.

subca and you get told the ca already exists.

@kaspergrubbe
Copy link

Please update here if you manage to find a solution to this.

@pnill
Copy link
Author

pnill commented Feb 23, 2018

The solution I found was basically generating an root creating a signing request and signing it as an intermediate, moving the pki folder to root_pki, reinitiating an root (initpki) and then copying the newly signed intermediate into the new pki folder and signing a client cert under it.

@pnill pnill closed this as completed Feb 23, 2018
@viharm
Copy link

viharm commented Aug 22, 2020

I have found another, more elegant solution (I suspect this is how it was designed).

  1. Setup two separate Easy-RSA installations.
  2. Initialise and build a CA as normal on the first one (lets call it RootCA).
  3. Initialise the second one, but build CA with the subca option (lets call it IntCA).
  4. When a a subca is built, no certificate is generated, only a request is generated. Import this request (IntCA/pki/reqs/ca.req) into RootCA.
  5. Sign the IntCA request imported into RootCA, as the root CA. This will generate the certificate (RootCA/pki/issued/IntCA.crt).
  6. Copy the IntCA.cert file to the IntCA setup at IntCA/pki/ca.crt.
  7. Now you can use IntCA for all your mainstream activities and lock away the RootCA until the IntCA needs to be managed (renewed, revoked, etc.). Just ensure that you are always within the IntCA directory when issuing ./easyrsa commands. Better still use full paths to avoid using the root CA by mistake.

Hope this helps.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants