forked from madeny/lhttps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMaker.php
More file actions
48 lines (36 loc) · 1.14 KB
/
Maker.php
File metadata and controls
48 lines (36 loc) · 1.14 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
<?php
namespace Madeny\lhttps;
use Madeny\lhttps\CertificateKeyCreator;
use Madeny\lhttps\CertificateAuthorityCreator;
use Madeny\lhttps\CreateDomainCertificate;
use Madeny\lhttps\CertificateSigningRequest;
use Madeny\lhttps\TrustTheRootSSLCertificate;
class Maker
{
// Generate a RSA-2048 key and save it to a file rootCA.key. This file will be used as the key to generate the Root SSL certificate. You
public static function keygen($path)
{
return new CertificateKeyCreator($path);
}
// use the key you generated to create a new Root SSL certificate. Save it to a file named rootca.pem
public static function create($path)
{
return new CertificateAuthorityCreator($path);
}
public static function domain($path, $domainOne, $domainTwo)
{
return new CreateDomainCertificate($path, $domainOne, $domainTwo);
}
public static function request($path, $domain)
{
return new CertificateSigningRequest($path, $domain);
}
public static function trust($path, $checker, $option)
{
return new TrustTheRootSSLCertificate($path, $checker, $option);
}
public static function deply($file, $path)
{
exec("sudo cp {$file} {$path}");
}
}