You are here

class Provision_Service_Certificate in Aegir HTTPS 7.3

The service type base class.

Hierarchy

Expanded class hierarchy of Provision_Service_Certificate

File

submodules/certificate/drush/Provision/Service/Certificate.php, line 6

View source
class Provision_Service_Certificate extends Provision_Service {
  public $service = 'Certificate';

  // Whether the certificate can generate a default server certificate.
  public $can_generate_default = FALSE;

  /**
   * Called on provision-verify.
   */
  function verify() {

    #$this->create_config(d()->type);

    #$this->parse_configs();
  }

  /**
   * PUBLIC API
   */

  /**
   * Return the path where we'll generate our certificates.
   */
  function get_source_path($https_key) {

    // Default to the ~/config/ssl.d directory.
    return "{$this->server->ssld_path}/{$https_key}";
  }

  /**
   * Retrieve an array containing the actual files for this https_key.
   *
   * Always attempt to generate new certificates.  The upstream script should
   * recognize non-expired ones, and leave them in place.  So it checks for
   * us.  We don't need to check which ones are still valid.
   */
  function get_certificates($https_key) {
    $this
      ->generate_certificates($https_key);
    return $this
      ->get_certificate_paths($https_key);
  }

  /**
   * Retrieve an array containing source and target paths for this https_key.
   */
  function get_certificate_paths($https_key) {

    // This is a dummy implementation. We should probably move this into an
    // interface.
    return TRUE;
  }

  /**
   * Generate a self-signed certificate for the provided key.
   */
  function generate_certificates($https_key) {

    // This is a dummy implementation. We should probably move this into an
    // interface.
    return TRUE;
  }

  /**
   * Commonly something like running the restart_cmd or sending SIGHUP to a process.
   */
  function parse_configs() {
    return TRUE;
  }

  /**
   * Generate a site specific configuration file.
   */
  function create_site_config() {
    return TRUE;
  }

  /**
   * Remove an existing site configuration file.
   */
  function delete_site_config() {
    return TRUE;
  }

  /**
   * Add a new platform specific configuration file.
   */
  function create_platform_config() {
    return TRUE;
  }

  /**
   * Remove an existing platform configuration file.
   */
  function delete_platform_config() {
    return TRUE;
  }

  /**
   * Create a new server specific configuration file.
   */
  function create_server_config() {
    return TRUE;
  }

  /**
   * Remove an existing server specific configuration file.
   */
  function delete_server_config() {
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Provision_Service_Certificate::$can_generate_default public property 1
Provision_Service_Certificate::$service public property 2
Provision_Service_Certificate::create_platform_config function Add a new platform specific configuration file.
Provision_Service_Certificate::create_server_config function Create a new server specific configuration file.
Provision_Service_Certificate::create_site_config function Generate a site specific configuration file.
Provision_Service_Certificate::delete_platform_config function Remove an existing platform configuration file.
Provision_Service_Certificate::delete_server_config function Remove an existing server specific configuration file.
Provision_Service_Certificate::delete_site_config function Remove an existing site configuration file.
Provision_Service_Certificate::generate_certificates function Generate a self-signed certificate for the provided key. 2
Provision_Service_Certificate::get_certificates function Retrieve an array containing the actual files for this https_key. 2
Provision_Service_Certificate::get_certificate_paths function Retrieve an array containing source and target paths for this https_key. 2
Provision_Service_Certificate::get_source_path function Return the path where we'll generate our certificates. 2
Provision_Service_Certificate::parse_configs function Commonly something like running the restart_cmd or sending SIGHUP to a process.
Provision_Service_Certificate::verify function Called on provision-verify. 1