dane_state_init - Linux


Overview

dane_state_init initializes a local certificate issuance state file in the current directory. This file is used to track the state of the certificate issuance process for a specific domain.

Syntax

dane_state_init [-cdf] SUBDOMAIN

Options/Flags

  • -c: Create the state file if it does not exist.
  • -d: Delete the state file if it exists.
  • -f: Force the creation or deletion of the state file, even if it is not possible to do so.

Examples

Creating a state file

dane_state_init -c example.com

Deleting a state file

dane_state_init -d example.com

Forcing the creation/deletion of a state file

dane_state_init -f --create example.com
dane_state_init -f --delete example.com

Common Issues

Error: State file already exists

This error occurs if you try to create a state file for a domain that already has one. If you are sure that you want to overwrite the existing state file, use the -f option.

Error: Cannot create state file

This error occurs if the current directory is not writable or if the state file cannot be created for some other reason. Make sure that the current directory is writable and that there is enough space on the disk.

Integration

dane_state_init can be used with other tools in the dane-tools suite to issue and manage certificates. For example, you can use dane_state_init to create a state file for a new domain, then use dane_csr to generate a certificate signing request (CSR), and finally use dane_sign to sign the CSR and create a certificate.

Related Commands

  • dane-tools: A suite of tools for issuing and managing certificates.
  • RFC 7628: The RFC that defines DANE.