PKI---DN(1)

πŸ’… PKI --DN πŸ’…

okay bestie, welcome to the pki --dn page from the strongSwan manual (section 1, she's official πŸ’…). This one's short and sweet and honestly kinda iconic for one specific reason, so let's get into it ✨


🌸 NAME 🌸

pki --dn β€” extract the subject DN of an X.509 certificate πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pki --dn [--in file] [--format format] [--debug level]

pki --dn --options file

pki --dn -h | --help

✨ DESCRIPTION ✨

So this sub-command of pki(1) does one thing and does it well: it pulls out the ASN.1-encoded subject DistinguishedName (DN) from an X.509 certificate and exports it in a few different formats. Periodt πŸ’…

And like… when is that useful? Glad you asked 🫢 It's for when strongSwan's identity parser is lowkey unable to produce the correct binary encoding from a string. That's it, that's the whole vibe check. When the parser can't get the encoding right, --dn comes in and saves the day πŸ‘‘


πŸ’– OPTIONS πŸ’–

  • -h, --help β€” prints usage info plus a lil summary of all the available options. The "wait what does this do again" button πŸ™ˆ
  • -v, --debug level β€” sets the debug level. Default is 1. Turn it up if you want the tea β˜•
  • -+, --options file β€” reads the command line options from file. Yes bestie, that's a literal -+ and no I'm not joking πŸ’€
  • -i, --in file β€” the input file. If you don't give one, the input gets read from STDIN. No file? No problem, pipe it in 🧚
  • -t, --format format β€” the output format, and here's your menu, pick one:
    • config β€” strongSwan configuration compatible ✨
    • hex β€” hexadecimal encoding, no prefix πŸ”₯
    • base64 β€” Base64 encoding, no prefix πŸŽ€
    • bin β€” raw binary data πŸ’€ (careful, that's raw bytes going straight to your terminal/output)

Defaults to config πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

pki(1) β€” go read the main character's page, she's got the whole story 🌈


and that's the whole page, bestie 🌸 signin' off with the deets: this is 6.1.0 of strongSwan, dated 2015-08-06 β€” yes she's a 2015 girlie and she still ate πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from