Description Usage Arguments Details Examples
View source: R/pki_enable_download_file.R
Override default configuration settings used by download.file()
to allow for PKI-enabled use of install.packages()
.
1 2 3 4 5 6 | pki_enable_download_file(
pki_file = NULL,
ca_file = NULL,
password = NULL,
override = FALSE
)
|
pki_file |
string: filepath to a pki certificate |
ca_file |
string: filepath to a Certificate Authority (CA) bundle |
password |
string: passphrase used to encrypt/decrypt the PKI certificate |
override |
logical: force overwrite a pre-existing mypki configuration file if found. |
Default mypki configuration settings will be used unless otherwise specified. The PKI certificate file must be in PKCS#12 format. The arguments of download.file()
are modified so that method = "curl"
and the following extra curl command-line arguments are set: cacert, cert, key, pass. See ?download.file
for more information.
This download method requires curl to be installed and added to the PATH environment variable. This is already done for most Linux/Mac distributions.
If a mypki configuration file cannot be found, users are prompted for filepaths to a PKI certificate and a Certificate Authority (CA) bundle.
1 2 3 4 5 6 7 8 9 | library(rpki)
pki_enable_download_file() # will prompt for passphrase
install.packages("my_private_package")
library(rpki)
pki_enable_download_file(pki_file = "my_pki.p12",
ca_file = "my_ca.crt",
password = "my_pki_passphrase")
install.packages("my_private_package")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.