Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

certificates

X509 certificates


Description

Read, download, analyze and verify X.509 certificates.

Usage

cert_verify(cert, root = ca_bundle())

download_ssl_cert(host = "localhost", port = 443, ipv4_only = FALSE)

ca_bundle()

Arguments

cert

certificate (or certificate-chain) to be verified. Must be cert or list or path.

root

trusted pubkey or certificate(s) e.g. CA bundle.

host

string: hostname of the server to connect to

port

string or integer: port or protocol to use, e.g: 443 or "https"

ipv4_only

do not use IPv6 connections

Details

If https verification fails and you can't figure out why, have a look at https://ssldecoder.org.

See Also

Examples

# Verify the r-project HTTPS cert
chain <- download_ssl_cert("cran.r-project.org", 443)
print(chain)
cert_data <- as.list(chain[[1]])
print(cert_data$pubkey)
print(cert_data$alt_names)
cert_verify(chain, ca_bundle())

# Write cert in PEM format
cat(write_pem(chain[[1]]))

openssl

Toolkit for Encryption, Signatures and Certificates Based on OpenSSL

v1.4.4
MIT + file LICENSE
Authors
Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Oliver Keyes [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.