Skip to content

Commit

Permalink
Merge d6b8e63 into 1e9cc03
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Dec 18, 2015
2 parents 1e9cc03 + d6b8e63 commit 970b22c
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: php
php:
- 5.6
- 7.0

addons:
postgresql: "9.3"
Expand Down
14 changes: 10 additions & 4 deletions api/app/Console/Commands/GenerateKeysCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,21 @@ public function __construct(Filesystem $file)
*/
public function handle()
{
$rsa = new \Crypt_RSA();
$keys = $rsa->createKey();
$res = openssl_pkey_new();

// Get private key
openssl_pkey_export($res, $privateKey);

// Get public key
$publicKey = openssl_pkey_get_details($res);
$publicKey = $publicKey['key'];

if (! $this->file->exists(storage_path('app/keys'))) {
$this->file->makeDirectory(storage_path('app/keys'));
}

$this->file->put(storage_path('app/keys/private.pem'), $keys['privatekey']);
$this->file->put(storage_path('app/keys/public.pem'), $keys['publickey']);
$this->file->put(storage_path('app/keys/private.pem'), $privateKey);
$this->file->put(storage_path('app/keys/public.pem'), $publicKey);

return 0;
}
Expand Down
12 changes: 8 additions & 4 deletions forum/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "project",
"require": {
"vanilla/vanilla": "2.2-b1",
"vanilla/vanilla": "dev-master",
"vanilla/addons": "1.4.5",
"kasperisager/vanilla-api": "0.4.0"
},
Expand All @@ -14,9 +14,9 @@
"type": "package",
"package": {
"name": "vanilla/vanilla",
"version": "2.2-b1",
"version": "dev-master",
"dist": {
"url": "https://github.com/vanilla/vanilla/archive/Vanilla_2.2b1.zip",
"url": "https://github.com/vanilla/vanilla/archive/b8b3bc7a64850389bd57ee770a199d5874775686.zip",
"type": "zip"
}
}
Expand Down Expand Up @@ -84,7 +84,11 @@
},
"scripts": {
"build-forum": "Spira\\Build::buildForum",
"post-install-cmd": "Spira\\Build::postInstall",
"post-install-cmd": [
"Spira\\Build::postInstall",
"composer install --working-dir public",
"Spira\\Build::buildForum"
],
"post-update-cmd": ""
}
}
Loading

0 comments on commit 970b22c

Please sign in to comment.