move signing to take a local actor profile and use local keys

This commit is contained in:
James Walker
2010-02-26 14:21:21 -05:00
parent 3a7eef1074
commit 223ebc765c
7 changed files with 38 additions and 32 deletions

View File

@@ -67,18 +67,8 @@ class MagicEnvelope
}
public function signMessage($text, $mimetype, $signer_uri)
public function signMessage($text, $mimetype, $keypair)
{
$signer_uri = $this->normalizeUser($signer_uri);
if (!$this->checkAuthor($text, $signer_uri)) {
throw new Exception("Unable to determine entry author.");
}
$keypair = $this->getKeyPair($signer_uri);
if (!$keypair) {
throw new Exception("Unable to retrive keypair for ". $signer_uri);
}
$signature_alg = Magicsig::fromString($keypair);
$armored_text = base64_encode($text);