Skip to content

Commit

Permalink
Update BouncyCastle to 1.64 (#52185) (#52464)
Browse files Browse the repository at this point in the history
This commit upgrades the bouncycastle dependency from 1.61 to 1.64.
  • Loading branch information
jkakavas committed Feb 18, 2020
1 parent 9c49868 commit d9ce0e6
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Expand Up @@ -29,7 +29,7 @@ joda = 2.10.4
# - plugins/ingest-attachment (transitive dependency, check the upstream POM)
# - distribution/tools/plugin-cli
# - x-pack/plugin/security
bouncycastle = 1.61
bouncycastle=1.64
# test dependencies
randomizedrunner = 2.7.1
junit = 4.12
Expand Down

This file was deleted.

@@ -0,0 +1 @@
7a2601f0a1d336966cca03edb04a69ba0f5f25d9

This file was deleted.

@@ -0,0 +1 @@
3dac163e20110817d850d17e0444852a6d7d0bd7

This file was deleted.

@@ -0,0 +1 @@
1467dac1b787b5ad2a18201c0c281df69882259e
8 changes: 8 additions & 0 deletions x-pack/plugin/security/cli/build.gradle
Expand Up @@ -24,6 +24,14 @@ forbiddenPatterns {
exclude '**/*.jks'
}

thirdPartyAudit {
ignoreMissingClasses(
// Used in org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests
'junit.framework.Assert',
'junit.framework.TestCase'
)
}

if (BuildParams.inFipsJvm) {
test.enabled = false
jarHell.enabled = false
Expand Down

This file was deleted.

@@ -0,0 +1 @@
3dac163e20110817d850d17e0444852a6d7d0bd7

This file was deleted.

@@ -0,0 +1 @@
1467dac1b787b5ad2a18201c0c281df69882259e
Expand Up @@ -7,12 +7,12 @@

import com.google.common.jimfs.Configuration;
import com.google.common.jimfs.Jimfs;
import org.bouncycastle.asn1.DLTaggedObject;
import org.elasticsearch.core.internal.io.IOUtils;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1String;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.asn1.DERTaggedObject;
import org.bouncycastle.asn1.pkcs.Attribute;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.Extension;
Expand Down Expand Up @@ -489,8 +489,8 @@ private void assertSubjAltNames(GeneralNames subjAltNames, CertificateInformatio
assertThat(seq.size(), equalTo(2));
assertThat(seq.getObjectAt(0), instanceOf(ASN1ObjectIdentifier.class));
assertThat(seq.getObjectAt(0).toString(), equalTo(CN_OID));
assertThat(seq.getObjectAt(1), instanceOf(DERTaggedObject.class));
DERTaggedObject taggedName = (DERTaggedObject) seq.getObjectAt(1);
assertThat(seq.getObjectAt(1), instanceOf(DLTaggedObject.class));
DLTaggedObject taggedName = (DLTaggedObject) seq.getObjectAt(1);
assertThat(taggedName.getTagNo(), equalTo(0));
assertThat(taggedName.getObject(), instanceOf(ASN1String.class));
assertThat(taggedName.getObject().toString(), Matchers.isIn(certInfo.commonNames));
Expand Down
Expand Up @@ -11,7 +11,7 @@
import joptsimple.OptionSet;
import org.bouncycastle.asn1.DERIA5String;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.DLSequence;
import org.bouncycastle.asn1.pkcs.Attribute;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.Extension;
Expand Down Expand Up @@ -606,7 +606,7 @@ private void verifyCertificationRequest(PKCS10CertificationRequest csr, String c
final Attribute[] extensionAttributes = csr.getAttributes(PKCSObjectIdentifiers.pkcs_9_at_extensionRequest);
assertThat(extensionAttributes, arrayWithSize(1));
assertThat(extensionAttributes[0].getAttributeValues(), arrayWithSize(1));
assertThat(extensionAttributes[0].getAttributeValues()[0], instanceOf(DERSequence.class));
assertThat(extensionAttributes[0].getAttributeValues()[0], instanceOf(DLSequence.class));

// We register 1 extension - the subject alternative names
final Extensions extensions = Extensions.getInstance(extensionAttributes[0].getAttributeValues()[0]);
Expand Down

0 comments on commit d9ce0e6

Please sign in to comment.