Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKA_EC_PARAMS of Key objects is always set to P256 curve #303

Open
sake opened this issue May 31, 2024 · 0 comments
Open

CKA_EC_PARAMS of Key objects is always set to P256 curve #303

sake opened this issue May 31, 2024 · 0 comments

Comments

@sake
Copy link
Contributor

sake commented May 31, 2024

The Object.attribute function always returns a fixed value of the P256 curve OID (see following code excerpt).
This is obviously wrong for non P256 keys and leads to errors when using the module with at least pkcs11-tool.

AttributeType::EcParams => {
    Some(Attribute::EcParams(p256::NistP256::OID.to_der().ok()?))
}

The real information about the key could be found in the certificate (SubjectPublicKeyInfo), but that is not available in the PrivateKey and PublicKey trait.

Maybe the Key objects could be extended to provide this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant