File: schema.sql

package info (click to toggle)
yubikey-server-c 0.5-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 424 kB
  • sloc: sh: 1,113; ansic: 700; sql: 21; makefile: 7
file content (29 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

-- --
-- This should work with at least PostgreSQL.  Maybe more --
-- --

CREATE TABLE yubikey (
       yubikey_id serial NOT NULL,
       active boolean NOT NULL DEFAULT 'f',
       public_id varchar, -- fixed public bit of the key's output, modhex encoded
       secret_uid bytea NOT NULL, -- secret uid bit of the key
       secret_key bytea NOT NULL, 
       session_counter int,
       session_use int
);

INSERT INTO yubikey (active, public_id,
       secret_uid, secret_key, session_counter, session_use) VALUES 
       ('t', 'tfheen', 
       E'\\000\\000\\000\\000\\000\\000',
       decode('baef43c254e9d2217912e80ed71a7b4a', 'hex'),
       0, 0);

CREATE TABLE shared_secret (
       secret_id serial NOT NULL,
       secret bytea NOT NULL,
       active boolean NOT NULL DEFAULT 'f'
);

INSERT INTO shared_secret (secret, active) VALUES (decode('MQ6fOy1t/add/wisbu2O+LpPiMs=', 'base64'), 't');