Change key type when getting CKA_EC_PARAMS
diff --git a/library/pkcs11_client.c b/library/pkcs11_client.c
index 1e03ef1..040b971 100644
--- a/library/pkcs11_client.c
+++ b/library/pkcs11_client.c
@@ -375,7 +375,7 @@
attributes[0].type = CKA_EC_PARAMS;
attributes[0].pValue = ecParams;
attributes[0].ulValueLen = sizeof( ecParams );
- rv = C_GetAttributeValue( hSession, hPrivateKey, attributes, 1 );
+ rv = C_GetAttributeValue( hSession, hPublicKey, attributes, 1 );
if( rv != CKR_OK )
return( pkcs11_err_to_mbedtls_pk_err( rv ) );
params_asn1.tag = ecParams[0];