GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — lhttps/src/Init.php at dev · madeny/lhttps Expand file tree/ Copy pathInit.phpMore file actions 83 lines (54 loc) · 1.42 KB / Copy pathInit.phpFile metadata and controls83 lines (54 loc) · 1.42 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 <?php namespace Madeny\lhttps; use Madeny\lhttps\Path; use Madeny\lhttps\Config; use Symfony\Component\Dotenv\Dotenv; // Init the necessary file and folder class Init { public $dirs = ['cnf', 'config', 'csr', 'keys', 'live', 'logs']; function __construct($domain) { $i = 0; $path = Config::path(); foreach ($this->dirs as $value) { if (!file_exists($path."/".$value)) { while ($i < 6) { mkdir($path."/".$this->dirs[$i]); $i++; } return; } } } public function keygen($path) : Int { exec(__DIR__."/../scripts/keygen.sh $path", $output, $error); return $error; } public function ca($path) { exec(__DIR__."/../scripts/ca.sh $path", $output, $error); return $error; } public function domain($path, $domain) { exec(__DIR__."/../scripts/domain.sh $path $domain", $output, $error); return $error; } public function sign($path, $domain) { exec(__DIR__."/../scripts/sign.sh $path $domain", $output, $error); return $error; } public function make($domain) { $path = Config::path(); $rootkey = $path."/keys/root.key"; $ca = $path."/csr/root.pem"; $dom = $path."/live/$domain.ssl.key"; $sign = $path."/live/$domain.ssl.crt"; !file_exists($rootkey) ? $this->keygen($path) : 1; !file_exists($ca) ? $this->ca($path) : 1; !file_exists($dom) ? $this->domain($path, $domain) : 1; return !file_exists($sign) ? $this->sign($path, $domain) : 1; } } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |