diff options
Diffstat (limited to 'userspace')
| -rw-r--r-- | userspace/ncrypto.h | 2 | ||||
| -rw-r--r-- | userspace/ncrypto_key.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/userspace/ncrypto.h b/userspace/ncrypto.h index 5bcb4a7..c000761 100644 --- a/userspace/ncrypto.h +++ b/userspace/ncrypto.h @@ -66,7 +66,7 @@ int ncr_key_get_id(ncr_key_t key, void *id, size_t *id_size); int ncr_key_export(ncr_key_t key, void *idata, size_t idata_size); int ncr_key_import(ncr_key_t key, void *idata, size_t idata_size, void *id, size_t id_size, ncr_algorithm_t algorithm, unsigned int type, unsigned int flags); int ncr_key_wrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t params, ncr_key_t keytowrap, void *idata, size_t idata_size); -int ncr_key_unwrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t params, ncr_key_t keytowrap, void *idata, size_t idata_size); +int ncr_key_unwrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t params, ncr_key_t keytowrap, void *idata, size_t idata_size, ncr_algorithm_t wrapped_algorithm, unsigned int wrapped_type, unsigned int wrapped_flags); int ncr_key_storage_wrap(ncr_key_t keytowrap, void *idata, size_t idata_size); int ncr_key_storage_unwrap(ncr_key_t keytowrap, void *idata, size_t idata_size); int ncr_key_deinit(ncr_key_t key); diff --git a/userspace/ncrypto_key.c b/userspace/ncrypto_key.c index 66bbc96..ee3c4e4 100644 --- a/userspace/ncrypto_key.c +++ b/userspace/ncrypto_key.c @@ -288,7 +288,7 @@ ncr_key_wrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t par } int -ncr_key_unwrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t params, ncr_key_t keytowrap, void *idata, size_t idata_size) +ncr_key_unwrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t params, ncr_key_t keytowrap, void *idata, size_t idata_size, ncr_algorithm_t wrapped_algorithm, unsigned int wrapped_type, unsigned int wrapped_flags) { struct ncr_key_wrap_st io; memset(&io, 0, sizeof(io)); @@ -305,6 +305,9 @@ ncr_key_unwrap(ncr_key_t key, ncr_wrap_algorithm_t algorithm, ncr_key_params_t p io.keytowrap = keytowrap; io.io = idata; io.io_size = idata_size; + io.wrapped_key_algorithm = wrapped_algorithm; + io.wrapped_key_type = wrapped_type; + io.wrapped_key_flags = wrapped_flags; if (__ncr_file_descriptor < 0) { errno = EBADF; |
