From 283ac3be041eebaf3267600ad897402cfb5c3fa1 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 4 Oct 2015 23:40:04 -0400 Subject: Minimal conversion to config_core_selector libhal API. Not doing anything particularly clever with the new capabilities (yet). --- p11util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'p11util.c') diff --git a/p11util.c b/p11util.c index 697b696..ca4a38c 100644 --- a/p11util.c +++ b/p11util.c @@ -272,12 +272,12 @@ static int set_pin(const char * const pin_type, const int read_from_stdin) sqlite3_column_type(q, 0) == SQLITE_NULL) lose("Couldn't retrieve PBKDF2 iteration count from SQL"); - if ((err = hal_get_random(salt, sizeof(salt))) != HAL_OK) { + if ((err = hal_get_random(NULL, salt, sizeof(salt))) != HAL_OK) { fprintf(stderr, "Couldn't generate salt: %s\n", hal_error_string(err)); goto fail; } - if ((err = hal_pbkdf2(hal_hash_sha256, (uint8_t *) pin, len, salt, sizeof(salt), + if ((err = hal_pbkdf2(NULL, hal_hash_sha256, (uint8_t *) pin, len, salt, sizeof(salt), pinbuf, sizeof(pinbuf), sqlite3_column_int(q, 0))) != HAL_OK) { fprintf(stderr, "Couldn't process new PIN: %s\n", hal_error_string(err)); goto fail; -- cgit v1.2.3