Project

General

Profile

SQLite HOWTO » History » Version 11

Andreas Steffen, 01.05.2009 19:59
removed underscore character

1 9 Martin Willi
h1. SQLite HOWTO
2 9 Martin Willi
3 9 Martin Willi
4 1 Martin Willi
SQLite tables defined in [browser:trunk/testing/hosts/default/etc/ipsec.d/tables.sql tables.sql]
5 1 Martin Willi
6 1 Martin Willi
7 9 Martin Willi
h2. TABLE identities
8 1 Martin Willi
9 9 Martin Willi
10 9 Martin Willi
*type* defined in [browser:trunk/src/libstrongswan/utils/identification.h#L58 identification.h]
11 1 Martin Willi
12 10 Andreas Steffen
|  0|ID_ANY              |matches any id                       |right=%any                                             |
13 10 Andreas Steffen
|  1|ID_IPV4_ADDR        |IPv4 address                         |right=192.168.0.1                                      |
14 10 Andreas Steffen
|  2|ID_FQDN             |fully qualified domain name          |right=@moon.strongswan.org                             |
15 10 Andreas Steffen
|  3|ID_RFC822_ADDR      |RFC822 email address                 |right=carol@strongswan.org                             |
16 10 Andreas Steffen
|  5|ID_IPV6_ADDR        |IPv6 address                         |right=fec0::1                                          |
17 10 Andreas Steffen
|  9|ID_DER_ASN1_DN      |ASN.1 distinguished name             |right=C=CH, O=Linux strongSwan, CN=moon.strongswan.org |
18 10 Andreas Steffen
| 11|ID_KEY_ID           |opaque octet string                  |right=@#e5e410876c2ac4bead854942a6de7658303a9fc1       |
19 10 Andreas Steffen
|202|ID_PUBKEY_INFO_SHA1 |SHA-1 hash over subjectPublicKeyInfo |                                                       |
20 10 Andreas Steffen
|203|ID_PUBKEY_SHA1      |SHA-1 hash over subjectPublicKey     |                                                       |
21 1 Martin Willi
22 9 Martin Willi
*ID_ANY*: scripts/id2sql "%any"
23 1 Martin Willi
24 9 Martin Willi
<pre>
25 1 Martin Willi
INSERT INTO identities (
26 6 Martin Willi
  type, data
27 6 Martin Willi
) VALUES (
28 9 Martin Willi
  0, X_
29 7 Martin Willi
 );
30 9 Martin Willi
</pre>
31 1 Martin Willi
32 9 Martin Willi
*ID_IPV4_ADDR*: scripts/id2sql "192.168.0.1"
33 6 Martin Willi
34 9 Martin Willi
<pre>
35 6 Martin Willi
INSERT INTO identities (
36 6 Martin Willi
  type, data
37 1 Martin Willi
) VALUES (
38 1 Martin Willi
  1, X'c0a80001'
39 1 Martin Willi
 );
40 9 Martin Willi
</pre>
41 7 Martin Willi
42 9 Martin Willi
*ID_FQDN*: scripts/id2sql "@moon.strongswan.org"
43 6 Martin Willi
44 9 Martin Willi
<pre>
45 1 Martin Willi
INSERT INTO identities (
46 1 Martin Willi
  type, data
47 6 Martin Willi
) VALUES (
48 6 Martin Willi
  2, X'6d6f6f6e2e7374726f6e677377616e2e6f7267'
49 6 Martin Willi
 );
50 9 Martin Willi
</pre>
51 1 Martin Willi
52 9 Martin Willi
*ID_RFC822_ADDR*: scripts/id2sql "carol@strongswan.org"
53 1 Martin Willi
54 9 Martin Willi
<pre>
55 6 Martin Willi
INSERT INTO identities (
56 6 Martin Willi
  type, data
57 6 Martin Willi
) VALUES (
58 1 Martin Willi
  3, X'6361726f6c407374726f6e677377616e2e6f7267'
59 1 Martin Willi
 );
60 9 Martin Willi
</pre>
61 6 Martin Willi
62 9 Martin Willi
*ID_IPV6_ADDR*: scripts/id2sql "fec0::1"
63 6 Martin Willi
64 9 Martin Willi
<pre>
65 1 Martin Willi
INSERT INTO identities (
66 1 Martin Willi
  type, data
67 1 Martin Willi
) VALUES (
68 6 Martin Willi
  5, X'fec00000000000000000000000000001'
69 6 Martin Willi
 );
70 9 Martin Willi
</pre>
71 6 Martin Willi
72 9 Martin Willi
*ID_DER_ASN1_DN*: scripts/id2sql "C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
73 1 Martin Willi
74 9 Martin Willi
<pre>
75 1 Martin Willi
INSERT INTO identities (
76 1 Martin Willi
  type, data
77 1 Martin Willi
) VALUES (
78 1 Martin Willi
  9, X'3046310b300906035504061302434831193017060355040a13104c696e7578207374726f6e675377616e311c301a060355040313136d6f6f6e2e7374726f6e677377616e2e6f7267'
79 1 Martin Willi
 );
80 9 Martin Willi
</pre>
81 1 Martin Willi
82 9 Martin Willi
*ID_KEY_ID*: scripts/id2sql "@#e5e410876c2ac4bead854942a6de7658303a9fc1"
83 1 Martin Willi
84 9 Martin Willi
<pre>
85 7 Martin Willi
INSERT INTO identities (
86 7 Martin Willi
  type, data
87 7 Martin Willi
) VALUES (
88 7 Martin Willi
  11, X'e5e410876c2ac4bead854942a6de7658303a9fc1'
89 1 Martin Willi
 );
90 9 Martin Willi
</pre>
91 7 Martin Willi
92 9 Martin Willi
*ID_PUBKEY_INFO_SHA1*: scripts/key2keyid moonKey.der
93 1 Martin Willi
94 9 Martin Willi
<pre>
95 7 Martin Willi
INSERT INTO identities (
96 7 Martin Willi
  type, data
97 7 Martin Willi
) VALUES (
98 1 Martin Willi
  202, X'd70dbd46d5133519064f12f100525ead0802ca95'
99 1 Martin Willi
 );
100 9 Martin Willi
</pre>
101 1 Martin Willi
102 9 Martin Willi
*ID_PUBKEY_SHA1*: scripts/key2keyid moonKey.der
103 1 Martin Willi
104 9 Martin Willi
<pre>
105 1 Martin Willi
INSERT INTO identities (
106 7 Martin Willi
  type, data
107 7 Martin Willi
) VALUES (
108 1 Martin Willi
  203, X'e5e410876c2ac4bead854942a6de7658303a9fc1'
109 1 Martin Willi
 );
110 9 Martin Willi
</pre>
111 1 Martin Willi
112 1 Martin Willi
113 9 Martin Willi
h2. TABLE private_keys
114 7 Martin Willi
115 1 Martin Willi
116 9 Martin Willi
*type* defined in [browser:trunk/src/libstrongswan/credentials/keys/public_key.h#L37 public_key.h]
117 9 Martin Willi
118 10 Andreas Steffen
|1 |KEY_RSA   |RSA key in PKCS!#1 format      |
119 10 Andreas Steffen
|2 |KEY_ECDSA |ECDSA key in ANSI X9.62 format |
120 7 Martin Willi
121 7 Martin Willi
122 9 Martin Willi
h2. TABLE certificates
123 3 Martin Willi
124 1 Martin Willi
125 9 Martin Willi
*type* defined in [browser:trunk/src/libstrongswan/credentials/certificates/certificate.h#L35 certificate.h]
126 9 Martin Willi
127 10 Andreas Steffen
|1 |CERT_X509           |X.509 certificate                 |
128 10 Andreas Steffen
|2 |CERT_X509_CRL       |X.509 certificate revocation list |
129 10 Andreas Steffen
|5 |CERT_X509_AC        |X.509 attribute certificate       |
130 10 Andreas Steffen
|6 |CERT_TRUSTED_PUBKEY |trusted public key                |
131 1 Martin Willi
132 9 Martin Willi
*keytype* defined in [browser:trunk/src/libstrongswan/credentials/keys/public_key.h#L37 public_key.h]
133 3 Martin Willi
134 1 Martin Willi
135 9 Martin Willi
h2. TABLE shared_secrets
136 3 Martin Willi
137 9 Martin Willi
138 9 Martin Willi
*type* defined in [browser:trunk/src/libstrongswan/credentials/keys/shared_key.h#L33 shared_key.h]
139 9 Martin Willi
140 10 Andreas Steffen
|1 |SHARED_IKE              |: PSK <secret>           |
141 10 Andreas Steffen
|2 |SHARED_EAP              |: EAP <secret>           |
142 10 Andreas Steffen
|3 |SHARED_PRIVATE_KEY_PASS |: RSA <keyfile> <secret> |
143 10 Andreas Steffen
|4 |SHARED_PIN              |: PIN <secret>           |
144 4 Martin Willi
145 4 Martin Willi
146 9 Martin Willi
h2. TABLE peer_configs
147 3 Martin Willi
148 3 Martin Willi
149 9 Martin Willi
*auth_method* defined in [browser:trunk/src/charon/config/peer_cfg.h#L87 peer_cfg.h]
150 4 Martin Willi
151 11 Andreas Steffen
|1 |CONF_AUTH_PUBKEY |authentication using public key        |authby=rsasig, authby=ecdsasig |
152 11 Andreas Steffen
|2 |CONF_AUTH_PSK    |authentication using pre-shared secret |authby=psk                     |
153 11 Andreas Steffen
|3 |CONF_AUTH_EAP    |authentication using EAP               |authby=eap                     |
154 9 Martin Willi
155 9 Martin Willi
*eap_type* defined in [browser:trunk/src/charon/sa/authenticators/eap/eap_method.h#L50 eap_method.h]
156 9 Martin Willi
157 10 Andreas Steffen
| 4 |EAP_MD5 |
158 10 Andreas Steffen
|18 |EAP_SIM |
159 10 Andreas Steffen
|23 |EAP_AKA |
160 8 Martin Willi
161 8 Martin Willi
162 9 Martin Willi
h2. TABLE traffic_selectors
163 9 Martin Willi
164 9 Martin Willi
165 9 Martin Willi
*type* defined in [browser:trunk/src/charon/config/traffic_selector.h#L37 traffic_selector.h]
166 1 Martin Willi
167 10 Andreas Steffen
|7 |TS_IPV4_ADDR_RANGE |
168 10 Andreas Steffen
|8 |TS_IPV6_ADDR_RANGE |