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

ec.AlgorithmParametersSpi should handle ECNamedCurveSpec #138

Closed
aberenguel opened this issue Apr 8, 2016 · 1 comment
Closed

ec.AlgorithmParametersSpi should handle ECNamedCurveSpec #138

aberenguel opened this issue Apr 8, 2016 · 1 comment

Comments

@aberenguel
Copy link

The class org.bouncycastle.jcajce.provider.asymmetric.ec.AlgorithmParametersSpi not differing java.security.spec.ECParameterSpec and org.bouncycastle.jce.spec.ECNamedCurveSpec in the engineInit(AlgorithmParameterSpec algorithmParameterSpec).

Today it is

else if (algorithmParameterSpec instanceof ECParameterSpec)
{
curveName = null;
ecParameterSpec = (ECParameterSpec)algorithmParameterSpec;
}

I think it should be

else if (algorithmParameterSpec instanceof ECParameterSpec)
{
if (algorithmParameterSpec instanceof ECNamedCurveSpec) {
curveName = ((ECNamedCurveSpec) algorithmParameterSpec).getName();
} else {
curveName = null;
}
ecParameterSpec = (ECParameterSpec)algorithmParameterSpec;
}

@bcgit
Copy link
Collaborator

bcgit commented Apr 12, 2016

Agreed. Changes should appear shortly. Thanks!

@bcgit bcgit closed this as completed Apr 12, 2016
rtyley pushed a commit to rtyley/spongycastle that referenced this issue Aug 20, 2016
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