cert_verify

0th

Percentile

X509 certificates

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

read_cert

Aliases
  • cert_verify
  • download_ssl_cert
  • ca_bundle
Examples
# NOT RUN {
# Verify the r-project HTTPS cert
chain <- download_ssl_cert("www.r-project.org", 443)
print(chain)
print(as.list(chain[[1]])$pubkey)
cert_verify(chain, ca_bundle())

# Another example
chain <- download_ssl_cert("public.opencpu.org")
ocpu <- chain[[1]]
as.list(ocpu)$subject

# Write PEM format
write_pem(ocpu)
# }
Documentation reproduced from package openssl, version 1.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.