Sign manifest with ephemeral and master keys (RIPD-1083)

This commit is contained in:
wilsonianb
2016-02-03 14:28:12 -08:00
committed by Edward Hennis
parent 7d46d153c6
commit b55edfa8f0
15 changed files with 262 additions and 182 deletions

View File

@@ -24,22 +24,22 @@ namespace ripple {
void
sign (STObject& st, HashPrefix const& prefix,
KeyType type, SecretKey const& sk)
KeyType type, SecretKey const& sk,
SF_Blob const& sigField)
{
Serializer ss;
ss.add32(prefix);
st.addWithoutSigningFields(ss);
set(st, sfSignature,
set(st, sigField,
sign(type, sk, ss.slice()));
}
bool
verify (STObject const& st,
HashPrefix const& prefix,
PublicKey const& pk,
bool mustBeFullyCanonical)
verify (STObject const& st, HashPrefix const& prefix,
PublicKey const& pk, bool mustBeFullyCanonical,
SF_Blob const& sigField)
{
auto const sig = get(st, sfSignature);
auto const sig = get(st, sigField);
if (! sig)
return false;
Serializer ss;