From fcc5bf1e6695c9bfa0aff8d69ebe005043397967 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 29 Jul 2015 15:09:23 -0700 Subject: Go ahead and spec out controller DB support for AuthToken -- GitHub issue #211 -- even though full implementation won't make it into 1.0.4. --- controller/SqliteNetworkController.cpp | 5 +++-- controller/schema.sql | 13 +++++++++++++ controller/schema.sql.c | 13 +++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index 50be5b34..c95d3b74 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -146,9 +146,10 @@ SqliteNetworkController::SqliteNetworkController(const char *dbPath) : // Prepare statement will fail if Config table doesn't exist, which means our DB // needs to be initialized. if (sqlite3_exec(_db,ZT_NETCONF_SCHEMA_SQL"INSERT INTO Config (k,v) VALUES ('schemaVersion',"ZT_NETCONF_SQLITE_SCHEMA_VERSION_STR");",0,0,0) != SQLITE_OK) { - //printf("%s\n",sqlite3_errmsg(_db)); + char err[1024]; + Utils::snprintf(err,sizeof(err),"SqliteNetworkController cannot initialize database and/or insert schemaVersion into Config table: %s",sqlite3_errmsg(_db)); sqlite3_close(_db); - throw std::runtime_error("SqliteNetworkController cannot initialize database and/or insert schemaVersion into Config table"); + throw std::runtime_error(err); } } diff --git a/controller/schema.sql b/controller/schema.sql index 398d63ac..48d5607c 100644 --- a/controller/schema.sql +++ b/controller/schema.sql @@ -17,6 +17,18 @@ CREATE TABLE Network ( memberRevisionCounter integer NOT NULL DEFAULT(1) ); +CREATE TABLE AuthToken ( + id integer PRIMARY KEY NOT NULL, + networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, + authMode integer NOT NULL DEFAULT(1), + useCount integer NOT NULL DEFAULT(0), + maxUses integer NOT NULL DEFAULT(0), + expiresAt integer NOT NULL DEFAULT(0), + token varchar(256) NOT NULL +); + +CREATE INDEX AuthToken_networkId_token ON AuthToken(networkId,token); + CREATE TABLE Node ( id char(10) PRIMARY KEY NOT NULL, identity varchar(4096) NOT NULL @@ -70,6 +82,7 @@ CREATE TABLE Log ( nodeId char(10) NOT NULL, ts integer NOT NULL, authorized integer NOT NULL, + authTokenId integer, version varchar(16), fromAddr varchar(64) ); diff --git a/controller/schema.sql.c b/controller/schema.sql.c index fa83f880..49c44548 100644 --- a/controller/schema.sql.c +++ b/controller/schema.sql.c @@ -18,6 +18,18 @@ " memberRevisionCounter integer NOT NULL DEFAULT(1)\n"\ ");\n"\ "\n"\ +"CREATE TABLE AuthToken (\n"\ +" id integer PRIMARY KEY NOT NULL,\n"\ +" networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,\n"\ +" authMode integer NOT NULL DEFAULT(1),\n"\ +" useCount integer NOT NULL DEFAULT(0),\n"\ +" maxUses integer NOT NULL DEFAULT(0),\n"\ +" expiresAt integer NOT NULL DEFAULT(0),\n"\ +" token varchar(256) NOT NULL\n"\ +");\n"\ +"\n"\ +"CREATE INDEX AuthToken_networkId_token ON AuthToken(networkId,token);\n"\ +"\n"\ "CREATE TABLE Node (\n"\ " id char(10) PRIMARY KEY NOT NULL,\n"\ " identity varchar(4096) NOT NULL\n"\ @@ -71,6 +83,7 @@ " nodeId char(10) NOT NULL,\n"\ " ts integer NOT NULL,\n"\ " authorized integer NOT NULL,\n"\ +" authTokenId integer,\n"\ " version varchar(16),\n"\ " fromAddr varchar(64)\n"\ ");\n"\ -- cgit v1.2.3 From 0dff741310701c7c381ebcb9ebf5f82f4c21179b Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 29 Jul 2015 15:53:05 -0700 Subject: Add border around Mac icon so it looks better in Finder. --- artwork/ZeroTierIcon-WithBorder.png | Bin 0 -> 29866 bytes artwork/ZeroTierIcon.icns | Bin 117385 -> 125598 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 artwork/ZeroTierIcon-WithBorder.png diff --git a/artwork/ZeroTierIcon-WithBorder.png b/artwork/ZeroTierIcon-WithBorder.png new file mode 100644 index 00000000..b7f06d76 Binary files /dev/null and b/artwork/ZeroTierIcon-WithBorder.png differ diff --git a/artwork/ZeroTierIcon.icns b/artwork/ZeroTierIcon.icns index 4ce98524..17e60d58 100644 Binary files a/artwork/ZeroTierIcon.icns and b/artwork/ZeroTierIcon.icns differ -- cgit v1.2.3 From fa03d50e9062fb853d7c77a1060502578886346b Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 29 Jul 2015 15:58:16 -0700 Subject: Rebuild Mac UI wrapper with smaller icon and a small UI fix. --- .../bin/ZeroTier One.app/Contents/Info.plist | 8 ++++---- .../ZeroTier One.app/Contents/MacOS/ZeroTier One | Bin 152064 -> 194640 bytes .../Contents/Resources/ZeroTierIcon.icns | Bin 117385 -> 125598 bytes .../Contents/Resources/en.lproj/MainMenu.nib | Bin 25725 -> 25733 bytes .../Contents/_CodeSignature/CodeResources | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Info.plist b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Info.plist index 15f23653..a11af6d9 100644 --- a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Info.plist +++ b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 14D136 + 14E46 CFBundleDevelopmentRegion en CFBundleExecutable @@ -27,7 +27,7 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 6D1002 + 6E35b DTPlatformVersion GM DTSDKBuild @@ -35,9 +35,9 @@ DTSDKName macosx10.10 DTXcode - 0631 + 0640 DTXcodeBuild - 6D1002 + 6E35b LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/MacOS/ZeroTier One b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/MacOS/ZeroTier One index 082bfca8..429efc0b 100755 Binary files a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/MacOS/ZeroTier One and b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/MacOS/ZeroTier One differ diff --git a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/ZeroTierIcon.icns b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/ZeroTierIcon.icns index 4ce98524..17e60d58 100644 Binary files a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/ZeroTierIcon.icns and b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/ZeroTierIcon.icns differ diff --git a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/en.lproj/MainMenu.nib b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/en.lproj/MainMenu.nib index a94e2058..4cd319b2 100644 Binary files a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/en.lproj/MainMenu.nib and b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/en.lproj/MainMenu.nib differ diff --git a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/_CodeSignature/CodeResources b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/_CodeSignature/CodeResources index 4d148897..bd79b1f3 100644 --- a/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/_CodeSignature/CodeResources +++ b/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Resources/ZeroTierIcon.icns - c0nINjNjYDIqCTiZLGdiX/EfUHY= + 430Gd+4+jnim7WxXEEugp6G+Tgk= Resources/en.lproj/Credits.rtf @@ -30,7 +30,7 @@ hash - w39AcLl09V6R06zh3yafl7/Epns= + kkFJZm0JXF9gTUF2keyMJQ9p9SY= optional @@ -49,7 +49,7 @@ Resources/ZeroTierIcon.icns - c0nINjNjYDIqCTiZLGdiX/EfUHY= + 430Gd+4+jnim7WxXEEugp6G+Tgk= Resources/en.lproj/Credits.rtf @@ -73,7 +73,7 @@ hash - w39AcLl09V6R06zh3yafl7/Epns= + kkFJZm0JXF9gTUF2keyMJQ9p9SY= optional -- cgit v1.2.3 From 7cd3c419ee720adb5acc9d754773d52ad5ceafab Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 29 Jul 2015 16:17:52 -0700 Subject: 1.0.4 release installer changes --- ext/installfiles/windows/ZeroTier One.aip | 70 +++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index 61755698..8b26171c 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -1,5 +1,5 @@ - + @@ -23,10 +23,10 @@ - + - + @@ -41,7 +41,7 @@ - + @@ -51,12 +51,12 @@ - + - + @@ -79,14 +79,14 @@ - + - - - - - + + + + + @@ -95,7 +95,7 @@ - + @@ -335,28 +335,28 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3