cloudflare / cloudflare/cfssl

[cfssl genkey] - expiry not taken into account

Open
#1,020 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.