Finish crypto wrapping. Also provide wrappers for OpenSSL.

Disable libgcrypt by default. Since it doesn't support the OFB cipher mode,
we can't use it in a backwards compatible way.
This commit is contained in:
Guus Sliepen 2007-05-23 13:45:49 +00:00
parent f42e57f663
commit 1b8f891836
28 changed files with 951 additions and 497 deletions

View file

@ -31,18 +31,13 @@
#include <sys/mman.h>
#endif
#include <openssl/rand.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/engine.h>
#include LZO1X_H
#include <getopt.h>
#include "conf.h"
#include "control.h"
#include "crypto.h"
#include "device.h"
#include "logger.h"
#include "net.h"
@ -294,12 +289,7 @@ int main(int argc, char **argv)
/* Slllluuuuuuurrrrp! */
srand(time(NULL));
RAND_load_file("/dev/urandom", 1024);
ENGINE_load_builtin_engines();
ENGINE_register_all_complete();
OpenSSL_add_all_algorithms();
crypto_init();
if(!read_server_config())
return 1;
@ -352,7 +342,7 @@ end:
exit_control();
#endif
EVP_cleanup();
crypto_exit();
return status;
}