Remove underscore in variable names
This commit is contained in:
@@ -170,11 +170,11 @@ class SCP11bSecureMessaging implements SecureMessaging {
|
|||||||
|
|
||||||
private static final ECParameterSpec getAlgorithmParameterSpec(final ECKeyFormat kf)
|
private static final ECParameterSpec getAlgorithmParameterSpec(final ECKeyFormat kf)
|
||||||
throws NoSuchProviderException, NoSuchAlgorithmException, InvalidParameterSpecException {
|
throws NoSuchProviderException, NoSuchAlgorithmException, InvalidParameterSpecException {
|
||||||
final AlgorithmParameters algo_params = AlgorithmParameters.getInstance(SCP11B_KEY_AGREEMENT_KEY_ALGO, PROVIDER);
|
final AlgorithmParameters algoParams = AlgorithmParameters.getInstance(SCP11B_KEY_AGREEMENT_KEY_ALGO, PROVIDER);
|
||||||
|
|
||||||
algo_params.init(new ECGenParameterSpec(ECNamedCurveTable.getName(kf.getCurveOID())));
|
algoParams.init(new ECGenParameterSpec(ECNamedCurveTable.getName(kf.getCurveOID())));
|
||||||
|
|
||||||
return algo_params.getParameterSpec(ECParameterSpec.class);
|
return algoParams.getParameterSpec(ECParameterSpec.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -228,17 +228,17 @@ class SCP11bSecureMessaging implements SecureMessaging {
|
|||||||
|
|
||||||
final ECParameterSpec kfParams = getAlgorithmParameterSpec(kf);
|
final ECParameterSpec kfParams = getAlgorithmParameterSpec(kf);
|
||||||
|
|
||||||
final Certificate _cardCert = certFactory.generateCertificate(new ByteArrayInputStream(data));
|
final Certificate cert = certFactory.generateCertificate(new ByteArrayInputStream(data));
|
||||||
if (!(_cardCert instanceof X509Certificate)) {
|
if (!(cert instanceof X509Certificate)) {
|
||||||
throw new IOException("invalid card certificate");
|
throw new IOException("invalid card certificate");
|
||||||
}
|
}
|
||||||
final X509Certificate cardCert = (X509Certificate) _cardCert;
|
final X509Certificate cardCert = (X509Certificate) cert;
|
||||||
|
|
||||||
final PublicKey _cardPk = cardCert.getPublicKey();
|
final PublicKey pk = cardCert.getPublicKey();
|
||||||
if (!(_cardPk instanceof ECPublicKey)) {
|
if (!(pk instanceof ECPublicKey)) {
|
||||||
throw new IOException("invalid card public key");
|
throw new IOException("invalid card public key");
|
||||||
}
|
}
|
||||||
final ECPublicKey cardPk = (ECPublicKey) _cardPk;
|
final ECPublicKey cardPk = (ECPublicKey) pk;
|
||||||
final ECParameterSpec cardPkParams = cardPk.getParams();
|
final ECParameterSpec cardPkParams = cardPk.getParams();
|
||||||
|
|
||||||
if (!kfParams.getCurve().equals(cardPkParams.getCurve())) {
|
if (!kfParams.getCurve().equals(cardPkParams.getCurve())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user