{
    "mode": "man",
    "parameter": "dirmngr",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/dirmngr/8/json",
    "generated": "2026-10-04T12:10:00Z",
    "synopsis": "dirmngr [options] command [args]",
    "sections": {
        "NAME": {
            "content": "dirmngr - GnuPG's network access daemon\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dirmngr [options] command [args]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Since  version 2.1 of GnuPG, dirmngr takes care of accessing the OpenPGP keyservers.  As with\nprevious versions it is also used as a server for managing and downloading certificate  revo‐\ncation lists (CRLs) for X.509 certificates, downloading X.509 certificates, and providing ac‐\ncess to OCSP providers.  Dirmngr is invoked internally by gpg, gpgsm, or via the gpg-connect-\nagent tool.\n\n\n\n\n\n",
            "subsections": []
        },
        "COMMANDS": {
            "content": "Commands  are not distinguished from options except for the fact that only one command is al‐\nlowed.\n\n",
            "subsections": [
                {
                    "name": "--version",
                    "content": "Print the program version and licensing information.  Note that you cannot  abbreviate\nthis command.\n\n",
                    "long": "--version"
                },
                {
                    "name": "--help, -h",
                    "content": "Print a usage message summarizing the most useful command-line options.  Note that you\ncannot abbreviate this command.\n\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "--dump-options",
                    "content": "Print  a  list of all available options and commands.  Note that you cannot abbreviate\nthis command.\n\n",
                    "long": "--dump-options"
                },
                {
                    "name": "--server",
                    "content": "Run in server mode and wait for commands on the stdin.  The default mode is to  create\na socket and listen for commands there.  This is only used for testing.\n\n",
                    "long": "--server"
                },
                {
                    "name": "--daemon",
                    "content": "Run  in  background  daemon mode and listen for commands on a socket.  This is the way\ndirmngr is started on demand by the other GnuPG components.  To force starting dirmngr\nit is in general best to use gpgconf --launch dirmngr.\n\n",
                    "long": "--daemon"
                },
                {
                    "name": "--supervised",
                    "content": "Run in the foreground, sending logs to stderr, and listening  on  file  descriptor  3,\nwhich  must already be bound to a listening socket.  This option is deprecated and not\nsupported on Windows.\n\n",
                    "long": "--supervised"
                },
                {
                    "name": "--list-crls",
                    "content": "List the contents of the CRL cache on stdout. This is probably only useful for  debug‐\nging purposes.\n\n\n--load-crl file\nThis  command requires a filename as additional argument, and it will make Dirmngr try\nto import the CRL in file into it's cache.  Note, that this is only possible if  Dirm‐\nngr is able to retrieve the CA's certificate directly by its own means.  In general it\nis  better  to  use  gpgsm's --call-dirmngr loadcrl filename command so that gpgsm can\nhelp dirmngr.\n\n\n--fetch-crl url\nThis command requires an URL as additional argument, and it will make dirmngr  try  to\nretrieve  and import the CRL from that url into it's cache.  This is mainly useful for\ndebugging purposes.  The dirmngr-client provides the same feature for a running  dirm‐\nngr.\n\n",
                    "long": "--list-crls"
                },
                {
                    "name": "--shutdown",
                    "content": "This  commands  shuts down an running instance of Dirmngr.  This command has currently\nno effect.\n\n",
                    "long": "--shutdown"
                },
                {
                    "name": "--flush",
                    "content": "This command removes all CRLs from Dirmngr's cache.  Client requests will thus trigger\nreading of fresh CRLs.\n\n",
                    "long": "--flush"
                }
            ]
        },
        "OPTIONS": {
            "content": "Note that all long options with the exception of --options and --homedir may also be given in\nthe configuration file after stripping off the two leading dashes.\n\n\n\n--options file\nReads configuration from file instead of from the default per-user configuration file.\nThe default configuration file is named ‘dirmngr.conf’ and expected in the home direc‐\ntory.\n\n\n--homedir dir\nSet the name of the home directory to dir.  This option is only effective when used on\nthe command line.  The default is the directory named ‘.gnupg’ directly below the home\ndirectory of the user unless the environment variable GNUPGHOME has been set in  which\ncase its value will be used.  Many kinds of data are stored within this directory.\n\n\n",
            "subsections": [
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "--verbose",
                    "content": "Outputs  additional information while running.  You can increase the verbosity by giv‐\ning several verbose commands to dirmngr, such as -vv.\n\n\n\n--log-file file\nAppend all logging output to file.  This is very helpful in seeing what the agent  ac‐\ntually does.  Use ‘socket://’ to log to socket.\n\n\n--compatibility-flags flags\nSet compatibility flags to work around certain problems or to emulate bugs.  The flags\nare given as a comma separated list of flag names and are OR-ed together.  The special\nflag \"none\" clears the list and allows one to start over with an empty list.  To get a\nlist of available flags the sole word \"help\" can be used.\n\n\n--faked-system-time epoch\nThis option is only useful for testing; it sets the system time back or forth to epoch\nwhich  is  the number of seconds elapsed since the year 1970.  Alternatively epoch may\nbe given as a full ISO time string (e.g. \"20070924T154812\").\n\n\n--debug-level level\nSelect the debug level for investigating problems.  level may be a numeric value or by\na keyword:\n\n\nnone   No debugging at all.  A value of less than 1 may be used instead  of  the  key‐\nword.\n\nbasic  Some  basic debug messages.  A value between 1 and 2 may be used instead of the\nkeyword.\n\nadvanced\nMore verbose debug messages.  A value between 3 and 5 may be  used  instead  of\nthe keyword.\n\nexpert Even  more  detailed  messages.  A value between 6 and 8 may be used instead of\nthe keyword.\n\nguru   All of the debug messages you can get. A value greater than 8 may be  used  in‐\nstead  of  the  keyword.  The creation of hash tracing files is only enabled if\nthe keyword is used.\n\nHow these messages are mapped to the actual debugging flags is not specified and  may  change\nwith  newer  releases of this program. They are however carefully selected to best aid in de‐\nbugging.\n\n\n--debug flags\nSet debug flags.  All flags are or-ed and flags may be given in C syntax (e.g. 0x0042)\nor as a comma separated list of flag names.  To get a list of all supported flags  the\nsingle  word \"help\" can be used.  This option is only useful for debugging and the be‐\nhavior may change at any time without notice.\n\n",
                    "long": "--verbose"
                },
                {
                    "name": "--debug-all",
                    "content": "Same as --debug=0xffffffff\n\n\n--tls-debug level\nEnable debugging of the TLS layer at level.  The details of the debug level depend  on\nthe used TLS library and are not set in stone.\n\n\n--debug-wait n\nWhen running in server mode, wait n seconds before entering the actual processing loop\nand print the pid.  This gives time to attach a debugger.\n\n",
                    "long": "--debug-all"
                },
                {
                    "name": "--disable-check-own-socket",
                    "content": "On  some  platforms dirmngr is able to detect the removal of its socket file and shut‐\ndown itself.  This option disable this self-test for debugging purposes.\n\n",
                    "long": "--disable-check-own-socket"
                },
                {
                    "name": "-s",
                    "content": "",
                    "flag": "-s"
                },
                {
                    "name": "--sh",
                    "content": "",
                    "long": "--sh"
                },
                {
                    "name": "-c",
                    "content": "--csh  Format the info output in daemon mode for use with the standard Bourne  shell  respec‐\ntive  the  C-shell. The default is to guess it based on the environment variable SHELL\nwhich is in almost all cases sufficient.\n\n",
                    "flag": "-c"
                },
                {
                    "name": "--force",
                    "content": "Enabling this option forces loading of expired CRLs; this is only  useful  for  debug‐\nging.\n\n",
                    "long": "--force"
                },
                {
                    "name": "--use-tor",
                    "content": "",
                    "long": "--use-tor"
                },
                {
                    "name": "--no-use-tor",
                    "content": "The  option  --use-tor  switches Dirmngr and thus GnuPG into ``Tor mode'' to route all\nnetwork access via Tor (an anonymity network).  Certain other features are disabled in\nthis mode.  The effect of --use-tor cannot be overridden by any other command or  even\nby  reloading  dirmngr.  The use of --no-use-tor disables the use of Tor.  The default\nis to use Tor if it is available on startup or after reloading dirmngr.  The  test  on\nthe  availability  of Tor is done by trying to connect to a SOCKS proxy at either port\n9050 or 9150; if another type of proxy is listening on one of these ports, you  should\nuse --no-use-tor.\n\n",
                    "long": "--no-use-tor"
                },
                {
                    "name": "--standard-resolver",
                    "content": "This option forces the use of the system's standard DNS resolver code.  This is mainly\nused  for debugging.  Note that on Windows a standard resolver is not used and all DNS\naccess will return the error ``Not Implemented'' if this option is used.   Using  this\ntogether with enabled Tor mode returns the error ``Not Enabled''.\n\n",
                    "long": "--standard-resolver"
                },
                {
                    "name": "--recursive-resolver",
                    "content": "When possible use a recursive resolver instead of a stub resolver.\n\n\n--resolver-timeout n\nSet the timeout for the DNS resolver to N seconds.  The default are 30 seconds.\n\n\n--connect-timeout n\n\n--connect-quick-timeout n\nSet  the timeout for HTTP and generic TCP connection attempts to N seconds.  The value\nset with the quick variant is used when the --quick option has been given  to  certain\nAssuan  commands.  The quick value is capped at the value of the regular connect time‐\nout.  The default values are 15 and 2 seconds.  Note that the timeout values  are  for\neach  connection  attempt;  the  connection code will attempt to connect all addresses\nlisted for a server.\n\n\n--listen-backlog n\nSet the size of the queue for pending connections.  The default is 64.\n\n",
                    "long": "--recursive-resolver"
                },
                {
                    "name": "--allow-version-check",
                    "content": "Allow Dirmngr to connect to https://versions.gnupg.org to  get  the  list  of  current\nsoftware  versions.  On debian-packaged versions, this option does nothing since soft‐\nware updates should be handled by the distribution.  See the  option  --query-swdb  of\nthe  command gpgconf for more details.  Note, that regardless of this option a version\ncheck can always be triggered using this command:\n\ngpg-connect-agent --dirmngr 'loadswdb --force' /bye\n\n\n\n--keyserver name\nUse name as your keyserver.  This is the server that gpg communicates with to  receive\nkeys,   send  keys,  and  search  for  keys.   The  format  of  the  name  is  a  URI:\n`scheme:[//]keyservername[:port]' The scheme is the type of keyserver: \"hkp\"  for  the\nHTTP (or compatible) keyservers or \"ldap\" for the LDAP keyservers. Note that your par‐\nticular  installation  of GnuPG may have other keyserver types available as well. Key‐\nserver schemes are case-insensitive. After the keyserver name, optional keyserver con‐\nfiguration options may be provided.  These are the same as the --keyserver-options  of\ngpg, but apply only to this particular keyserver.\n\nSome  keyservers  synchronize  with  each other, so there is not always a need to send\nkeys to more than one server. Some keyservers use round robin DNS to give a  different\nkeyserver each time you use it.\n\nIf  exactly  two  keyservers  are  configured  and  only  one  is a Tor hidden service\n(.onion), Dirmngr selects the keyserver to use depending on  whether  Tor  is  locally\nrunning or not.  The check for a running Tor is done for each new connection.\n\nIf  no  keyserver  is  explicitly configured, dirmngr will use the built-in default of\nhkps://keys.openpgp.org.  To avoid the use of a default keyserver the value  none  can\nbe used.\n\nNote  that  the  above  default  is  a Debian-specific choice.  Upstream GnuPG prefers\nhkps://keys.openpgp.org.  See /usr/share/doc/gpgconf/NEWS.Debian.gz for more details.\n\nWindows users with a keyserver running on their Active Directory  may  use  the  short\nform ldap:/// for name to access this directory.\n\nFor  accessing  anonymous LDAP keyservers name is in general just a ldaps://ldap.exam‐\nple.com.  A BaseDN parameter should never be specified.  If authentication is required\nthings are more complicated and two methods are available:\n\nThe modern method (since version 2.2.28) is to use the very same syntax as  used  with\nthe option --ldapserver.  Please see over there for details; here is an example:\n\nkeyserver ldap:ldap.example.com::uid=USERNAME,ou=GnuPG Users,\ndc=example,dc=com:PASSWORD::starttls\n\nThe other method is to use a full URL for name; for example:\n\nkeyserver ldaps://ldap.example.com/????bindname=uid=USERNAME\n%2Cou=GnuPG%20Users%2Cdc=example%2Cdc=com,password=PASSWORD\n\nPut this all on one line without any spaces and keep the '%2C'\nas given.  Replace USERNAME, PASSWORD, and the 'dc' parts\naccording to the instructions received from your LDAP\nadministrator.  Note that only simple authentication\n(i.e. cleartext passwords) is supported and thus using ldaps is\nstrongly suggested (since 2.2.28 \"ldaps\" defaults to port 389\nand uses STARTTLS).  On Windows authentication via AD can be\nrequested by adding gpgNtds=1 after the fourth question\nmark instead of the bindname and password parameter.\n\n\n\n\n--nameserver ipaddr\nIn  ``Tor  mode'' Dirmngr uses a public resolver via Tor to resolve DNS names.  If the\ndefault public resolver, which is 8.8.8.8, shall not be used a different  one  can  be\ngiven  using  this  option.   Note  that a numerical IP address must be given (IPv6 or\nIPv4) and that no error checking is done for ipaddr.\n\n",
                    "long": "--allow-version-check"
                },
                {
                    "name": "--disable-ipv4",
                    "content": "",
                    "long": "--disable-ipv4"
                },
                {
                    "name": "--disable-ipv6",
                    "content": "Disable the use of all IPv4 or IPv6 addresses.\n\n",
                    "long": "--disable-ipv6"
                },
                {
                    "name": "--disable-ldap",
                    "content": "Entirely disables the use of LDAP.\n\n",
                    "long": "--disable-ldap"
                },
                {
                    "name": "--disable-http",
                    "content": "Entirely disables the use of HTTP.\n\n",
                    "long": "--disable-http"
                },
                {
                    "name": "--ignore-http-dp",
                    "content": "When looking for the location of a CRL, the to be tested certificate usually  contains\nso called CRL Distribution Point (DP) entries which are URLs describing the way to ac‐\ncess  the  CRL.  The first found DP entry is used.  With this option all entries using\nthe HTTP scheme are ignored when looking for a suitable DP.\n\n",
                    "long": "--ignore-http-dp"
                },
                {
                    "name": "--ignore-ldap-dp",
                    "content": "This is similar to --ignore-http-dp but ignores entries using the LDAP  scheme.   Both\noptions may be combined resulting in ignoring DPs entirely.\n\n",
                    "long": "--ignore-ldap-dp"
                },
                {
                    "name": "--ignore-ocsp-service-url",
                    "content": "Ignore  all OCSP URLs contained in the certificate.  The effect is to force the use of\nthe default responder.\n\n",
                    "long": "--ignore-ocsp-service-url"
                },
                {
                    "name": "--honor-http-proxy",
                    "content": "If the environment variable ‘httpproxy’ has been set, use its value  to  access  HTTP\nservers.   If  on  Windows the option is used but the environment variable is not set,\nthe proxy settings are taken from the system.\n\n\n--http-proxy host[:port]\nUse host and port to access HTTP servers.  The use of this option overrides the  envi‐\nronment variable ‘httpproxy’ regardless whether --honor-http-proxy has been set.\n\n\n\n--ldap-proxy host[:port]\nUse  host and port to connect to LDAP servers.  If port is omitted, port 389 (standard\nLDAP port) is used.  This overrides any specified host and port part in a LDAP URL and\nwill also be used if host and port have been omitted from the URL.\n\n",
                    "long": "--honor-http-proxy"
                },
                {
                    "name": "--only-ldap-proxy",
                    "content": "Never use anything else but the LDAP \"proxy\" as configured with --ldap-proxy.  Usually\ndirmngr tries to use other configured LDAP server if the connection using the  \"proxy\"\nfailed.\n\n\n\n--ldapserverlist-file file\nRead the list of LDAP servers to consult for CRLs and X.509 certificates from file in‐\nstead  of  the  default  per-user ldap server list file. The default value for file is\n‘dirmngrldapservers.conf’.\n\nThis server list file contains one LDAP server per line in the format\n\nhostname:port:username:password:basedn:flags\n\nLines starting with a  ‘#’ are comments.\n\nNote that as usual all strings entered are expected to be  UTF-8  encoded.   Obviously\nthis  will  lead  to  problems if the password has originally been encoded as Latin-1.\nThere is no other solution here than to put such a password  in  the  binary  encoding\ninto  the  file (i.e. non-ascii characters won't show up readable). ([The gpgconf tool\nmight be helpful for frontends as it enables editing  this  configuration  file  using\npercent-escaped strings.])\n\n\n\n--ldapserver spec\nThis  is  an alternative way to specify LDAP servers for CRL and X.509 certificate re‐\ntrieval.  If this option is used the servers configured in  ‘dirmngrldapservers.conf’\n(or   the  file  given  by  --ldapserverlist-file)  are  cleared.   Note  that  ‘dirm‐\nngrldapservers.conf’ is not read again by a reload signal. However, --ldapserver  op‐\ntions are read again.\n\nspec is either a proper LDAP URL or a colon delimited list of the form\n\nhostname:port:username:password:basedn:flags:\n\nwith  an  optional  prefix of ldap: (but without the two slashes which would turn this\ninto a proper LDAP URL).  flags is a list of one or more comma delimited keywords:\n\nplain  The default: Do not use a TLS secured connection at all; the  default  port  is\n389.\n\nstarttls\nUse STARTTLS to secure the connection; the default port is 389.\n\nldaptls\nTunnel LDAP through a TLS connection; the default port is 636.\n\nntds   On Windows authenticate the LDAP connection using the Active Directory with the\ncurrent user.\n\nareconly\nOn Windows use only the A or AAAA record when resolving the LDAP server name.\n\nNote  that  in an URL style specification the scheme ldaps:// refers to STARTTLS and not to\nLDAP-over-TLS.\n\n\n\n--ldaptimeout secs\nSpecify the number of seconds to wait for an LDAP query before timing  out.   The  de‐\nfault are 15 seconds.  0 will never timeout.\n\n\n",
                    "long": "--only-ldap-proxy"
                },
                {
                    "name": "--add-servers",
                    "content": "This  option  makes  dirmngr add any servers it discovers when validating certificates\nagainst CRLs to the internal list of servers to consult  for  certificates  and  CRLs.\nThis option should in general not be used.\n\nThis  option might be useful when trying to validate a certificate that has a CRL dis‐\ntribution  point  that  points  to  a  server  that  is  not  already  listed  in  the\nldapserverlist.   Dirmngr  will  always go to this server and try to download the CRL,\nbut chances are high that the certificate used to sign the CRL is located on the  same\nserver.  So  if dirmngr doesn't add that new server to list, it will often not be able\nto verify the signature of the CRL unless the --add-servers option is used.\n\nCaveat emptor: Using this option may enable denial-of-service attacks and leak  search\nrequests to unknown third parties.  This is because arbitrary servers are added to the\ninternal list of LDAP servers which in turn is used for all unspecific LDAP queries as\nwell as a fallback for queries which did not return a result.\n\n\n",
                    "long": "--add-servers"
                },
                {
                    "name": "--allow-ocsp",
                    "content": "This option enables OCSP support if requested by the client.\n\nOCSP  requests  are  rejected  by  default because they may violate the privacy of the\nuser; for example it is possible to track the time when a user is reading a mail.\n\n\n\n--ocsp-responder url\nUse url as the default OCSP Responder if the certificate does not contain  information\nabout  an  assigned  responder.   Note, that --ocsp-signer must also be set to a valid\ncertificate.\n\n\n--ocsp-signer fpr|file\nUse the certificate with the fingerprint fpr to check the  responses  of  the  default\nOCSP  Responder.   Alternatively a filename can be given in which case the response is\nexpected to be signed by one of the certificates described in that file.  Any argument\nwhich contains a slash, dot or tilde is considered a filename.  Usual filename  expan‐\nsion  takes place: A tilde at the start followed by a slash is replaced by the content\nof ‘HOME’, no slash at start describes a relative filename which will be  searched  at\nthe home directory.  To make sure that the file is searched in the home directory, ei‐\nther prepend the name with \"./\" or use a name which contains a dot.\n\nIf a response has been signed by a certificate described by these fingerprints no fur‐\nther check upon the validity of this certificate is done.\n\nThe  format  of  the  FILE  is a list of SHA-1 fingerprint, one per line with optional\ncolons between the bytes.  Empty lines and lines prefix with a hash mark are ignored.\n\n\n\n--ocsp-max-clock-skew n\nThe number of seconds a skew between the OCSP responder and them local  clock  is  ac‐\ncepted.  Default is 600 (10 minutes).\n\n\n--ocsp-max-period n\nSeconds  a response is at maximum considered valid after the time given in the thisUp‐\ndate field.  Default is 7776000 (90 days).\n\n\n--ocsp-current-period n\nThe number of seconds an OCSP response is considered valid after the time given in the\nNEXTUPDATE datum.  Default is 10800 (3 hours).\n\n\n\n--max-replies n\nDo not return more that n items in one query.  The default is 10.\n\n\n--ignore-cert-extension oid\nAdd oid to the list of ignored certificate extensions.  The oid is expected to  be  in\ndotted decimal form, like 2.5.29.3.  This option may be used more than once.  Critical\nflagged  certificate extensions matching one of the OIDs in the list are treated as if\nthey are actually handled and thus the certificate won't be rejected due to an unknown\ncritical extension.  Use this option with care because extensions are usually  flagged\nas critical for a reason.\n\n\n--ignore-crl-extension oid\nAdd  oid  to  the list of ignored CRL extensions.  The oid is expected to be in dotted\ndecimal form.  Critical flagged CRL extensions matching one of the OIDs  in  the  list\nare treated as if they are actually handled and thus the certificate won't be rejected\ndue  to  an  unknown critical extension.  Use this option with care because extensions\nare usually flagged as critical for a reason.\n\n\n--ignore-cert fpr|file\nEntirely ignore certificates with the fingerprint fpr.  As an alternative to the  fin‐\ngerprint a filename can be given in which case all certificates described in that file\nare  ignored.  Any argument which contains a slash, dot or tilde is considered a file‐\nname.  Usual filename expansion takes place: A tilde at the start followed by a  slash\nis  replaced by the content of ‘HOME’, no slash at start describes a relative filename\nwhich will be searched at the home directory.  To make sure that the file is  searched\nin  the home directory, either prepend the name with \"./\" or use a name which contains\na dot.  The format of such a file is a list of SHA-1 fingerprint, one  per  line  with\noptional  colons  between  the bytes.  Empty lines and lines prefixed with a hash mark\nare ignored.\n\nThis option is useful as a quick workaround to exclude certain certificates  from  the\nsystem store.\n\n\n\n--hkp-cacert file\nUse  the  root certificates in file for verification of the TLS certificates used with\nhkps (keyserver access over TLS).  If the file is in PEM format a suffix  of  .pem  is\nexpected  for file.  This option may be given multiple times to add more root certifi‐\ncates.  Tilde expansion is supported.\n\nIf no hkp-cacert directive is present, dirmngr will use the system CAs.\n\n",
                    "long": "--allow-ocsp"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Here is an example on how to show dirmngr's internal table of  OpenPGP  keyserver  addresses.\nThe output is intended for debugging purposes and not part of a defined API.\n\ngpg-connect-agent --dirmngr 'keyserver --hosttable' /bye\n\nTo  inhibit  the use of a particular host you have noticed in one of the keyserver pools, you\nmay use\n\ngpg-connect-agent --dirmngr 'keyserver --dead pgpkeys.bnd.de' /bye\n\nThe description of the keyserver command can be printed using\n\ngpg-connect-agent --dirmngr 'help keyserver' /bye\n\n\n\n\n",
            "subsections": []
        },
        "FILES": {
            "content": "Dirmngr makes use of several directories when running in daemon mode: There are a few config‐\nuration files to control the operation of dirmngr.  By default they may all be found  in  the\ncurrent home directory (see: [option --homedir]).\n\n\n",
            "subsections": [
                {
                    "name": "dirmngr.conf",
                    "content": "This  is  the  standard configuration file read by dirmngr on startup.  It may contain\nany valid long option; the leading two dashes may not be entered and  the  option  may\nnot  be  abbreviated.   This  file is also read after a SIGHUP however not all options\nwill actually have an effect.  This default name may be changed on  the  command  line\n(see: [option --options]).  You should backup this file.\n\n"
                },
                {
                    "name": "/etc/gnupg/trusted-certs",
                    "content": "This  directory  should  be  filled  with certificates of Root CAs you are trusting in\nchecking the CRLs and signing OCSP Responses.\n\nUsually these are the same certificates you use with the applications  making  use  of\ndirmngr.   It is expected that each of these certificate files contain exactly one DER\nencoded certificate in a file with the suffix ‘.crt’ or ‘.der’.  dirmngr  reads  those\ncertificates  on startup and when given a SIGHUP.  Certificates which are not readable\nor do not make up a proper X.509 certificate are ignored; see the  log  file  for  de‐\ntails.\n\nApplications  using  dirmngr (e.g. gpgsm) can request these certificates to complete a\ntrust chain in the same way as with the extra-certs directory (see below).\n\nNote that for OCSP responses the certificate specified using the option  --ocsp-signer\nis always considered valid to sign OCSP requests.\n\n"
                },
                {
                    "name": "/etc/gnupg/extra-certs",
                    "content": "This  directory  may  contain extra certificates which are preloaded into the internal\ncache on startup. Applications using dirmngr (e.g. gpgsm) can request cached  certifi‐\ncates to complete a trust chain.  This is convenient in cases you have a couple inter‐\nmediate  CA  certificates  or certificates usually used to sign OCSP responses.  These\ncertificates are first tried before going out to the net to look for them.  These cer‐\ntificates must also be DER encoded and suffixed with ‘.crt’ or ‘.der’.\n\n"
                },
                {
                    "name": "~/.gnupg/crls.d",
                    "content": "This directory is used to store cached CRLs.  The ‘crls.d’ part  will  be  created  by\ndirmngr  if  it does not exists but you need to make sure that the upper directory ex‐\nists.\n\n\nSeveral options control the use of trusted  certificates  for  TLS  and  CRLs.   Here  is  an\nOverview on the use and origin of those Root CA certificates:\n\n"
                },
                {
                    "name": "System",
                    "content": "These System root certificates are used by:  FIXME\n\nThe  origin  of  the system provided certificates depends on the platform.  On Windows\nall certificates from the Windows System Stores ROOT and CA are used.\n\nOn other platforms the certificates are read from the first file found form this list:\n‘/etc/ssl/ca-bundle.pem’,                        ‘/etc/ssl/certs/ca-certificates.crt’,\n‘/etc/pki/tls/cert.pem’,                     ‘/usr/local/share/certs/ca-root-nss.crt’,\n‘/etc/ssl/cert.pem’.\n\n"
                },
                {
                    "name": "GnuPG",
                    "content": "The GnuPG specific certificates stored in the directory ‘/etc/gnupg/trusted-certs’ are\nonly used to validate CRLs.\n\n\n"
                },
                {
                    "name": "OpenPGP keyserver",
                    "content": "For accessing the OpenPGP keyservers the only certificates used are those set with the\nconfiguration option hkp-cacert.\n\n"
                },
                {
                    "name": "OpenPGP keyserver pool",
                    "content": "This is usually only one certificate read from the  file  ‘/usr/share/gnupg/gnupg/sks-\nkeyservers.netCA.pem’.   If  this  certificate exists it is used to access the special\nkeyservers hkps.pool.sks-keyservers.net (or ‘hkps://keys.gnupg.net’).\n\n\nPlease note that gpgsm accepts Root CA certificates for its own purposes  only  if  they  are\nlisted in its file ‘trustlist.txt’.  dirmngr does not make use of this list - except FIXME.\n\n\n"
                }
            ]
        },
        "NOTES": {
            "content": "To be able to see diagnostics it is often useful to put at least the following lines into the\nconfiguration file ‘~/gnupg/dirmngr.conf’:\n\nlog-file ~/dirmngr.log\nverbose\n\nYou  may  want to check the log file to see whether all desired root CA certificates are cor‐\nrectly loaded.\n\nTo be able to perform OCSP requests you probably want to add the line:\n\nallow-ocsp\n\nTo make sure that new options are read or that after the installation of a new GnuPG versions\nthe right dirmngr version is running, you should kill an existing dirmngr so that a  new  in‐\nstance is started as needed by the other components:\n\ngpgconf --kill dirmngr\n\nDirect interfaction with the dirmngr is possible by using the command\n\ngpg-connect-agent --dirmngr\n\nEnter  HELP at the prompt to see a list of commands and enter HELP followed by a command name\nto get help on that command.\n\n\n\n\n",
            "subsections": []
        },
        "SIGNALS": {
            "content": "A running dirmngr may be controlled by signals, i.e. using the kill command to send a  signal\nto the process.\n\nHere is a list of supported signals:\n\n\n\nSIGHUP This  signal  flushes  all  internally cached CRLs as well as any cached certificates.\nThen the certificate cache is reinitialized as on startup.  Options are  re-read  from\nthe configuration file.  Instead of sending this signal it is better to use\ngpgconf --reload dirmngr\n\n\nSIGTERM\nShuts  down  the  process  but waits until all current requests are fulfilled.  If the\nprocess has received 3 of these signals and requests are still pending, a shutdown  is\nforced.  You may also use\ngpgconf --kill dirmngr\ninstead of this signal\n\n\nSIGINT Shuts down the process immediately.\n\n\n\nSIGUSR1\nThis prints some caching statistics to the log file.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gpgsm(1), dirmngr-client(1)\n\nThe  full  documentation  for  this tool is maintained as a Texinfo manual.  If GnuPG and the\ninfo program are properly installed at your site, the command\n\ninfo gnupg\n\nshould give you access to the complete manual including a menu structure and an index.\n\n\n\nGnuPG 2.4.4                                  2024-01-25                                   DIRMNGR(8)",
            "subsections": []
        }
    },
    "summary": "dirmngr - GnuPG's network access daemon",
    "flags": [
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "Outputs additional information while running. You can increase the verbosity by giv‐ ing several verbose commands to dirmngr, such as -vv. --log-file file Append all logging output to file. This is very helpful in seeing what the agent ac‐ tually does. Use ‘socket://’ to log to socket. --compatibility-flags flags Set compatibility flags to work around certain problems or to emulate bugs. The flags are given as a comma separated list of flag names and are OR-ed together. The special flag \"none\" clears the list and allows one to start over with an empty list. To get a list of available flags the sole word \"help\" can be used. --faked-system-time epoch This option is only useful for testing; it sets the system time back or forth to epoch which is the number of seconds elapsed since the year 1970. Alternatively epoch may be given as a full ISO time string (e.g. \"20070924T154812\"). --debug-level level Select the debug level for investigating problems. level may be a numeric value or by a keyword: none No debugging at all. A value of less than 1 may be used instead of the key‐ word. basic Some basic debug messages. A value between 1 and 2 may be used instead of the keyword. advanced More verbose debug messages. A value between 3 and 5 may be used instead of the keyword. expert Even more detailed messages. A value between 6 and 8 may be used instead of the keyword. guru All of the debug messages you can get. A value greater than 8 may be used in‐ stead of the keyword. The creation of hash tracing files is only enabled if the keyword is used. How these messages are mapped to the actual debugging flags is not specified and may change with newer releases of this program. They are however carefully selected to best aid in de‐ bugging. --debug flags Set debug flags. All flags are or-ed and flags may be given in C syntax (e.g. 0x0042) or as a comma separated list of flag names. To get a list of all supported flags the single word \"help\" can be used. This option is only useful for debugging and the be‐ havior may change at any time without notice."
        },
        {
            "flag": "",
            "long": "--debug-all",
            "arg": null,
            "description": "Same as --debug=0xffffffff --tls-debug level Enable debugging of the TLS layer at level. The details of the debug level depend on the used TLS library and are not set in stone. --debug-wait n When running in server mode, wait n seconds before entering the actual processing loop and print the pid. This gives time to attach a debugger."
        },
        {
            "flag": "",
            "long": "--disable-check-own-socket",
            "arg": null,
            "description": "On some platforms dirmngr is able to detect the removal of its socket file and shut‐ down itself. This option disable this self-test for debugging purposes."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--sh",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "--csh Format the info output in daemon mode for use with the standard Bourne shell respec‐ tive the C-shell. The default is to guess it based on the environment variable SHELL which is in almost all cases sufficient."
        },
        {
            "flag": "",
            "long": "--force",
            "arg": null,
            "description": "Enabling this option forces loading of expired CRLs; this is only useful for debug‐ ging."
        },
        {
            "flag": "",
            "long": "--use-tor",
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--no-use-tor",
            "arg": null,
            "description": "The option --use-tor switches Dirmngr and thus GnuPG into ``Tor mode'' to route all network access via Tor (an anonymity network). Certain other features are disabled in this mode. The effect of --use-tor cannot be overridden by any other command or even by reloading dirmngr. The use of --no-use-tor disables the use of Tor. The default is to use Tor if it is available on startup or after reloading dirmngr. The test on the availability of Tor is done by trying to connect to a SOCKS proxy at either port 9050 or 9150; if another type of proxy is listening on one of these ports, you should use --no-use-tor."
        },
        {
            "flag": "",
            "long": "--standard-resolver",
            "arg": null,
            "description": "This option forces the use of the system's standard DNS resolver code. This is mainly used for debugging. Note that on Windows a standard resolver is not used and all DNS access will return the error ``Not Implemented'' if this option is used. Using this together with enabled Tor mode returns the error ``Not Enabled''."
        },
        {
            "flag": "",
            "long": "--recursive-resolver",
            "arg": null,
            "description": "When possible use a recursive resolver instead of a stub resolver. --resolver-timeout n Set the timeout for the DNS resolver to N seconds. The default are 30 seconds. --connect-timeout n --connect-quick-timeout n Set the timeout for HTTP and generic TCP connection attempts to N seconds. The value set with the quick variant is used when the --quick option has been given to certain Assuan commands. The quick value is capped at the value of the regular connect time‐ out. The default values are 15 and 2 seconds. Note that the timeout values are for each connection attempt; the connection code will attempt to connect all addresses listed for a server. --listen-backlog n Set the size of the queue for pending connections. The default is 64."
        },
        {
            "flag": "",
            "long": "--allow-version-check",
            "arg": null,
            "description": "Allow Dirmngr to connect to https://versions.gnupg.org to get the list of current software versions. On debian-packaged versions, this option does nothing since soft‐ ware updates should be handled by the distribution. See the option --query-swdb of the command gpgconf for more details. Note, that regardless of this option a version check can always be triggered using this command: gpg-connect-agent --dirmngr 'loadswdb --force' /bye --keyserver name Use name as your keyserver. This is the server that gpg communicates with to receive keys, send keys, and search for keys. The format of the name is a URI: `scheme:[//]keyservername[:port]' The scheme is the type of keyserver: \"hkp\" for the HTTP (or compatible) keyservers or \"ldap\" for the LDAP keyservers. Note that your par‐ ticular installation of GnuPG may have other keyserver types available as well. Key‐ server schemes are case-insensitive. After the keyserver name, optional keyserver con‐ figuration options may be provided. These are the same as the --keyserver-options of gpg, but apply only to this particular keyserver. Some keyservers synchronize with each other, so there is not always a need to send keys to more than one server. Some keyservers use round robin DNS to give a different keyserver each time you use it. If exactly two keyservers are configured and only one is a Tor hidden service (.onion), Dirmngr selects the keyserver to use depending on whether Tor is locally running or not. The check for a running Tor is done for each new connection. If no keyserver is explicitly configured, dirmngr will use the built-in default of hkps://keys.openpgp.org. To avoid the use of a default keyserver the value none can be used. Note that the above default is a Debian-specific choice. Upstream GnuPG prefers hkps://keys.openpgp.org. See /usr/share/doc/gpgconf/NEWS.Debian.gz for more details. Windows users with a keyserver running on their Active Directory may use the short form ldap:/// for name to access this directory. For accessing anonymous LDAP keyservers name is in general just a ldaps://ldap.exam‐ ple.com. A BaseDN parameter should never be specified. If authentication is required things are more complicated and two methods are available: The modern method (since version 2.2.28) is to use the very same syntax as used with the option --ldapserver. Please see over there for details; here is an example: keyserver ldap:ldap.example.com::uid=USERNAME,ou=GnuPG Users, dc=example,dc=com:PASSWORD::starttls The other method is to use a full URL for name; for example: keyserver ldaps://ldap.example.com/????bindname=uid=USERNAME %2Cou=GnuPG%20Users%2Cdc=example%2Cdc=com,password=PASSWORD Put this all on one line without any spaces and keep the '%2C' as given. Replace USERNAME, PASSWORD, and the 'dc' parts according to the instructions received from your LDAP administrator. Note that only simple authentication (i.e. cleartext passwords) is supported and thus using ldaps is strongly suggested (since 2.2.28 \"ldaps\" defaults to port 389 and uses STARTTLS). On Windows authentication via AD can be requested by adding gpgNtds=1 after the fourth question mark instead of the bindname and password parameter. --nameserver ipaddr In ``Tor mode'' Dirmngr uses a public resolver via Tor to resolve DNS names. If the default public resolver, which is 8.8.8.8, shall not be used a different one can be given using this option. Note that a numerical IP address must be given (IPv6 or IPv4) and that no error checking is done for ipaddr."
        },
        {
            "flag": "",
            "long": "--disable-ipv4",
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--disable-ipv6",
            "arg": null,
            "description": "Disable the use of all IPv4 or IPv6 addresses."
        },
        {
            "flag": "",
            "long": "--disable-ldap",
            "arg": null,
            "description": "Entirely disables the use of LDAP."
        },
        {
            "flag": "",
            "long": "--disable-http",
            "arg": null,
            "description": "Entirely disables the use of HTTP."
        },
        {
            "flag": "",
            "long": "--ignore-http-dp",
            "arg": null,
            "description": "When looking for the location of a CRL, the to be tested certificate usually contains so called CRL Distribution Point (DP) entries which are URLs describing the way to ac‐ cess the CRL. The first found DP entry is used. With this option all entries using the HTTP scheme are ignored when looking for a suitable DP."
        },
        {
            "flag": "",
            "long": "--ignore-ldap-dp",
            "arg": null,
            "description": "This is similar to --ignore-http-dp but ignores entries using the LDAP scheme. Both options may be combined resulting in ignoring DPs entirely."
        },
        {
            "flag": "",
            "long": "--ignore-ocsp-service-url",
            "arg": null,
            "description": "Ignore all OCSP URLs contained in the certificate. The effect is to force the use of the default responder."
        },
        {
            "flag": "",
            "long": "--honor-http-proxy",
            "arg": null,
            "description": "If the environment variable ‘httpproxy’ has been set, use its value to access HTTP servers. If on Windows the option is used but the environment variable is not set, the proxy settings are taken from the system. --http-proxy host[:port] Use host and port to access HTTP servers. The use of this option overrides the envi‐ ronment variable ‘httpproxy’ regardless whether --honor-http-proxy has been set. --ldap-proxy host[:port] Use host and port to connect to LDAP servers. If port is omitted, port 389 (standard LDAP port) is used. This overrides any specified host and port part in a LDAP URL and will also be used if host and port have been omitted from the URL."
        },
        {
            "flag": "",
            "long": "--only-ldap-proxy",
            "arg": null,
            "description": "Never use anything else but the LDAP \"proxy\" as configured with --ldap-proxy. Usually dirmngr tries to use other configured LDAP server if the connection using the \"proxy\" failed. --ldapserverlist-file file Read the list of LDAP servers to consult for CRLs and X.509 certificates from file in‐ stead of the default per-user ldap server list file. The default value for file is ‘dirmngrldapservers.conf’. This server list file contains one LDAP server per line in the format hostname:port:username:password:basedn:flags Lines starting with a ‘#’ are comments. Note that as usual all strings entered are expected to be UTF-8 encoded. Obviously this will lead to problems if the password has originally been encoded as Latin-1. There is no other solution here than to put such a password in the binary encoding into the file (i.e. non-ascii characters won't show up readable). ([The gpgconf tool might be helpful for frontends as it enables editing this configuration file using percent-escaped strings.]) --ldapserver spec This is an alternative way to specify LDAP servers for CRL and X.509 certificate re‐ trieval. If this option is used the servers configured in ‘dirmngrldapservers.conf’ (or the file given by --ldapserverlist-file) are cleared. Note that ‘dirm‐ ngrldapservers.conf’ is not read again by a reload signal. However, --ldapserver op‐ tions are read again. spec is either a proper LDAP URL or a colon delimited list of the form hostname:port:username:password:basedn:flags: with an optional prefix of ldap: (but without the two slashes which would turn this into a proper LDAP URL). flags is a list of one or more comma delimited keywords: plain The default: Do not use a TLS secured connection at all; the default port is 389. starttls Use STARTTLS to secure the connection; the default port is 389. ldaptls Tunnel LDAP through a TLS connection; the default port is 636. ntds On Windows authenticate the LDAP connection using the Active Directory with the current user. areconly On Windows use only the A or AAAA record when resolving the LDAP server name. Note that in an URL style specification the scheme ldaps:// refers to STARTTLS and not to LDAP-over-TLS. --ldaptimeout secs Specify the number of seconds to wait for an LDAP query before timing out. The de‐ fault are 15 seconds. 0 will never timeout."
        },
        {
            "flag": "",
            "long": "--add-servers",
            "arg": null,
            "description": "This option makes dirmngr add any servers it discovers when validating certificates against CRLs to the internal list of servers to consult for certificates and CRLs. This option should in general not be used. This option might be useful when trying to validate a certificate that has a CRL dis‐ tribution point that points to a server that is not already listed in the ldapserverlist. Dirmngr will always go to this server and try to download the CRL, but chances are high that the certificate used to sign the CRL is located on the same server. So if dirmngr doesn't add that new server to list, it will often not be able to verify the signature of the CRL unless the --add-servers option is used. Caveat emptor: Using this option may enable denial-of-service attacks and leak search requests to unknown third parties. This is because arbitrary servers are added to the internal list of LDAP servers which in turn is used for all unspecific LDAP queries as well as a fallback for queries which did not return a result."
        },
        {
            "flag": "",
            "long": "--allow-ocsp",
            "arg": null,
            "description": "This option enables OCSP support if requested by the client. OCSP requests are rejected by default because they may violate the privacy of the user; for example it is possible to track the time when a user is reading a mail. --ocsp-responder url Use url as the default OCSP Responder if the certificate does not contain information about an assigned responder. Note, that --ocsp-signer must also be set to a valid certificate. --ocsp-signer fpr|file Use the certificate with the fingerprint fpr to check the responses of the default OCSP Responder. Alternatively a filename can be given in which case the response is expected to be signed by one of the certificates described in that file. Any argument which contains a slash, dot or tilde is considered a filename. Usual filename expan‐ sion takes place: A tilde at the start followed by a slash is replaced by the content of ‘HOME’, no slash at start describes a relative filename which will be searched at the home directory. To make sure that the file is searched in the home directory, ei‐ ther prepend the name with \"./\" or use a name which contains a dot. If a response has been signed by a certificate described by these fingerprints no fur‐ ther check upon the validity of this certificate is done. The format of the FILE is a list of SHA-1 fingerprint, one per line with optional colons between the bytes. Empty lines and lines prefix with a hash mark are ignored. --ocsp-max-clock-skew n The number of seconds a skew between the OCSP responder and them local clock is ac‐ cepted. Default is 600 (10 minutes). --ocsp-max-period n Seconds a response is at maximum considered valid after the time given in the thisUp‐ date field. Default is 7776000 (90 days). --ocsp-current-period n The number of seconds an OCSP response is considered valid after the time given in the NEXTUPDATE datum. Default is 10800 (3 hours). --max-replies n Do not return more that n items in one query. The default is 10. --ignore-cert-extension oid Add oid to the list of ignored certificate extensions. The oid is expected to be in dotted decimal form, like 2.5.29.3. This option may be used more than once. Critical flagged certificate extensions matching one of the OIDs in the list are treated as if they are actually handled and thus the certificate won't be rejected due to an unknown critical extension. Use this option with care because extensions are usually flagged as critical for a reason. --ignore-crl-extension oid Add oid to the list of ignored CRL extensions. The oid is expected to be in dotted decimal form. Critical flagged CRL extensions matching one of the OIDs in the list are treated as if they are actually handled and thus the certificate won't be rejected due to an unknown critical extension. Use this option with care because extensions are usually flagged as critical for a reason. --ignore-cert fpr|file Entirely ignore certificates with the fingerprint fpr. As an alternative to the fin‐ gerprint a filename can be given in which case all certificates described in that file are ignored. Any argument which contains a slash, dot or tilde is considered a file‐ name. Usual filename expansion takes place: A tilde at the start followed by a slash is replaced by the content of ‘HOME’, no slash at start describes a relative filename which will be searched at the home directory. To make sure that the file is searched in the home directory, either prepend the name with \"./\" or use a name which contains a dot. The format of such a file is a list of SHA-1 fingerprint, one per line with optional colons between the bytes. Empty lines and lines prefixed with a hash mark are ignored. This option is useful as a quick workaround to exclude certain certificates from the system store. --hkp-cacert file Use the root certificates in file for verification of the TLS certificates used with hkps (keyserver access over TLS). If the file is in PEM format a suffix of .pem is expected for file. This option may be given multiple times to add more root certifi‐ cates. Tilde expansion is supported. If no hkp-cacert directive is present, dirmngr will use the system CAs."
        }
    ],
    "examples": [
        "Here is an example on how to show dirmngr's internal table of  OpenPGP  keyserver  addresses.",
        "The output is intended for debugging purposes and not part of a defined API.",
        "gpg-connect-agent --dirmngr 'keyserver --hosttable' /bye",
        "To  inhibit  the use of a particular host you have noticed in one of the keyserver pools, you",
        "may use",
        "gpg-connect-agent --dirmngr 'keyserver --dead pgpkeys.bnd.de' /bye",
        "The description of the keyserver command can be printed using",
        "gpg-connect-agent --dirmngr 'help keyserver' /bye"
    ],
    "see_also": [
        {
            "name": "gpgsm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gpgsm/1/json"
        },
        {
            "name": "dirmngr-client",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dirmngr-client/1/json"
        }
    ]
}