Ejemplo n.º 1
0
 /**
  * deletes $crl_id's crl
  * @param $crl_id
  * @return bool
  */
 public function deleteCRL($p)
 {
     if ($p instanceof SSLCRL) {
         $p = $p->getId();
     }
     try {
         return $this->_deleteCRL($p);
     } catch (Exception $e) {
         CertificateManager::error($e);
     }
     return false;
 }
Ejemplo n.º 2
0
 private function crlPostAction($id)
 {
     $registry = Zend_Registry::getInstance();
     $translate = $registry->get("Zend_Translate");
     //print_r($_POST);
     $success = false;
     $validationErrors = array();
     $newCRL = empty($id);
     $crl = $this->validateFormAndGetCRL($validationErrors);
     if (count($validationErrors) == 0) {
         $success = $newCRL ? $this->certificateManager->createCRL($crl) : $this->certificateManager->updateCRL($crl);
         if (!$success) {
             $operation = $newCRL ? "creating" : "updating";
             $validationErrors['default'] = $translate->translate("Error ") . $operation . " CRL: " . CertificateManager::error();
         }
     }
     if ($success) {
         $messenger = $this->_helper->getHelper('FlashMessenger');
         $messenger->addMessage($newCRL ? $translate->translate("Successfully Created Certificate Revocation List") : $translate->translate("Successfully Updated Certificate Revocation List"));
         $this->_redirect("/certificate");
     } else {
         $this->view->isNew = $newCRL;
         $this->view->validationErrors = $validationErrors;
         $this->view->crl = $crl;
     }
 }