From f7de7ff5927fe3fd5bc2fd6f5aaa9a582f528d29 Mon Sep 17 00:00:00 2001 From: core Date: Mon, 25 Dec 2023 18:50:42 -0500 Subject: [PATCH] add server private signing keys to HostKey --- .../2023-12-24-222227_create_table_host_keys/up.sql | 4 ++++ trifid-api/src/models.rs | 6 +++++- trifid-api/src/schema.rs | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/trifid-api/migrations/2023-12-24-222227_create_table_host_keys/up.sql b/trifid-api/migrations/2023-12-24-222227_create_table_host_keys/up.sql index e61c0c3..9806e7b 100644 --- a/trifid-api/migrations/2023-12-24-222227_create_table_host_keys/up.sql +++ b/trifid-api/migrations/2023-12-24-222227_create_table_host_keys/up.sql @@ -7,5 +7,9 @@ CREATE TABLE host_keys ( client_dh_pub bytea NOT NULL, client_cert bytea NOT NULL, + salt bytea NOT NULL, + info bytea NOT NULL, + server_ed_priv bytea NOT NULL, + UNIQUE (host_id, counter) ); \ No newline at end of file diff --git a/trifid-api/src/models.rs b/trifid-api/src/models.rs index 4293d64..301f911 100644 --- a/trifid-api/src/models.rs +++ b/trifid-api/src/models.rs @@ -1,7 +1,7 @@ use diesel::{Associations, Identifiable, Insertable, Queryable, Selectable}; use serde::{Deserialize, Serialize}; use serde_json::Value; -use std::ops::{Bound, Range}; +use std::ops::Bound; use std::time::SystemTime; #[derive( @@ -337,6 +337,10 @@ pub struct HostKey { pub client_ed_pub: Vec, pub client_dh_pub: Vec, pub client_cert: Vec, + + pub salt: Vec, + pub info: Vec, + pub server_ed_priv: Vec } #[derive( diff --git a/trifid-api/src/schema.rs b/trifid-api/src/schema.rs index 770dac9..3722f1f 100644 --- a/trifid-api/src/schema.rs +++ b/trifid-api/src/schema.rs @@ -24,6 +24,9 @@ diesel::table! { client_ed_pub -> Bytea, client_dh_pub -> Bytea, client_cert -> Bytea, + salt -> Bytea, + info -> Bytea, + server_ed_priv -> Bytea, } }