Skip to content

Commit

Permalink
Implemented creation of domain keys for certificate, not saving them
Browse files Browse the repository at this point in the history
  • Loading branch information
Wouter van Os committed Dec 9, 2015
1 parent 4625c39 commit c0973d4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions user/actions/request.html
Expand Up @@ -135,10 +135,15 @@
*/
$log->setErrorShort('Error while requesting SSL certificates');

$private = file_get_contents($domainSettingsPath . DIRECTORY_SEPARATOR . 'private.txt');
$public = file_get_contents($domainSettingsPath . DIRECTORY_SEPARATOR . 'public.txt');
$rsa = new Crypt_RSA();

$domainKeys = new KeyPair($private, $public);
$keys = $rsa->createKey(4096);

if ($keys['partialkey'] === false) {
$domainKeys = new KeyPair($keys['privatekey'], $keys['publickey']);
} else {
$log->error('CPU was to slow, we\'ve not yet coded this part.');
}

try {
$location = $acme->requestCertificate($domainKeys, [$domain]);
Expand Down

0 comments on commit c0973d4

Please sign in to comment.