diff --git a/pom.xml b/pom.xml index e3aadae..ecaa177 100644 --- a/pom.xml +++ b/pom.xml @@ -119,6 +119,11 @@ com.google.guava guava + + org.jenkins-ci.plugins + bouncycastle-api + 2.20 + cloud.dnation.integration hetzner-cloud-client-java diff --git a/src/main/java/cloud/dnation/jenkins/plugins/hetzner/Helper.java b/src/main/java/cloud/dnation/jenkins/plugins/hetzner/Helper.java index 23e38ee..c15283d 100644 --- a/src/main/java/cloud/dnation/jenkins/plugins/hetzner/Helper.java +++ b/src/main/java/cloud/dnation/jenkins/plugins/hetzner/Helper.java @@ -26,17 +26,20 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.experimental.UtilityClass; +import net.i2p.crypto.eddsa.EdDSAPublicKey; +import org.bouncycastle.crypto.params.AsymmetricKeyParameter; +import org.bouncycastle.crypto.params.Ed25519PublicKeyParameters; +import org.bouncycastle.crypto.params.RSAKeyParameters; +import org.bouncycastle.crypto.util.OpenSSHPublicKeyUtil; import org.slf4j.Logger; import retrofit2.Response; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.nio.charset.StandardCharsets; import java.security.KeyPair; +import java.security.PublicKey; import java.security.interfaces.RSAPublicKey; import java.time.Duration; import java.time.LocalDateTime; @@ -60,6 +63,7 @@ public class Helper { private static final Pattern LABEL_VALUE_RE = Pattern.compile("^(?![0-9]+$)(?!-)[a-zA-Z0-9-_.]{0,63}(?