Project

General

Profile

SQLite HOWTO » History » Version 9

Martin Willi, 30.06.2008 08:28
added definition of eap_type

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