[cfssl genkey] - expiry not taken into account
- Dominant language
- Go
- Stars
- 9.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I have this `ca-csr.json` file:
```
{
"CN": "",
"key": {
"algo": "rsa",
"size": 4096
},
"names": [
{
"C": "US",
"L": "San Francisco",
"O": ",
"ST": "California"
}
],
"ca": {
"expire": "336h"
}
}
```
I use it to generate my csr file to get my cert signed by my root_ca with the following command: `cfssl genkey -initca /etc/cfssl/ca-csr.json | cfssljson -bare ca`. But for some reason the `expire` is not being evaluated or used:
```
openssl req -text -noout -in ca.csr
Certificate Request:
Data:
Version: 0 (0x0)
Subject: C=US, ST=California, L=San Francisco, O=, OU=Infrastructure, CN=
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (4096 bit)
Modulus:
[...]
Exponent: 65537 (0x10001)
Attributes:
Requested Extensions:
X509v3 Basic Constraints: critical
CA:TRUE
Signature Algorithm: sha512WithRSAEncryption
[...]
```
And so when I get my upstream CA signing it, it uses the upstream's expire value instead of the one I used in my original `ca-csr.json`.
Any idea why? :/
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.