Skip to content

Settings

Shaun Wheelhouse edited this page Apr 29, 2017 · 10 revisions

The internal settings subsystem is a good candidate for replacement in the near future. For the time being I'm documenting settings and their purposes here to aid development. I don't think all of them are used in the current version.

Many of these could be replaced with a simple struct.

Settings

  • "birthtime"

  • "cipher"

    Set to the name of the cipher to use by the rnp and rnpkeys utilities. This is translated by lib/misc.c:pgp_str_to_cipher to a pgp_symm_alg_t symbol used to select a cipher when performing encipherment.

  • "coredumps"

    Whether or not coredumps are allowed. If not allowed an effort will be made to disable them in lib/rnp.c:set_core_dumps.

  • "duration"

  • "errs"

    Redirects errors to stdout if set to "". Other values are ignored. There is currently no corresponding set for this in any of the utilities.

  • "format"

  • "generated userid"

  • "hash"

    Set to the name of the hash function to use by the rnp and rnpkeys utilities. This is translated by lib/misc.c:pgp_str_to_hash_alg to a pgp_hash_alg_t symbol used to select a hash function.

  • "homedir"

    The path to the key home directory. The role of this value is currently very vague and is undergoing cleanup.

  • "initialised"

    Set to a ctime() string documenting the time that the rnp context was initialised.

  • "need seckey"

    Whether or not a secret key is needed to perform duties. This is used to determine whether or not to load secret keyrings in the lib/rnp.c:load_keys_* functions.

  • "need userid"

    Whether or not a user ID is needed to perform duties. This causes errors to be raised in the lib/rnp.c:load_keys_* functions if a user ID cannot be loaded but is required.

  • "numtries"

    The number of passphrase attempts to permit stored as a numerical string or the special value "unlimited". If the value is negative MAX_PASSPHRASE_ATTEMPTS will be permitted, defined in lib/rnp.c. atoi() is used for string/integer conversion; garbage will return an undefined number of attempts.

  • "max mem alloc"

    An integer string indicating the maximum amount of memory allowed to be allocated in bytes. This is only ever referenced in the lib/rnp.c:stdin_to_mem function.

  • "outs"

    The output stream. If NULL will use stdout, if "<stderr>" will use stderr. All other values are ignored.

  • "pass-fd"

    Set to an integer string indicating a file descriptor to use for authentication. NULL if not applicable. Uses atoi() for decoding; an undefined file descriptor may be read if a non integer value is supplied.

  • "pubring"

    Set to the path to the public keyring when lib/rnp.c:rnp_list_packets is called.

  • "res"

    The results stream. The results stream is set to the error stream if NULL or "<stderr>" or stdout if "<stdout>" otherwise it will be treated as a path and the file there opened for output.

  • "ssh keys"

    Set to "1" if SSH keys are to be used, NULL otherwise.

  • "sshkeyfile"

    Used in lib/rnp.c:readsshkeys to get a path to an SSH public key to read. Set with the --sshkeyfile option in the rnp and rnpkeys utilities.

  • "sshpubfile"

    Set to the path of the SSH public key in lib/rnp.c:readsshkeys if a secret key is loaded too. This value doesn't appear to be directly read anywhere else in rnp.

  • "sshsecfile"

    Set to the path of the SSH private key in lib/rnp.c:readsshkeys if a secret key is loaded. This value doesn't appear to be directly read anywhere else in rnp.

  • "subkey sigs"

  • "userid"

Clone this wiki locally