From commits-return-21538-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Tue Feb 27 06:29:41 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E538A180651 for ; Tue, 27 Feb 2018 06:29:40 +0100 (CET) Received: (qmail 13927 invoked by uid 500); 27 Feb 2018 05:29:39 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 13691 invoked by uid 99); 27 Feb 2018 05:29:38 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Feb 2018 05:29:38 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8645285027; Tue, 27 Feb 2018 05:29:37 +0000 (UTC) Date: Tue, 27 Feb 2018 05:29:38 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] 01/04: ACCUMULO-4817 Fix bouncycastle deprecation warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: ctubbsii@apache.org In-Reply-To: <151970937744.6687.13373301868555616195@gitbox.apache.org> References: <151970937744.6687.13373301868555616195@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 0afbd3d6a79b42751445d7990830dddb6e5c68d7 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180227052937.8645285027@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git commit 0afbd3d6a79b42751445d7990830dddb6e5c68d7 Author: Christopher Tubbs AuthorDate: Mon Feb 26 23:10:32 2018 -0500 ACCUMULO-4817 Fix bouncycastle deprecation warning * Remove use of deprecated bouncycastle library calls * Fix empty paragraph javadoc warning --- .../org/apache/accumulo/core/client/ClientConfiguration.java | 1 - .../src/test/java/org/apache/accumulo/test/util/CertUtils.java | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java index 70dafaf..e6264ad 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java +++ b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java @@ -216,7 +216,6 @@ public class ClientConfiguration extends CompositeConfiguration { *

* A client configuration will then be read from each location using PropertiesConfiguration to construct a configuration. That means the latest item * will be the one in the configuration. - *

* * @see PropertiesConfiguration * @see File#pathSeparator diff --git a/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java b/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java index a49e1cd..6c55b43 100644 --- a/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java +++ b/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java @@ -59,10 +59,10 @@ import org.bouncycastle.asn1.x509.Extension; import org.bouncycastle.asn1.x509.KeyUsage; import org.bouncycastle.cert.CertIOException; import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; import org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils; import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder; import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.bouncycastle.jce.provider.X509CertificateObject; import org.bouncycastle.operator.OperatorCreationException; import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; import org.slf4j.Logger; @@ -250,7 +250,7 @@ public class CertUtils { PrivateKey signerKey = findPrivateKey(signerKeystore, signerPasswordArray); KeyPair kp = generateKeyPair(); - X509CertificateObject cert = generateCert(keyName, kp, false, signerCert.getPublicKey(), signerKey); + Certificate cert = generateCert(keyName, kp, false, signerCert.getPublicKey(), signerKey); char[] password = keystorePassword.toCharArray(); KeyStore keystore = KeyStore.getInstance(keystoreType); @@ -270,7 +270,7 @@ public class CertUtils { KeyPair kp = generateKeyPair(); - X509CertificateObject cert = generateCert(keyName, kp, true, kp.getPublic(), kp.getPrivate()); + Certificate cert = generateCert(keyName, kp, true, kp.getPublic(), kp.getPrivate()); char[] password = keystorePassword.toCharArray(); KeyStore keystore = KeyStore.getInstance(keystoreType); @@ -288,7 +288,7 @@ public class CertUtils { return gen.generateKeyPair(); } - private X509CertificateObject generateCert(String keyName, KeyPair kp, boolean isCertAuthority, PublicKey signerPublicKey, PrivateKey signerPrivateKey) + private Certificate generateCert(String keyName, KeyPair kp, boolean isCertAuthority, PublicKey signerPublicKey, PrivateKey signerPrivateKey) throws IOException, CertIOException, OperatorCreationException, CertificateException, NoSuchAlgorithmException { Calendar startDate = Calendar.getInstance(); Calendar endDate = Calendar.getInstance(); @@ -305,7 +305,7 @@ public class CertUtils { certGen.addExtension(Extension.keyUsage, true, new KeyUsage(KeyUsage.keyCertSign)); } X509CertificateHolder cert = certGen.build(new JcaContentSignerBuilder(signingAlgorithm).build(signerPrivateKey)); - return new X509CertificateObject(cert.toASN1Structure()); + return new JcaX509CertificateConverter().getCertificate(cert); } static Certificate findCert(KeyStore keyStore) throws KeyStoreException { -- To stop receiving notification emails like this one, please contact ctubbsii@apache.org.