File: schema.sql

package info (click to toggle)
moonshot-trust-router 3.5.4%2B2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 1,680 kB
  • sloc: ansic: 21,718; sh: 442; makefile: 341; sql: 6
file content (10 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
create table if not exists psk_keys_tab(keyid text primary key, key blob, client_dh_pub raw(20), key_expiration timestamp);
create table if not exists authorizations( client_dh_pub raw(20), coi string, acceptor_realm string, hostname string, apc string);
create index if not exists authorizations_dhpub on authorizations( client_dh_pub);
create view if not exists psk_keys as select * from psk_keys_tab where  datetime(key_expiration) > datetime('now');
CREATE VIEW if not exists authorizations_keys as select keyid, authorizations.* from psk_keys join authorizations on psk_keys.client_dh_pub = authorizations.client_dh_pub;
 

.quit