context("Read certificates")

test_that("Roundtrip pem/der formats", {
  cert <- read_cert("../keys/opencpu.org.cer", der = TRUE)
  expect_equal(cert, read_cert(write_pem(cert)))
  expect_equal(cert, read_cert(write_pem(cert, tempfile())))
  expect_equal(cert, read_cert(write_der(cert), der = TRUE))
  expect_equal(cert, read_cert(write_der(cert, tempfile()), der = TRUE))

Try the openssl package in your browser

Any scripts or data that you put into this service are public.

openssl documentation built on March 18, 2018, 1:22 p.m.