mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8282158: ECParameters InvalidParameterSpecException messages missed ECKeySizeParameterSpec
Reviewed-by: xuelei
This commit is contained in:
parent
4e0b81c596
commit
52a85d8048
1 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -23,7 +23,7 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
package sun.security.util;
|
||||
package java.security;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -122,8 +122,9 @@ public final class ECParameters extends AlgorithmParametersSpi {
|
|||
int keySize = ((ECKeySizeParameterSpec)paramSpec).getKeySize();
|
||||
namedCurve = CurveDB.lookup(keySize);
|
||||
} else {
|
||||
throw new InvalidParameterSpecException
|
||||
("Only ECParameterSpec and ECGenParameterSpec supported");
|
||||
throw new InvalidParameterSpecException(
|
||||
"Only ECParameterSpec, ECGenParameterSpec " +
|
||||
"and ECKeySizeParameterSpec supported");
|
||||
}
|
||||
|
||||
if (namedCurve == null) {
|
||||
|
@ -213,7 +214,8 @@ public final class ECParameters extends AlgorithmParametersSpi {
|
|||
}
|
||||
|
||||
throw new InvalidParameterSpecException(
|
||||
"Only ECParameterSpec and ECGenParameterSpec supported");
|
||||
"Only ECParameterSpec, ECGenParameterSpec " +
|
||||
"and ECKeySizeParameterSpec supported");
|
||||
}
|
||||
|
||||
protected byte[] engineGetEncoded() throws IOException {
|
||||
|
@ -233,4 +235,3 @@ public final class ECParameters extends AlgorithmParametersSpi {
|
|||
return namedCurve.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue