Project

General

Profile

SQLite HOWTO » History » Version 8

Martin Willi, 30.06.2008 08:28
added definition of eap_type

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