… | |
… | |
60 | #include "conf.h" |
60 | #include "conf.h" |
61 | #include "slog.h" |
61 | #include "slog.h" |
62 | #include "util.h" |
62 | #include "util.h" |
63 | #include "vpn.h" |
63 | #include "vpn.h" |
64 | #include "ev_cpp.h" |
64 | #include "ev_cpp.h" |
|
|
65 | #include "hkdf.h" |
65 | |
66 | |
66 | static loglevel llevel = L_NONE; |
67 | static loglevel llevel = L_NONE; |
67 | |
68 | |
68 | /* If nonzero, display usage information and exit. */ |
69 | /* If nonzero, display usage information and exit. */ |
69 | static int show_help; |
70 | static int show_help; |
… | |
… | |
258 | int |
259 | int |
259 | main (int argc, char **argv, char **envp) |
260 | main (int argc, char **argv, char **envp) |
260 | { |
261 | { |
261 | ERR_load_crypto_strings (); // we have the RAM |
262 | ERR_load_crypto_strings (); // we have the RAM |
262 | |
263 | |
|
|
264 | require (EVP_MD_size (MAC_DIGEST ()) == HASH_SIZE (MAC_DIGEST )); |
|
|
265 | require (EVP_MD_size (AUTH_DIGEST ()) == HASH_SIZE (AUTH_DIGEST)); |
|
|
266 | require (EVP_CIPHER_key_length (CIPHER ()) == KEY_SIZE (CIPHER )); |
|
|
267 | require (EVP_CIPHER_block_size (CIPHER ()) == BLOCK_SIZE (CIPHER )); |
|
|
268 | |
|
|
269 | curve25519_verify (); |
|
|
270 | hkdf::verify (); |
|
|
271 | |
263 | set_loglevel (L_INFO); |
272 | set_loglevel (L_INFO); |
264 | set_identity (argv[0]); |
273 | set_identity (argv[0]); |
265 | log_to (LOGTO_SYSLOG | LOGTO_STDERR); |
274 | log_to (LOGTO_SYSLOG | LOGTO_STDERR); |
266 | |
275 | |
267 | setlocale (LC_ALL, ""); |
276 | setlocale (LC_ALL, ""); |