The unified diff between revisions [869f0c37..] and [e24ccc23..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'vocab.cc'
#
#
# patch "vocab.cc"
# from [6e07baffa263c80f013d474ad362c3b52c162201]
# to [0a568b1d7a988e146671055888136fdff7818916]
#
============================================================
--- vocab.cc 6e07baffa263c80f013d474ad362c3b52c162201
+++ vocab.cc 0a568b1d7a988e146671055888136fdff7818916
@@ -102,7 +102,43 @@ verify(rsa_keypair_id & val)
val.ok = true;
}
+inline void
+verify(netsync_session_key & val)
+{
+ if (val.ok)
+ return;
+ if (val().size() == 0)
+ {
+ val.s.append(constants::netsync_session_key_length_in_bytes, 0);
+ return;
+ }
+
+ N(val().size() == constants::netsync_session_key_length_in_bytes,
+ F("Invalid key length of %d bytes") % val().length());
+
+ val.ok = true;
+}
+
+inline void
+verify(netsync_hmac_value & val)
+{
+ if (val.ok)
+ return;
+
+ if (val().size() == 0)
+ {
+ val.s.append(constants::netsync_hmac_value_length_in_bytes, 0);
+ return;
+ }
+
+ N(val().size() == constants::netsync_hmac_value_length_in_bytes,
+ F("Invalid key length of %d bytes") % val().length());
+
+ val.ok = true;
+}
+
+
inline void
verify(local_path & val)
{