diff options
author | Rob Austein <sra@hactrn.net> | 2017-04-08 20:01:56 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2017-04-08 20:01:56 -0400 |
commit | af9cedc2515a6851716bd2ccc1857937d7f5c495 (patch) | |
tree | fd7351f8c60e172c2d729795a604619e2ca51e3f | |
parent | f88ab56a8d9d7ecaffae692073769080eab827a4 (diff) |
Track API changes in sw/libhal pkcs8 branch.
-rw-r--r-- | pkcs11.c | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -1213,8 +1213,7 @@ static int p11_object_create_rsa_public_key(const p11_session_t * const session, ok = (hal_check(hal_rsa_public_key_to_der(key, der, NULL, sizeof(der))) && hal_check(hal_rpc_pkey_load(p11_session_hal_client(session), p11_session_hal_session(session), - &pkey, HAL_KEY_TYPE_RSA_PUBLIC, HAL_CURVE_NONE, - &uuid, der, sizeof(der), flags))); + &pkey, &uuid, der, sizeof(der), flags))); } if (ok) @@ -1275,8 +1274,7 @@ static int p11_object_create_ec_public_key(const p11_session_t * const session, ok = (hal_check(hal_ecdsa_public_key_to_der(key, der, NULL, sizeof(der))) && hal_check(hal_rpc_pkey_load(p11_session_hal_client(session), p11_session_hal_session(session), - &pkey, HAL_KEY_TYPE_EC_PUBLIC, curve, - &uuid, der, sizeof(der), flags))); + &pkey, &uuid, der, sizeof(der), flags))); } if (ok) @@ -1355,9 +1353,7 @@ static int p11_object_create_rsa_private_key(const p11_session_t * const session ok = (hal_check(hal_rsa_private_key_to_der(key, der, NULL, sizeof(der))) && hal_check(hal_rpc_pkey_load(p11_session_hal_client(session), p11_session_hal_session(session), - &pkey, HAL_KEY_TYPE_RSA_PRIVATE, - HAL_CURVE_NONE, &uuid, - der, sizeof(der), flags))); + &pkey, &uuid, der, sizeof(der), flags))); memset(der, 0, sizeof(der)); } @@ -1429,8 +1425,7 @@ static int p11_object_create_ec_private_key(const p11_session_t * const session, ok = (hal_check(hal_ecdsa_private_key_to_der(key, der, NULL, sizeof(der))) && hal_check(hal_rpc_pkey_load(p11_session_hal_client(session), p11_session_hal_session(session), - &pkey, HAL_KEY_TYPE_EC_PRIVATE, curve, - &uuid, der, sizeof(der), flags))); + &pkey, &uuid, der, sizeof(der), flags))); memset(der, 0, sizeof(der)); } @@ -1963,8 +1958,7 @@ static CK_RV generate_keypair_rsa_pkcs(p11_session_t *session, !hal_check(hal_rsa_public_key_from_der(&key, keybuf, sizeof(keybuf), der, der_len)) || !hal_check(hal_rpc_pkey_load(p11_session_hal_client(session), p11_session_hal_session(session), - &public_pkey, HAL_KEY_TYPE_RSA_PUBLIC, HAL_CURVE_NONE, - &public_uuid, der, der_len, public_flags)) || + &public_pkey, &public_uuid, der, der_len, public_flags)) || !hal_check(hal_rsa_key_get_modulus(key, NULL, &modulus_len, 0))) lose(CKR_FUNCTION_FAILED); @@ -2064,8 +2058,7 @@ static CK_RV generate_keypair_ec(p11_session_t *session, !hal_check(hal_ecdsa_public_key_from_der(&key, keybuf, sizeof(keybuf), der, der_len)) || !hal_check(hal_rpc_pkey_load(p11_session_hal_client(session), p11_session_hal_session(session), - &public_pkey, HAL_KEY_TYPE_EC_PUBLIC, curve, - &public_uuid, der, der_len, public_flags))) + &public_pkey, &public_uuid, der, der_len, public_flags))) lose(CKR_FUNCTION_FAILED); uint8_t point[hal_ecdsa_key_to_ecpoint_len(key)]; |