---
name: "virt-pki-query-dn"
section: "1"
platform: "linux"
package: "libvirt"
version: "1:12.8.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/virt-pki-query-dn"
---

# virt-pki-query-dn(1)

extract Distinguished Name from a PEM certificate

## Name

virt-pki-query-dn - extract Distinguished Name from a PEM certificate

## SYNOPSIS

**virt-pki-query-dn** \[*OPTION*\]... *FILE*

## DESCRIPTION

Extract Distinguished Name from a PEM certificate.

The output is meant to be used in the **tls\_allowed\_dn\_list** configuration option in the **libvirtd.conf** file.

## OPTIONS

**-h**, **--help**

Display command line help usage then exit.

**-V**, **--version**

Display version information then exit.

## EXIT STATUS

The exit status will be zero on success, non-zero on failure.

## AUTHOR

Martin Kletzander

## BUGS

Please report all bugs you discover.  This should be done via either:

- 1\.

  the mailing list

  \<https://libvirt.org/contact.html\>

- 2\.

  the bug tracker

  \<https://libvirt.org/bugs.html\>

Alternatively, you may report bugs to your software distributor / vendor.

## COPYRIGHT

Copyright (C) 2021 Red Hat, Inc.

## LICENSE

**virt-pki-query-dn** is distributed under the terms of the GNU GPL v2+. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## SEE ALSO

[virsh(1)](/virsh/1.md), [virt-pki-validate(1)](/virt-pki-validate/1.md), online PKI setup instructions \<https://libvirt.org/remote.html\>, \<https://libvirt.org/\>
