the CA cert's SAN extensions not include DNSName.
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- cryptography, security
Research direction
Start in signer/signer.go at FillTemplate, then trace the signing path used by the intermediate_ca profile in ca-config.json. Reproduce the commands from the issue and inspect the resulting certificate's SAN extension; done means the intended DNSName behavior for CA certificates is established and covered by an appropriate test.
Written by the indexing model from the issue text.
Description
I use cfssl to sign a intermedia-ca. the intermediate-ca.json has "hosts" config:
{
"CN": "Custom Widgets Intermediate CA",
"hosts": [
"host1.custom-widgets.com",
"localhost",
"192.168.1.3"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "GB",
"L": "London",
"O": "Custom Widgets",
"OU": "Custom Widgets Intermediate CA",
"ST": "England"
}
],
"ca": {
"expiry": "42720h"
}
}
The signed intermedia-ca cert only include the ip address "192.168.1.3", But the dnsname ""host1.custom-widgets.com" and "localhost" not include。
I used the ca-config.json:
{
"signing": {
"default": {
"expiry": "8760h"
},
"profiles": {
"intermediate_ca": {
"usages": [
"signing",
"digital signature",
"key encipherment",
"cert sign",
"crl sign",
"server auth",
"client auth"
],
"expiry": "8760h",
"ca_constraint": {
"is_ca": true,
"max_path_len": 0,
"max_path_len_zero": true
}
}
}
}
}
I use these command
cfssl gencert -initca intermediate-ca.json | cfssljson -bare intermediate_ca
cfssl sign -ca ca.pem -ca-key ca-key.pem -config ca-config.json -profile intermediate_ca intermediate_ca.csr | cfssljson -bare intermediate_ca
I found the function FillTemplate in the source signer/signer.go has these code
if template.IsCA {
template.MaxPathLen = profile.CAConstraint.MaxPathLen
if template.MaxPathLen == 0 {
template.MaxPathLenZero = profile.CAConstraint.MaxPathLenZero
}
template.DNSNames = nil
template.EmailAddresses = nil
template.URIs = nil
}
the DNSNames set to nil.
so is this a mistake or am I missing something? Thank you!
- Dominant language
- Go
- Stars
- 9.5k
- Forks
- 1.2k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/cfssl
-
gencrl: serial numbers that fail to parse are added to the CRL as 0 or a partial valuePossibly taken @sebxt claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/cfssl#1460 ·
Maintainers usually reply within 2 days
-
crl_override (and extensions) in /api/v1/sign request body are silently ignored by the HTTP APIPossibly taken @Hashim1999164 claimed this 71 days ago. Open
Difficulty 2/5 Half a day Newbie friendliness 78/100
cloudflare/cfssl#1439 ·
Maintainers usually reply within 2 days
-
gencrl silently revokes the wrong serial number when a line is not plain decimalPossibly taken @RaphaelFakhri claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
cloudflare/cfssl#1458 ·
Maintainers usually reply within 2 days
-
config: LoadConfig panics when not_after is before not_beforePossibly taken @sebxt claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
cloudflare/cfssl#1456 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
cloudflare/cfssl#1446 ·
Maintainers usually reply within 2 days
All issues in cloudflare/cfssl
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
praetorianer777/Dynamo#53 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
kind/engineering pulumi/pulumi-terraform Task Workflow Failure
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
pulumi/pulumi-terraform#1261 ·
Maintainers usually reply within 1 day
-
Controllers integration tests fail when port 8080 is in usePossibly taken @noahnut claimed this today. Openarea/cluster-autoscaler kind/bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kubernetes-sigs/cluster-autoscaler#236 · 1 comment ·
Maintainers usually reply within 1 day