diff options
author | Rob Austein <sra@hactrn.net> | 2015-10-04 23:40:04 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-10-04 23:40:04 -0400 |
commit | 283ac3be041eebaf3267600ad897402cfb5c3fa1 (patch) | |
tree | ed7bbeee8e45c3838849c7f1f577f4717fad7d18 /p11util.c | |
parent | 9335f7d04180bb1faf9c50796d453ad884b3837b (diff) |
Minimal conversion to config_core_selector libhal API. Not doing
anything particularly clever with the new capabilities (yet).
Diffstat (limited to 'p11util.c')
-rw-r--r-- | p11util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |