mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
re-implemented signature system to match the standard (orinal input, including sig for full sig; or 32k blockwise hash of input and sig from hash attached to original input without the hash), verify_buffered currently not implemented, armored sig only for output.
This commit is contained in:
@@ -95,9 +95,10 @@ void test3() {
|
||||
Signature SigA(A);
|
||||
Signature SigB(PA);
|
||||
|
||||
string sig = SigA.sign(message);
|
||||
unsigned char *sig = SigA.sign((unsigned char*)message.c_str(), message.length());
|
||||
|
||||
if(SigB.verify(sig, message) )
|
||||
// FIXME: bad api here
|
||||
if(SigB.verify(sig, message.length() + crypto_sign_BYTES) )
|
||||
cout << "3 ok" << endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,11 +129,6 @@ dxmorg@florida.cops.gov
|
||||
expect = /encrypted/
|
||||
</test>
|
||||
|
||||
<test check-determine-signature>
|
||||
cmd = $pcp -t -I unknown5
|
||||
expect = /ed25519/
|
||||
</test>
|
||||
|
||||
#
|
||||
# encryption tests
|
||||
<test check-crypto-alicia-init>
|
||||
@@ -221,7 +216,7 @@ dxmorg@florida.cops.gov
|
||||
expect-file testsig
|
||||
</test>
|
||||
<test check-verify-signature>
|
||||
cmd = $pcp -V vb -c testsig -I README
|
||||
cmd = $pcp -V vb -c -I testsig -i $idalicia
|
||||
expect = /verified/
|
||||
</test>
|
||||
|
||||
@@ -393,7 +388,7 @@ dxmorg@florida.cops.gov
|
||||
<test check-testpubkey-invalid-id>
|
||||
prepare = ./invalidkeys
|
||||
cmd = $pcp -V $vault -P -I testpubkey-invalid-id
|
||||
expect = /nvalid key id/
|
||||
expect = /(invalid key id|could not decode input)/
|
||||
</test>
|
||||
|
||||
<test check-testpubkey-wrong-serial>
|
||||
|
||||
Reference in New Issue
Block a user