6 * Copyright (c) 2004, Andreas Tonnesen(andreto@olsr.org)
9 * Redistribution and use in source and binary forms, with or
10 * without modification, are permitted provided that the following
13 * * Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
19 * * Neither the name of olsrd, olsr.org nor the names of its
20 * contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 *POSSIBILITY OF SUCH DAMAGE.
39 * Dynamic linked library example for UniK OLSRd
42 #ifndef _OLSRD_SECURE_H
43 #define _OLSRD_SECURE_H
45 #include "secure_messages.h"
49 #define KEYFILE "/etc/olsrd.d/olsrd_secure_key"
52 #define ONE_CHECKSUM 1
54 /* Algorithm definitions */
55 #define SHA1_INCLUDING_KEY 1
56 #define MD5_INCLUDING_KEY 2
59 #define SIGNATURE_SIZE 20
60 #else /* USE_OPENSSL */
61 #define SIGNATURE_SIZE 16
62 #endif /* USE_OPENSSL */
69 extern char aes_key[16];
71 /* Seconds of slack allowed */
74 int secure_plugin_init(void);
76 void secure_plugin_exit(void);
78 int plugin_ipc_init(void);
80 #endif /* _OLSRD_SECURE_H */
85 * indent-tabs-mode: nil