PKI --DN(1) strongSwan PKI --DN(1)

# [NAME](#NAME)

pki --dn - Extract the subject DN of an X.509 certificate

# [SYNOPSIS](#SYNOPSIS)

`pki --dn` \[**--in** *file*] \[**--format** *format*] \[**--debug** *level*]

`pki --dn` **--options file**

`pki --dn` **-h** | **--help**

# [DESCRIPTION](#DESCRIPTION)

This sub-command of [**pki**(1)](/man/os/strongswan/pki.1) extracts the ASN.1-encoded subject DistinguishedName (DN) of an X.509 certificate and exports it in different formats. This may be useful when strongSwan's identity parser is unable to produce the correct binary encoding from a string.

# [OPTIONS](#OPTIONS)

[**-h, --help**](#h,)

Print usage information with a summary of the available options.

[**-v, --debug level**](#v,)

Set debug level, default: 1.

**-+, --options file**

Read command line options from *file*.

[**-i, --in file**](#i,)

Input file. If not given the input is read from *STDIN*.

[**-t, --format format**](#t,)

Output format. One of *config* (strongSwan configuration compatible), *hex* (hexadecimal encoding, no prefix), *base64* (Base64 encoding, no prefix), *bin* (raw binary data), defaults to *config*.

# [SEE ALSO](#SEE_ALSO)

[**pki**(1)](/man/os/strongswan/pki.1)

2015-08-06 6.0.6

---

Document: pki---dn(1) from strongswan 6.0.6-r0 (Chainguard OS)
Source: https://github.com/strongswan/strongswan
