aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2021-09-12 21:40:04 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2021-09-29 17:13:04 +0200
commit68a638deb09a4f0dbc0bddce9ef233ed682c1767 (patch)
treec801595c991adf05f7e82a1659fb7f8f1963f8a9 /org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal
parent05cd1fa5c7fb491d14d02cf9628c32108dc4727d (diff)
downloadjgit-68a638deb09a4f0dbc0bddce9ef233ed682c1767.tar.gz
jgit-68a638deb09a4f0dbc0bddce9ef233ed682c1767.zip
KeyGrip: fix build error on java 15
CryptlibObjectIdentifiers can't be used because bouncycastle doesn't export the package org.bouncycastle.asn1.cryptlib. Bug: 573638 Change-Id: I1f9e2af02d9fec69d2249a7d78301ba4b333a9ba
Diffstat (limited to 'org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal')
-rw-r--r--org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java
index b1d4446010..c931724710 100644
--- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java
+++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java
@@ -15,7 +15,6 @@ import java.text.MessageFormat;
import java.util.Arrays;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
-import org.bouncycastle.asn1.cryptlib.CryptlibObjectIdentifiers;
import org.bouncycastle.asn1.x9.ECNamedCurveTable;
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.bcpg.DSAPublicBCPGKey;
@@ -52,6 +51,9 @@ public final class KeyGrip {
private static String OID_RFC8410_ED25519 = "1.3.101.112"; //$NON-NLS-1$
+ private static ASN1ObjectIdentifier CURVE25519 = ECNamedCurveTable
+ .getOID("curve25519"); //$NON-NLS-1$
+
private KeyGrip() {
// No instantiation
}
@@ -105,7 +107,7 @@ public final class KeyGrip {
if (OID_OPENPGP_ED25519.equals(curveOID.getId())
|| OID_RFC8410_ED25519.equals(curveOID.getId())) {
return hashEd25519(grip, ec.getEncodedPoint());
- } else if (CryptlibObjectIdentifiers.curvey25519.equals(curveOID)
+ } else if (CURVE25519.equals(curveOID)
|| OID_RFC8410_CURVE25519.equals(curveOID.getId())) {
// curvey25519 actually is the OpenPGP OID for Curve25519 and is
// known to BC, but the parameters are for the short Weierstrass