Creating a full RSA chain for a legacy application #576
-
Due to legacy applications I need a full RSA chain (root->intermediate->leaf signed with RSA). Therefore I initialized a step ca with an RSA root and intermediate certificate. If I try to sign a certificate with:
I always get a leaf certificate signed with sha256ECDSA (see below). Where is my mistake? -----BEGIN CERTIFICATE----- |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @tobi-coder, can you check that your intermediate is actually an RSA key, I think it's using a ECDSA P-256 key. You can check the algorithm inspecting the intermediate one, the issuer, for example: $ step certificate inspect --short $(step path)/certs/intermediate_ca.crt
X.509v3 Intermediate CA Certificate (RSA 4096) [Serial: 2415...1643]
Subject: My Intermediate CA
Issuer: My Root CA
Valid from: 2021-05-18T00:57:48Z
to: 2031-05-16T00:57:48Z``` As you know, $ step ca init
...
$ step certificate create --profile root-ca --kty RSA --size 4096 \
'My Root CA' $(step path)/certs/root_ca.crt $(step path)/secrets/root_ca_key
$ step certificate create --profile intermediate-ca --kty RSA --size 4096 \
--ca $(step path)/certs/root_ca.crt --ca-key $(step path)/secrets/root_ca_key
'My Intermediate CA' $(step path)/certs/intermediate_ca.crt $(step path)/secrets/intermediate_ca_key And then just: $ step ca certificate --kty RSA --size 4096 foo.internal foo.crt foo.key
$ step certificate inspect --format json foo.crt | jq .signature.signature_algorithm.name
"SHA256-RSA" |
Beta Was this translation helpful? Give feedback.
Hi @tobi-coder, can you check that your intermediate is actually an RSA key, I think it's using a ECDSA P-256 key.
You can check the algorithm inspecting the intermediate one, the issuer, for example:
As you know,
step ca init
does not supports the--kty
parameters, so the full process to initialize the PKI is a little bit more complex, here it is for your reference: