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

Purpose of the `HOSTNAME` argument in the `cfssl selfsign` command

Open
#1,404 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start at the cfssl selfsign command entry point and trace how the HOSTNAME argument is handled during certificate generation. Compare that behavior with the generated certificate and the existing --help text; done means documenting the argument's purpose or correcting the usage text if it is unused.

Written by the indexing model from the issue text.

Description

Hi! 👋

What is the purpose of the HOSTNAME argument of the cfssl selfsign command?

~ ❯ cfssl selfsign --help
	cfssl selfsign -- generate a new self-signed key and signed certificate

Usage of gencert:
        cfssl selfsign HOSTNAME CSRJSON

WARNING: this should ONLY be used for testing. This should never be
used in production.

WARNING: self-signed certificates are insecure; they do not provide
the authentication required for secure systems. Use these at your own
risk.

Arguments:
        HOSTNAME:   Hostname for the cert
        CSRJSON:    JSON file containing the request, use '-' for reading JSON from stdin

Flags:
  -config="": path to configuration file
  -loglevel=1: Log level (0 = DEBUG, 5 = FATAL)

In the help of this command it appears as a mandatory argument before CSRJSON, but checking the created certificate I don't see that it affects it at all. I have been reviewing the source code for this particular command and I don't see anything done with the HOSTNAMEparameter. Why is it necessary to specify it in the command?

Thank you very much!

Best regards

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.