1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/cert.R 3\name{cert_verify} 4\alias{cert_verify} 5\alias{download_ssl_cert} 6\alias{ca_bundle} 7\title{X509 certificates} 8\usage{ 9cert_verify(cert, root = ca_bundle()) 10 11download_ssl_cert(host = "localhost", port = 443, ipv4_only = FALSE) 12 13ca_bundle() 14} 15\arguments{ 16\item{cert}{certificate (or certificate-chain) to be verified. Must be cert or list or path.} 17 18\item{root}{trusted pubkey or certificate(s) e.g. CA bundle.} 19 20\item{host}{string: hostname of the server to connect to} 21 22\item{port}{string or integer: port or protocol to use, e.g: \code{443} or \code{"https"}} 23 24\item{ipv4_only}{do not use IPv6 connections} 25} 26\description{ 27Read, download, analyze and verify X.509 certificates. 28} 29\examples{ 30# Verify the r-project HTTPS cert 31chain <- download_ssl_cert("cran.r-project.org", 443) 32print(chain) 33cert_data <- as.list(chain[[1]]) 34print(cert_data$pubkey) 35print(cert_data$alt_names) 36cert_verify(chain, ca_bundle()) 37 38# Write cert in PEM format 39cat(write_pem(chain[[1]])) 40} 41\seealso{ 42\link{read_cert} 43} 44