Mercurial > hg > quicktun
comparison src/run.combined.c @ 42:c8d176154d7c
Added salty protocol (stateful, little overhead, PFS)
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Thu, 16 May 2013 01:19:12 +0200 |
parents | d9f5caa13898 |
children | 5685fad38195 |
comparison
equal
deleted
inserted
replaced
41:54d28a81ca99 | 42:c8d176154d7c |
---|---|
26 #include "common.c" | 26 #include "common.c" |
27 | 27 |
28 extern struct qtproto qtproto_raw; | 28 extern struct qtproto qtproto_raw; |
29 extern struct qtproto qtproto_nacl0; | 29 extern struct qtproto qtproto_nacl0; |
30 extern struct qtproto qtproto_nacltai; | 30 extern struct qtproto qtproto_nacltai; |
31 extern struct qtproto qtproto_salty; | |
31 | 32 |
32 #ifdef DEBIAN_BINARY | 33 #ifdef DEBIAN_BINARY |
33 char* getenvdeb(const char* name) { | 34 char* getenvdeb(const char* name) { |
34 char tmp[1024] = "IF_QT_"; | 35 char tmp[1024] = "IF_QT_"; |
35 if (strcmp(name, "INTERFACE") == 0) return getenv("IFACE"); | 36 if (strcmp(name, "INTERFACE") == 0) return getenv("IFACE"); |
56 return qtrun(&qtproto_raw); | 57 return qtrun(&qtproto_raw); |
57 } else if (strcmp(envval, "nacl0") == 0) { | 58 } else if (strcmp(envval, "nacl0") == 0) { |
58 return qtrun(&qtproto_nacl0); | 59 return qtrun(&qtproto_nacl0); |
59 } else if (strcmp(envval, "nacltai") == 0) { | 60 } else if (strcmp(envval, "nacltai") == 0) { |
60 return qtrun(&qtproto_nacltai); | 61 return qtrun(&qtproto_nacltai); |
62 } else if (strcmp(envval, "salty") == 0) { | |
63 return qtrun(&qtproto_salty); | |
61 } else { | 64 } else { |
62 return errorexit("Unknown PROTOCOL specified"); | 65 return errorexit("Unknown PROTOCOL specified"); |
63 } | 66 } |
64 } else if (getconf("PRIVATE_KEY")) { | 67 } else if (getconf("PRIVATE_KEY")) { |
65 fprintf(stderr, "Warning: PROTOCOL not specified, using insecure nacl0 protocol\n"); | 68 fprintf(stderr, "Warning: PROTOCOL not specified, using insecure nacl0 protocol\n"); |