mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-26 04:18:29 +02:00
Update escrow.php
This commit is contained in:
parent
b8c903b638
commit
26007b15bc
1 changed files with 4 additions and 8 deletions
|
@ -557,11 +557,9 @@ try {
|
||||||
|
|
||||||
$gpg->clearencryptkeys();
|
$gpg->clearencryptkeys();
|
||||||
$gpg->clearsignkeys();
|
$gpg->clearsignkeys();
|
||||||
$gpg->setarmor(true);
|
$gpg->setsignmode(GNUPG_SIG_MODE_DETACH);
|
||||||
$gpg->setsignmode(gnupg::SIG_MODE_DETACH);
|
|
||||||
|
|
||||||
// Use preloaded, trusted private key
|
|
||||||
$gpg->addsignkey($c['escrow_signing_fingerprint']);
|
$gpg->addsignkey($c['escrow_signing_fingerprint']);
|
||||||
|
$gpg->setarmor(false);
|
||||||
|
|
||||||
// Read encrypted file
|
// Read encrypted file
|
||||||
$encryptedFileContents = file_get_contents($encryptedFilePath);
|
$encryptedFileContents = file_get_contents($encryptedFilePath);
|
||||||
|
@ -907,7 +905,7 @@ try {
|
||||||
// Initialize the GnuPG object
|
// Initialize the GnuPG object
|
||||||
$gpg = new gnupg();
|
$gpg = new gnupg();
|
||||||
$gpg->seterrormode(GNUPG::ERROR_EXCEPTION);
|
$gpg->seterrormode(GNUPG::ERROR_EXCEPTION);
|
||||||
$gpg->setarmor(true);
|
$gpg->setarmor(false);
|
||||||
|
|
||||||
// Import BRDA escrow public key
|
// Import BRDA escrow public key
|
||||||
$brdaPublicKeyData = file_get_contents($c['escrow_keyPath_brda']);
|
$brdaPublicKeyData = file_get_contents($c['escrow_keyPath_brda']);
|
||||||
|
@ -940,11 +938,9 @@ try {
|
||||||
|
|
||||||
$gpg->clearencryptkeys(); // ensure clean context
|
$gpg->clearencryptkeys(); // ensure clean context
|
||||||
$gpg->clearsignkeys();
|
$gpg->clearsignkeys();
|
||||||
$gpg->setarmor(true);
|
|
||||||
$gpg->setsignmode(GNUPG_SIG_MODE_DETACH);
|
$gpg->setsignmode(GNUPG_SIG_MODE_DETACH);
|
||||||
|
|
||||||
// Import signing private key
|
|
||||||
$gpg->addsignkey($c['escrow_signing_fingerprint']);
|
$gpg->addsignkey($c['escrow_signing_fingerprint']);
|
||||||
|
$gpg->setarmor(false);
|
||||||
|
|
||||||
// Sign the BRDA .ryde file
|
// Sign the BRDA .ryde file
|
||||||
$brdaFileData = file_get_contents($encryptedFilePathBrda);
|
$brdaFileData = file_get_contents($encryptedFilePathBrda);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue