aboutsummaryrefslogtreecommitdiff
path: root/standalone/src/main/java/cz
diff options
context:
space:
mode:
authorJ08nY2024-03-29 19:02:00 +0100
committerJ08nY2024-03-29 19:02:00 +0100
commit63beedc171116c5720b40d32daba34b753d6059c (patch)
tree69af0fa9cd69102f213f760513077c11470bec6f /standalone/src/main/java/cz
parentc048a5b348340d02e37eb9cc28d949896ff51975 (diff)
downloadECTester-63beedc171116c5720b40d32daba34b753d6059c.tar.gz
ECTester-63beedc171116c5720b40d32daba34b753d6059c.tar.zst
ECTester-63beedc171116c5720b40d32daba34b753d6059c.zip
Cleanups in provider classes.
Diffstat (limited to 'standalone/src/main/java/cz')
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
index 894da27..dd982aa 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
@@ -368,6 +368,12 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
}
+ public static class LibresslECDH extends Libressl {
+ public LibresslECDH() {
+ super("ECDH");
+ }
+ }
+
public abstract static class Nettle extends SimpleKeyAgreementSpi {
private final String type;
@@ -378,6 +384,7 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
@Override
byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params) {
try {
+ // TODO: OMG remove this monstrosity.
AlgorithmParameters tmp = AlgorithmParameters.getInstance("EC");
tmp.init(params);
ECGenParameterSpec spec = tmp.getParameterSpec(ECGenParameterSpec.class);
@@ -420,10 +427,4 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
super("ECDH");
}
}
- public static class LibresslECDH extends Libressl {
- public LibresslECDH() {
- super("ECDH");
- }
- }
-
}