Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[help] A question about the value of the subject.names.* field of pem certificates

Open
#1,405 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
go
Domain
security

Research direction

Start by reproducing the commands in the issue with the supplied CSR and CA configuration, then compare the requested subject fields with the output from cfssl-certinfo. Determine whether the missing C, ST, L, O, and OU values are an implementation bug or expected behavior, and document the result or identify the relevant correction.

Written by the indexing model from the issue text.

Description

Hello, everyone

mkdir -p /download/ssl

cat > /download/ssl/ca-config.json <<EOF
{
"signing": {
"default": {
"expiry": "876000h"
},
"profiles": {
"kubernetes": {
"expiry": "876000h",
"usages": [
"signing","key encipherment",
"server auth",
"client auth"
]
}
}
}
}
EOF

cat > /download/ssl/feiji_dev-group_csr.json <<EOF
{
"CN": "feiji",
"key": {
"algo": "rsa",
"size": 2048
},
"hosts": [],
"name": [
{
"C": "CN",
"ST": "Jiangsu",
"L": "Nanjing",
"O": "dev-group",
"OU": "IT"
}
]
}
EOF

#Generating a certificate
cfssl gencert -ca=/etc/kubernetes/pki/ca.crt -ca-key=/etc/kubernetes/pki/ca.key -config=/download/ssl/ca-config.json -profile=kubernetes /download/ssl/feiji_dev-group_csr.json | cfssljson -bare feiji_dev-group

#Viewing certificate information
root@k8s-master-01:/download/ssl# cfssl-certinfo -cert /download/ssl/feiji_dev-group.pem
{
"subject": {
"common_name": "feiji",
"names": [
"feiji"
]
},
"issuer": {
"common_name": "kubernetes",
"names": [
"kubernetes"
]
},
"serial_number": "223711557935640467154917044379599514617937919738",
"not_before": "2024-12-27T08:41:00Z",
"not_after": "2124-12-03T08:41:00Z",
"sigalg": "SHA256WithRSA",
"authority_key_id": "35:DB:29:91:1C:85:21:0B:D3:D3:05:B4:DC:62:B7:ED:7C:D6:B0:93",
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drmqFTqMWTCpLi\nDFoLzWkYvunqAdX60eXYMVEM8Z+t3L1ecUJEMOemaFJB+R2LQJkgQ1RUCFhiTcph\nnx6p6Fg1GXZZtOtapBAJFM/Rh3RxPEhf7k82POJs636ppPyggBfpJefXkH8GFkyd\ndtlD/2Jf25zYEKTg\n-----END CERTIFICATE-----\n"
}

The generated feiji_dev-group.pem certificate does not see the value of the O field or any of the following fields

"C": "CN",
"ST": "Jiangsu",
"L": "Nanjing",
"O": "dev-group",
"OU": "IT"

Dominant language
Go
Stars
9.5k
Forks
1.2k
Avg merge
12h 48m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/cfssl

All issues in cloudflare/cfssl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.