From commits-return-21527-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Fri Feb 23 23:26:59 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 E136D180652 for ; Fri, 23 Feb 2018 23:26:58 +0100 (CET) Received: (qmail 49553 invoked by uid 500); 23 Feb 2018 22:26:58 -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 49544 invoked by uid 99); 23 Feb 2018 22:26:58 -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; Fri, 23 Feb 2018 22:26:58 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 68359861C9; Fri, 23 Feb 2018 22:26:57 +0000 (UTC) Date: Fri, 23 Feb 2018 22:26:57 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch 1.8 updated: ACCUMULO-4817 Fix bouncycastle deprecation warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151942481734.6248.4159923598352989826@gitbox.apache.org> From: ctubbsii@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/1.8 X-Git-Reftype: branch X-Git-Oldrev: eb8ea99f5e37cdcf7e7c9a823ac3a7f8ac05c596 X-Git-Newrev: b12daf1c06a64fe3941f82b7d64a1c11c1e663f0 X-Git-Rev: b12daf1c06a64fe3941f82b7d64a1c11c1e663f0 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 1.8 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/1.8 by this push: new b12daf1 ACCUMULO-4817 Fix bouncycastle deprecation warning b12daf1 is described below commit b12daf1c06a64fe3941f82b7d64a1c11c1e663f0 Author: Christopher Tubbs AuthorDate: Fri Feb 23 16:02:46 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/main/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 51e818e..a8622be 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 @@ -242,7 +242,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/main/java/org/apache/accumulo/test/util/CertUtils.java b/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java index a49e1cd..6c55b43 100644 --- a/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java +++ b/test/src/main/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.