gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r38169 - gnunet/src/psycstore


From: gnunet
Subject: [GNUnet-SVN] r38169 - gnunet/src/psycstore
Date: Tue, 18 Oct 2016 13:28:23 +0200

Author: daniel
Date: 2016-10-18 13:28:23 +0200 (Tue, 18 Oct 2016)
New Revision: 38169

Modified:
   gnunet/src/psycstore/plugin_psycstore_postgres.c
Log:
psycstore: postgres: add LENGTH checks for signature and purpose

Modified: gnunet/src/psycstore/plugin_psycstore_postgres.c
===================================================================
--- gnunet/src/psycstore/plugin_psycstore_postgres.c    2016-10-18 10:36:46 UTC 
(rev 38168)
+++ gnunet/src/psycstore/plugin_psycstore_postgres.c    2016-10-18 11:28:23 UTC 
(rev 38169)
@@ -158,8 +158,8 @@
                               "CREATE TABLE IF NOT EXISTS messages (\n"
                               "  channel_id BIGINT NOT NULL REFERENCES 
channels(id),\n"
                               "  hop_counter INT NOT NULL,\n"
-                              "  signature BYTEA,\n"
-                              "  purpose BYTEA,\n"
+                              "  signature BYTEA CHECK 
(LENGTH(signature)=64),\n"
+                              "  purpose BYTEA CHECK (LENGTH(purpose)=8),\n"
                               "  fragment_id BIGINT NOT NULL,\n"
                               "  fragment_offset BIGINT NOT NULL,\n"
                               "  message_id BIGINT NOT NULL,\n"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]