mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Copy gpg key in demo
This commit is contained in:
parent
5ce11ce3dd
commit
caa6ee8290
1 changed files with 10 additions and 0 deletions
|
@ -32,6 +32,16 @@ class DemoStorage extends \RainLoop\Providers\Storage\FileStorage
|
||||||
}
|
}
|
||||||
|
|
||||||
$sDataPath .= '/' . \RainLoop\Utils::fixName(\RainLoop\Utils::GetConnectionToken());
|
$sDataPath .= '/' . \RainLoop\Utils::fixName(\RainLoop\Utils::GetConnectionToken());
|
||||||
|
if (!\is_dir($sDataPath) && \mkdir($sDataPath, 0700, true)) {
|
||||||
|
\file_put_contents("{$sDataPath}/settings",'{"RemoveColors":true,"ListInlineAttachments":true}');
|
||||||
|
if (\mkdir($sDataPath.'/.gnupg/private-keys-v1.d', 0700, true)) {
|
||||||
|
\file_put_contents("{$sDataPath}/.gnupg/private-keys-v1.d/5A1A6C7310D0508C68E8E74F15068301E83FD1AE.key",file_get_contents("{$this->sDataPath}/demo.pgp/.gnupg/private-keys-v1.d/5A1A6C7310D0508C68E8E74F15068301E83FD1AE.key"));
|
||||||
|
\file_put_contents("{$sDataPath}/.gnupg/private-keys-v1.d/886921A7E06BE56F8E8C51797BB476BB26DF21BF.key",file_get_contents("{$this->sDataPath}/demo.pgp/.gnupg/private-keys-v1.d/886921A7E06BE56F8E8C51797BB476BB26DF21BF.key"));
|
||||||
|
\file_put_contents("{$sDataPath}/.gnupg/pubring.kbx",file_get_contents("{$this->sDataPath}/demo.pgp/.gnupg/pubring.kbx"));
|
||||||
|
\file_put_contents("{$sDataPath}/.gnupg/trustdb.gpg",file_get_contents("{$this->sDataPath}/demo.pgp/.gnupg/trustdb.gpg"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (StorageType::SIGN_ME === $iStorageType) {
|
if (StorageType::SIGN_ME === $iStorageType) {
|
||||||
$sDataPath .= '/.sign_me';
|
$sDataPath .= '/.sign_me';
|
||||||
} else if (StorageType::SESSION === $iStorageType) {
|
} else if (StorageType::SESSION === $iStorageType) {
|
||||||
|
|
Loading…
Reference in a new issue