Method: Puppet::HTTP::Service::Ca#get_certificate_revocation_list

Defined in:
lib/puppet/http/service/ca.rb

#get_certificate_revocation_list(if_modified_since: nil, ssl_context: nil) ⇒ Array<Puppet::HTTP::Response, String>

Submit a GET request to retrieve the certificate revocation list from the

server.

Parameters:

  • if_modified_since (Time) (defaults to: nil)

    If not nil, only download the CRL if it has been modified since the specified time.

  • ssl_context (Puppet::SSL::SSLContext) (defaults to: nil)

Returns:

  • (Array<Puppet::HTTP::Response, String>)

    An array containing the request response and the stringified body of the request response



66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/puppet/http/service/ca.rb', line 66

def get_certificate_revocation_list(if_modified_since: nil, ssl_context: nil)
  headers = add_puppet_headers(HEADERS)
  headers['If-Modified-Since'] = if_modified_since.httpdate if if_modified_since

  response = @client.get(
    with_base_url("/certificate_revocation_list/ca"),
    headers: headers,
    options: { ssl_context: ssl_context }
  )

  process_response(response)

  [response, response.body.to_s]
end