openssl (version 0.6)

cert_verify: x509 certificates

Description

Read, download and verify certificates.

Usage

cert_verify(cert, root = ca_bundle())

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

ca_bundle()

Arguments

cert
certficate (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
integer: port to connect to

See Also

read_cert

Examples

Run this code
# 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
ocpu <- download_ssl_cert("public.opencpu.org")
as.list(ocpu[[1]])$subject

Run the code above in your browser using DataCamp Workspace