diff -up opencryptoki/usr/lib/pkcs11/ep11_stdll/ep11_specific.c.ep11 opencryptoki/usr/lib/pkcs11/ep11_stdll/ep11_specific.c --- opencryptoki/usr/lib/pkcs11/ep11_stdll/ep11_specific.c.ep11 2016-01-28 14:07:08.314440344 +0100 +++ opencryptoki/usr/lib/pkcs11/ep11_stdll/ep11_specific.c 2016-01-28 14:09:22.195368138 +0100 @@ -2765,37 +2765,6 @@ CK_RV token_specific_generate_key_pair(S private_key_obj->name, public_key_obj, private_key_obj); } - /* copy CKA_CLASS, CKA_KEY_TYPE to private template */ - if (template_attribute_find(public_key_obj->template, CKA_CLASS, &attr)) { - rc = build_attribute(attr->type, attr->pValue, - attr->ulValueLen, &n_attr); - if (rc != CKR_OK) { - EP11TOK_ELOG(1,"build_attribute failed with rc=0x%lx",rc); - goto error; - } - - rc = template_update_attribute(private_key_obj->template, n_attr); - if (rc != CKR_OK) { - EP11TOK_ELOG(1,"template_update_attribute failed with rc=0x%lx",rc); - goto error; - } - } - - if (template_attribute_find(public_key_obj->template, CKA_KEY_TYPE, &attr)) { - rc = build_attribute(attr->type, attr->pValue, - attr->ulValueLen, &n_attr); - if (rc != CKR_OK) { - EP11TOK_ELOG(1,"build_attribute failed with rc=0x%lx",rc); - goto error; - } - - rc = template_update_attribute(private_key_obj->template, n_attr); - if (rc != CKR_OK) { - EP11TOK_ELOG(1,"template_update_attribute failed with rc=0x%lx",rc); - goto error; - } - } - /* Keys should be fully constructed, * assign object handles and store keys. */