From 6fbb3400ff70070dc12460c5336b201cfa275ab4 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 23 Jul 2010 09:10:28 +0200 Subject: Splitted key from key_params structure. Also separated dsa from rsa structure in params. --- ncr-key-wrap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ncr-key-wrap.c') diff --git a/ncr-key-wrap.c b/ncr-key-wrap.c index f9c019d..939c136 100644 --- a/ncr-key-wrap.c +++ b/ncr-key-wrap.c @@ -456,7 +456,7 @@ int ret; goto fail; } - ret = ncr_key_item_get_read( &key, key_lst, wrap.key.key); + ret = ncr_key_item_get_read( &key, key_lst, wrap.key); if (ret < 0) { err(); goto fail; @@ -473,10 +473,10 @@ int ret; switch(wrap.algorithm) { case NCR_WALG_AES_RFC3394: - ret = wrap_aes(wkey, key, data, wrap.key.params.cipher.iv, wrap.key.params.cipher.iv_size); + ret = wrap_aes(wkey, key, data, wrap.params.params.cipher.iv, wrap.params.params.cipher.iv_size); break; case NCR_WALG_AES_RFC5649: - ret = wrap_aes_rfc5649(wkey, key, data, wrap.key.params.cipher.iv, wrap.key.params.cipher.iv_size); + ret = wrap_aes_rfc5649(wkey, key, data, wrap.params.params.cipher.iv, wrap.params.params.cipher.iv_size); break; default: err(); @@ -513,7 +513,7 @@ int ret; return ret; } - ret = ncr_key_item_get_read( &key, key_lst, wrap.key.key); + ret = ncr_key_item_get_read( &key, key_lst, wrap.key); if (ret < 0) { err(); goto fail; @@ -530,10 +530,10 @@ int ret; switch(wrap.algorithm) { case NCR_WALG_AES_RFC3394: - ret = unwrap_aes(wkey, key, data, wrap.key.params.cipher.iv, wrap.key.params.cipher.iv_size); + ret = unwrap_aes(wkey, key, data, wrap.params.params.cipher.iv, wrap.params.params.cipher.iv_size); break; case NCR_WALG_AES_RFC5649: - ret = unwrap_aes_rfc5649(wkey, key, data, wrap.key.params.cipher.iv, wrap.key.params.cipher.iv_size); + ret = unwrap_aes_rfc5649(wkey, key, data, wrap.params.params.cipher.iv, wrap.params.params.cipher.iv_size); break; default: err(); -- cgit