X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=user_list.c;h=9db08715348f2e7df954d5371a106e4b5b347d40;hp=b2d2ff5ec0a30ebcefd93278d5db24e545e72232;hb=a4c2c4f9c7cd580252917729a65d482de3c14a97;hpb=ee7c57f8dc4edfdc91f2f8657b6429d90ab13e79 diff --git a/user_list.c b/user_list.c index b2d2ff5e..9db08715 100644 --- a/user_list.c +++ b/user_list.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2006 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2006 Andre Noll , see file COPYING. */ /** \file user_list.c User handling for para_server. */ @@ -48,22 +44,22 @@ static void populate_user_list(char *user_list_file) if (strcmp(w, "user")) continue; PARA_DEBUG_LOG("found entry for user %s\n", n); - ret = get_public_key(k, &pubkey); + ret = apc_get_pubkey(k, &pubkey); if (ret < 0) { PARA_NOTICE_LOG("skipping entry for user %s: %s\n", n, para_strerror(-ret)); continue; } /* - * In order to encrypt len := CHALLENGE_SIZE + 2 * SESSION_KEY_LEN + * In order to encrypt len := APC_CHALLENGE_SIZE + 2 * SESSION_KEY_LEN * bytes using RSA_public_encrypt() with EME-OAEP padding mode, * RSA_size(rsa) must be greater than len + 41. So ignore keys * which are too short. For details see RSA_public_encrypt(3). */ - if (ret <= CHALLENGE_SIZE + 2 * SESSION_KEY_LEN + 41) { + if (ret <= APC_CHALLENGE_SIZE + 2 * SESSION_KEY_LEN + 41) { PARA_WARNING_LOG("public key %s too short (%d)\n", k, ret); - free_public_key(pubkey); + apc_free_pubkey(pubkey); continue; } u = para_malloc(sizeof(*u)); @@ -114,7 +110,7 @@ void init_user_list(char *user_list_file) list_for_each_entry_safe(u, tmp, &user_list, node) { list_del(&u->node); free(u->name); - free_public_key(u->pubkey); + apc_free_pubkey(u->pubkey); free(u); } } else