This is an automated email from the ASF dual-hosted git repository. toulmean pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
commit 8430f8e22b86236e54a8ca0a8469c21020682fc9 Author: Antoine Toulme <[email protected]> AuthorDate: Mon Dec 16 00:38:19 2019 -0800 Correct import --- net/src/main/java/org/apache/tuweni/net/tls/TLS.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/src/main/java/org/apache/tuweni/net/tls/TLS.java b/net/src/main/java/org/apache/tuweni/net/tls/TLS.java index 5ecc20f..b30d9e5 100644 --- a/net/src/main/java/org/apache/tuweni/net/tls/TLS.java +++ b/net/src/main/java/org/apache/tuweni/net/tls/TLS.java @@ -16,7 +16,6 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.file.Files.createDirectories; import static org.apache.tuweni.crypto.Hash.sha2_256; -import jdk.internal.joptsimple.internal.Strings; import org.apache.tuweni.bytes.Bytes; import java.io.BufferedReader; @@ -38,6 +37,7 @@ import java.util.Calendar; import java.util.Date; import java.util.UUID; +import com.google.common.base.Strings; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.cert.X509v3CertificateBuilder; import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; @@ -86,11 +86,13 @@ public final class TLS { * * @param key The key path. * @param certificate The certificate path. - * @param commonName the name to use for the CN attribute of the certificate. If null or empty, a random value is used. + * @param commonName the name to use for the CN attribute of the certificate. If null or empty, a random value is + * used. * @return {@code true} if a self-signed certificate was created. * @throws IOException If an IO error occurs creating the certificate. */ - public static boolean createSelfSignedCertificateIfMissing(Path key, Path certificate, String commonName) throws IOException { + public static boolean createSelfSignedCertificateIfMissing(Path key, Path certificate, String commonName) + throws IOException { if (Files.exists(certificate) || Files.exists(key)) { return false; } @@ -112,7 +114,8 @@ public final class TLS { return true; } - private static void createSelfSignedCertificate(Date now, Path key, Path certificate, String commonName) throws NoSuchAlgorithmException, + private static void createSelfSignedCertificate(Date now, Path key, Path certificate, String commonName) + throws NoSuchAlgorithmException, IOException, OperatorCreationException, CertificateException { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
