diff options
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/Makefile.am | 8 | ||||
-rw-r--r-- | src/daemon/daemon.c | 4 | ||||
-rw-r--r-- | src/daemon/https/Makefile.am | 27 | ||||
-rw-r--r-- | src/daemon/https/opencdk/Makefile.am | 2 | ||||
-rw-r--r-- | src/daemon/https/openpgp/gnutls_openpgp.h | 2 | ||||
-rw-r--r-- | src/daemon/https/openpgp/openpgp.h | 4 | ||||
-rw-r--r-- | src/daemon/https/tls/gnutls_priority.c | 9 | ||||
-rw-r--r-- | src/daemon/internal.h | 6 |
8 files changed, 26 insertions, 36 deletions
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index b8f586b2..d17d6072 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am | |||
@@ -37,7 +37,13 @@ libmicrohttpd_la_LDFLAGS = \ | |||
37 | if ENABLE_HTTPS | 37 | if ENABLE_HTTPS |
38 | SUBDIRS += https . | 38 | SUBDIRS += https . |
39 | libmicrohttpd_la_SOURCES += connection_https.c | 39 | libmicrohttpd_la_SOURCES += connection_https.c |
40 | libmicrohttpd_la_LIBADD += https/libhttps.la | 40 | libmicrohttpd_la_LIBADD += \ |
41 | https/x509/libx509.la \ | ||
42 | https/lgl/liblgl.la \ | ||
43 | https/tls/libtls.la \ | ||
44 | https/minitasn1/libasn1.la \ | ||
45 | https/opencdk/libopencdk.la \ | ||
46 | https/openpgp/libopenpgp.la | ||
41 | endif | 47 | endif |
42 | 48 | ||
43 | check_PROGRAMS = \ | 49 | check_PROGRAMS = \ |
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 31e4ce3b..399715db 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -161,8 +161,7 @@ _set_priority (priority_st * st, const int *list) | |||
161 | 161 | ||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | #endif /* HTTPS_SUPPORT */ | |
165 | #endif | ||
166 | 165 | ||
167 | /** | 166 | /** |
168 | * Obtain the select sets for this daemon. | 167 | * Obtain the select sets for this daemon. |
@@ -1060,6 +1059,7 @@ void __attribute__ ((destructor)) MHD_pthread_handlers_ltdl_fini () | |||
1060 | { | 1059 | { |
1061 | sigaction (SIGALRM, &old, &sig); | 1060 | sigaction (SIGALRM, &old, &sig); |
1062 | } | 1061 | } |
1062 | |||
1063 | #else | 1063 | #else |
1064 | void __attribute__ ((constructor)) MHD_win_ltdl_init () | 1064 | void __attribute__ ((constructor)) MHD_win_ltdl_init () |
1065 | { | 1065 | { |
diff --git a/src/daemon/https/Makefile.am b/src/daemon/https/Makefile.am index 4725c405..9ebb2043 100644 --- a/src/daemon/https/Makefile.am +++ b/src/daemon/https/Makefile.am | |||
@@ -1,26 +1,9 @@ | |||
1 | SUBDIRS = minitasn1 opencdk openpgp lgl x509 tls . | 1 | # placing '.' at the end of SUBDIRS having OPENPGP enabled mixes up build order ! |
2 | SUBDIRS = minitasn1 lgl x509 tls | ||
2 | 3 | ||
3 | AM_CPPFLAGS = \ | 4 | if ENABLE_OPENPGP |
4 | -I$(top_srcdir)/src/include \ | 5 | SUBDIRS += opencdk openpgp |
5 | -I$(top_srcdir)/src/daemon/https/tls \ | 6 | endif |
6 | -I$(top_srcdir)/src/daemon/https/lgl \ | ||
7 | -I$(top_srcdir)/src/daemon/https/x509 \ | ||
8 | -I$(top_srcdir)/src/daemon/https/openpgp \ | ||
9 | -I$(top_srcdir)/src/daemon/https/opencdk \ | ||
10 | -I$(top_srcdir)/src/daemon/https/includes | ||
11 | |||
12 | noinst_LTLIBRARIES = libhttps.la | ||
13 | |||
14 | libhttps_la_SOURCES = \ | ||
15 | https_common.c | ||
16 | |||
17 | libhttps_la_LIBADD = \ | ||
18 | opencdk/libopencdk.la \ | ||
19 | openpgp/libopenpgp.la \ | ||
20 | x509/libx509.la \ | ||
21 | lgl/liblgl.la \ | ||
22 | tls/libtls.la \ | ||
23 | minitasn1/libasn1.la | ||
24 | 7 | ||
25 | #noinst_PROGRAMS = errcodes | 8 | #noinst_PROGRAMS = errcodes |
26 | #errcodes_SOURCES = errcodes.c | 9 | #errcodes_SOURCES = errcodes.c |
diff --git a/src/daemon/https/opencdk/Makefile.am b/src/daemon/https/opencdk/Makefile.am index b6e67470..a9c96cfe 100644 --- a/src/daemon/https/opencdk/Makefile.am +++ b/src/daemon/https/opencdk/Makefile.am | |||
@@ -6,7 +6,7 @@ AM_CPPFLAGS = \ | |||
6 | 6 | ||
7 | noinst_LTLIBRARIES = libopencdk.la | 7 | noinst_LTLIBRARIES = libopencdk.la |
8 | 8 | ||
9 | libopencdk_la_LDFLAGS = -lgcrypt | 9 | libopencdk_la_LDFLAGS = -lgcrypt |
10 | 10 | ||
11 | libopencdk_la_SOURCES = armor.c filters.h main.c seskey.c types.h \ | 11 | libopencdk_la_SOURCES = armor.c filters.h main.c seskey.c types.h \ |
12 | cipher.c kbnode.c main.h packet.h dummy.c sig-check.c verify.c \ | 12 | cipher.c kbnode.c main.h packet.h dummy.c sig-check.c verify.c \ |
diff --git a/src/daemon/https/openpgp/gnutls_openpgp.h b/src/daemon/https/openpgp/gnutls_openpgp.h index 82e22eee..130c0077 100644 --- a/src/daemon/https/openpgp/gnutls_openpgp.h +++ b/src/daemon/https/openpgp/gnutls_openpgp.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <config.h> | 1 | #include <config.h> |
2 | 2 | ||
3 | #ifdef ENABLE_OPENPGP | 3 | #if ENABLE_OPENPGP |
4 | 4 | ||
5 | #ifndef GNUTLS_OPENPGP_H | 5 | #ifndef GNUTLS_OPENPGP_H |
6 | #define GNUTLS_OPENPGP_H | 6 | #define GNUTLS_OPENPGP_H |
diff --git a/src/daemon/https/openpgp/openpgp.h b/src/daemon/https/openpgp/openpgp.h index e4ea952b..d6ed9aae 100644 --- a/src/daemon/https/openpgp/openpgp.h +++ b/src/daemon/https/openpgp/openpgp.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include "config.h" | 4 | #include "config.h" |
5 | 5 | ||
6 | #ifdef ENABLE_OPENPGP | 6 | #if ENABLE_OPENPGP |
7 | 7 | ||
8 | #ifdef __cplusplus | 8 | #ifdef __cplusplus |
9 | extern "C" | 9 | extern "C" |
@@ -124,7 +124,7 @@ int gnutls_certificate_set_openpgp_key(gnutls_certificate_credentials_t | |||
124 | 124 | ||
125 | #ifdef __cplusplus | 125 | #ifdef __cplusplus |
126 | } | 126 | } |
127 | #endif | 127 | #endif |
128 | 128 | ||
129 | int _gnutls_map_cdk_rc(int rc); | 129 | int _gnutls_map_cdk_rc(int rc); |
130 | int gnutls_openpgp_crt_get_name(gnutls_openpgp_crt_t key, | 130 | int gnutls_openpgp_crt_get_name(gnutls_openpgp_crt_t key, |
diff --git a/src/daemon/https/tls/gnutls_priority.c b/src/daemon/https/tls/gnutls_priority.c index 29132f8a..d4f1eb6f 100644 --- a/src/daemon/https/tls/gnutls_priority.c +++ b/src/daemon/https/tls/gnutls_priority.c | |||
@@ -199,9 +199,8 @@ int | |||
199 | gnutls_certificate_type_set_priority (gnutls_session_t session, | 199 | gnutls_certificate_type_set_priority (gnutls_session_t session, |
200 | const int *list) | 200 | const int *list) |
201 | { | 201 | { |
202 | #ifdef ENABLE_OPENPGP | 202 | #if ENABLE_OPENPGP |
203 | return _set_priority (&session->internals.priorities.cert_type, list); | 203 | return _set_priority (&session->internals.priorities.cert_type, list); |
204 | |||
205 | #else | 204 | #else |
206 | 205 | ||
207 | return GNUTLS_E_UNIMPLEMENTED_FEATURE; | 206 | return GNUTLS_E_UNIMPLEMENTED_FEATURE; |
@@ -243,7 +242,7 @@ typedef void (rmadd_func) (priority_st * priority_list, int alg); | |||
243 | * @priority: is a #gnutls_priority_t structure. | 242 | * @priority: is a #gnutls_priority_t structure. |
244 | * | 243 | * |
245 | * Sets the priorities to use on the ciphers, key exchange methods, | 244 | * Sets the priorities to use on the ciphers, key exchange methods, |
246 | * macs and compression methods. | 245 | * macs and compression methods. |
247 | * | 246 | * |
248 | * On success 0 is returned. | 247 | * On success 0 is returned. |
249 | * | 248 | * |
@@ -288,7 +287,7 @@ gnutls_priority_set (gnutls_session_t session, gnutls_priority_t priority) | |||
288 | * "NORMAL" option enables all "secure" ciphersuites. The 256-bit ciphers | 287 | * "NORMAL" option enables all "secure" ciphersuites. The 256-bit ciphers |
289 | * are included as a fallback only. The ciphers are sorted by security margin. | 288 | * are included as a fallback only. The ciphers are sorted by security margin. |
290 | * | 289 | * |
291 | * "SECURE128" flag enables all "secure" ciphersuites with ciphers up to | 290 | * "SECURE128" flag enables all "secure" ciphersuites with ciphers up to |
292 | * 128 bits, sorted by security margin. | 291 | * 128 bits, sorted by security margin. |
293 | * | 292 | * |
294 | * "SECURE256" flag enables all "secure" ciphersuites including the 256 bit | 293 | * "SECURE256" flag enables all "secure" ciphersuites including the 256 bit |
@@ -316,7 +315,7 @@ gnutls_priority_set (gnutls_session_t session, gnutls_priority_t priority) | |||
316 | * are enabled (except for the RSA-EXPORT which is only enabled in | 315 | * are enabled (except for the RSA-EXPORT which is only enabled in |
317 | * EXPORT level). | 316 | * EXPORT level). |
318 | * | 317 | * |
319 | * Note that although one can select very long key sizes (such as 256 bits) | 318 | * Note that although one can select very long key sizes (such as 256 bits) |
320 | * for symmetric algorithms, to actually increase security the public key | 319 | * for symmetric algorithms, to actually increase security the public key |
321 | * algorithms have to use longer key sizes as well. | 320 | * algorithms have to use longer key sizes as well. |
322 | * | 321 | * |
diff --git a/src/daemon/internal.h b/src/daemon/internal.h index 45f6ecc9..efec4b4e 100644 --- a/src/daemon/internal.h +++ b/src/daemon/internal.h | |||
@@ -35,19 +35,21 @@ | |||
35 | #include <errno.h> | 35 | #include <errno.h> |
36 | #include <fcntl.h> | 36 | #include <fcntl.h> |
37 | #include <signal.h> | 37 | #include <signal.h> |
38 | #include "gnutls.h" | 38 | #include <pthread.h> |
39 | 39 | ||
40 | #include "config.h" | 40 | #include "config.h" |
41 | #include "plibc.h" | 41 | #include "plibc.h" |
42 | #include "microhttpd.h" | 42 | #include "microhttpd.h" |
43 | 43 | ||
44 | #include "gnutls.h" | ||
45 | |||
44 | #ifndef MINGW | 46 | #ifndef MINGW |
45 | #include <sys/mman.h> | 47 | #include <sys/mman.h> |
46 | #include <netdb.h> | 48 | #include <netdb.h> |
47 | #include <netinet/in.h> | 49 | #include <netinet/in.h> |
48 | #endif | 50 | #endif |
49 | 51 | ||
50 | #include <pthread.h> | 52 | |
51 | 53 | ||
52 | #define MHD_MAX(a,b) ((a)<(b)) ? (b) : (a) | 54 | #define MHD_MAX(a,b) ((a)<(b)) ? (b) : (a) |
53 | #define MHD_MIN(a,b) ((a)<(b)) ? (a) : (b) | 55 | #define MHD_MIN(a,b) ((a)<(b)) ? (a) : (b) |