<?php
 require_once(dirname(__FILE__).'/class.certificates.inc.php'); class radcerts extends certificates { var $classname = 'radcerts'; public function __construct( $app) { $this->config_dir = '/usr/share/freeradius/data/certs'; $this->dir = '/etc/freeradius3/certs'; $this->ca_dir = '/etc/freeradius3/certs'; $this->ca_name = 'ca.pem'; parent::__construct($app); $this->allowed_ext = '.crt,.key'; $this->refresh_link = 'q=core.radcerts.view'; $this->subj = 'RADIUS'; } public function do_add() { if ( !$this->can_add) { $this->owner->permission_denied(); return; } if (!empty($GLOBALS['cert'])) mwexec('/opt/stasoft/bin/mkclientcert.sh', 'radius '.$GLOBALS['cert']); Refresh($this->refresh_link); } protected function generate_ca_set() { mwexec('/opt/stasoft/bin/mkservercert.sh radius server'); } public function view() { $this->owner->_out($this->template()); } } 