Learn R Programming

crew (version 0.8.0)

crew_tls: Configure TLS.

Description

Create an R6 object with transport layer security (TLS) configuration for crew.

Usage

crew_tls(
  mode = "none",
  key = NULL,
  password = NULL,
  certificates = NULL,
  validate = TRUE
)

Value

An R6 object with TLS configuration settings and methods.

Arguments

mode

Character of length 1. Must be one of the following:

  • "none": disable TLS configuration.

  • "automatic": let mirai create a one-time key pair with a self-signed certificate.

  • "custom": manually supply a private key pair, an optional password for the private key, a certificate, an optional revocation list.

key

If mode is "none" or "automatic", then key is NULL. If mode is "custom", then key is a character of length 1 with the file path to the private key file.

password

If mode is "none" or "automatic", then password is NULL. If mode is "custom" and the private key is not encrypted, then password is still NULL. If mode is "custom" and the private key is encrypted, then password is a character of length 1 the the password of the private key. In this case, DO NOT SAVE THE PASSWORD IN YOUR R CODE FILES. See the keyring R package for solutions.

certificates

If mode is "none" or "automatic", then certificates is NULL. If mode is "custom", then certificates is a character vector of file paths to certificate files (signed public keys). If the certificate is self-signed or if it is directly signed by a certificate authority (CA), then only the certificate of the CA is needed. But if you have a whole certificate chain which begins at your own certificate and ends with the CA, then you can supply the whole certificate chain as a character vector which begins at your own certificate and ends with the certificate of the CA.

validate

Logical of length 1, whether to validate the configuration object on creation. If FALSE, then validate() can be called later on.

Details

crew_tls() objects are input to the tls argument of crew_client(), crew_controller_local(), etc. See https://wlandau.github.io/crew/articles/risks.html for details.

See Also

Other tls: crew_class_tls

Examples

Run this code
crew_tls(mode = "automatic")

Run the code above in your browser using DataLab