diff options
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 38733cc4..9f5c009a 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -13,7 +13,7 @@ #include <stdint.h> #include <sys/types.h> #include <sys/socket.h> -#include <crypt.h> +#include <openssl/des.h> #include <time.h> #include <pthread.h> @@ -3697,15 +3697,8 @@ failure_kind uw_runCallback(uw_context ctx, void (*callback)(uw_context)) { } uw_Basis_string uw_Basis_crypt(uw_context ctx, uw_Basis_string key, uw_Basis_string salt) { - struct crypt_data *data; - - if ((data = uw_get_global(ctx, "crypt")) == NULL) { - data = malloc(sizeof(struct crypt_data)); - data->initialized = 0; - uw_set_global(ctx, "crypt", data, free); - } - - return uw_strdup(ctx, crypt_r(key, salt, data)); + char buf[14]; + return uw_strdup(ctx, DES_fcrypt(key, salt, buf)); } uw_Basis_bool uw_Basis_eq_time(uw_context ctx, uw_Basis_time t1, uw_Basis_time t2) { |