Skip to content

Commit ed00ff2

Browse files
author
gefeili
committed
Merge branch 'main' into 1836-openpgp-unpacking-time
# Conflicts: # pg/src/main/java/org/bouncycastle/bcpg/PublicKeyPacket.java # pg/src/main/java/org/bouncycastle/bcpg/StreamUtil.java
2 parents e1b69c7 + acf48ff commit ed00ff2

File tree

316 files changed

+13486
-5107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+13486
-5107
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ stages:
22
- check
33
- build
44
- test
5+
- publish
56
- sync
67

78
check-code:
@@ -52,6 +53,13 @@ test-code:
5253
- "mls/build/test-results/**/*.xml"
5354

5455

56+
publish:
57+
stage: publish
58+
script:
59+
- "apply_overlay bc-java-pub ./"
60+
- "ecr_login"
61+
- "ecr_pull vm_base_intel latest"
62+
- "ci_docker_run \"vm_base_intel:latest\" \"bc-java\" \"/workspace/bc-java/ci/pub.sh\""
5563

5664
spongycastle:
5765
stage: "sync"

CONTRIBUTORS.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
<li>Adam Vartanian &lt;https://github.com/flooey&gt; use of ShortBuffer exception and buffer size pre-check in Cipher.doFinal().</li>
448448
<li>Bernd &lt;https://github.com/ecki&gt; Fix to make PGPUtil.pipeFileContents use buffer and not leak file handle.</li>
449449
<li>Shartung &lt;https://github.com/shartung&gt; Additional EC Key Agreement algorithms in support of German BSI TR-03111.</li>
450-
<li>Paul Schaub &lt;https://github.com/vanitasvitae&gt; bringing PGPSecretKey.getUserIds() into line with PGPPublicKey.getUserIds(). Exception message fix in BcPublicKeyDataDecryptorFactory. Additional tests on PGP key ring generation. Improved functionality of PGPSignatureSubpacketGenerator, PGPPublicKeyRing. Tweaks to PGPDataEncryptorBuilder interface, fix for JcaPGP/BcPGP Ed25519 private key conversion. Added configurable CRC detection to ArmoredInputStream, additional control character skipping in ArmoredInputStream. Rewind code for PGPPBEEncryptedData, addition of PGPSignature.getDigestPrefix(). Wrong list traversal fix in PGPSecretKeyRing. Further improvement to use of generics in PGP API. General interop improvements. PGP Public / Secure keyring ignore marker packets when reading. Initial work on PGP session key handling, filtering literal data for canoncialization. Addition of direct key identified key-ring construction. PGPSecretKeyRing.insertOrReplacePublicKey addition. Addition of utility methods for joining/merging signatures and public keys. Addition of PGP regexp packet, PolicyURI packet handling, UTF8 comment testing. Efficiency improvements to TruncatedStream. Initial Argon2 support for OpenPGP. General cleanups. Fast CRC24 implementation, SHA3 addtions to BcImplProvider, improvements to One Pass Signature support, signatue validation, read() consistency in BCPGInputStream. Contributions to AEAD support (v6 & v5) in PGP API. Addition of PGP WildCard ID, moving the PGP example code into the 21st century. Security patches for encrypted data generation, initial thread safe certification verification. Support for V6 EC keys, PGP packet criticality, and Preferred AEAD CipherSuites sigsubpacket support.</li>
450+
<li>Paul Schaub &lt;https://github.com/vanitasvitae&gt; bringing PGPSecretKey.getUserIds() into line with PGPPublicKey.getUserIds(). Exception message fix in BcPublicKeyDataDecryptorFactory. Additional tests on PGP key ring generation. Improved functionality of PGPSignatureSubpacketGenerator, PGPPublicKeyRing. Tweaks to PGPDataEncryptorBuilder interface, fix for JcaPGP/BcPGP Ed25519 private key conversion. Added configurable CRC detection to ArmoredInputStream, additional control character skipping in ArmoredInputStream. Rewind code for PGPPBEEncryptedData, addition of PGPSignature.getDigestPrefix(). Wrong list traversal fix in PGPSecretKeyRing. Further improvement to use of generics in PGP API. General interop improvements. PGP Public / Secure keyring ignore marker packets when reading. Initial work on PGP session key handling, filtering literal data for canoncialization. Addition of direct key identified key-ring construction. PGPSecretKeyRing.insertOrReplacePublicKey addition. Addition of utility methods for joining/merging signatures and public keys. Addition of PGP regexp packet, PolicyURI packet handling, UTF8 comment testing. Efficiency improvements to TruncatedStream. Initial Argon2 support for OpenPGP. General cleanups. Fast CRC24 implementation, SHA3 addtions to BcImplProvider, improvements to One Pass Signature support, signatue validation, read() consistency in BCPGInputStream. Contributions to AEAD support (v6 & v5) in PGP API. Addition of PGP WildCard ID, moving the PGP example code into the 21st century. Security patches for encrypted data generation, initial thread safe certification verification. Support for V6 EC keys, V6 signatures, PGP packet criticality, and Preferred AEAD CipherSuites sigsubpacket support.</li>
451451
<li>Nick of Nexxar &lt;https://github.com/nros&gt; update to OpenPGP package to handle a broader range of EC curves.</li>
452452
<li>catbref &lt;https://github.com/catbref&gt; sample implementation of RFC 7748/Ed25519 (incorporated work from github users Valodim and str4d as well).</li>
453453
<li>gerlion &lt;https://github.com/gerlion&gt; detection of concurrency issue with pre-1.60 EC math library.</li>
@@ -549,6 +549,7 @@
549549
<li>Jan Oupick&yacute; &lt;https://github.com/Honzaik&gt; - update to draft 13 of composite PQC signatures.</li>
550550
<li>Karsten Otto &lt;https://github.com/ottoka&gt; - finished the support for jdk.tls.server.defaultDHEParameters.</li>
551551
<li>Markus Sommer &lt;https://github.com/marsom&gt; - BCStyle lookup table fix for jurisdiction values.</li>
552+
<li>Jared Crawford &lt;https://github.com/jmcrawford45&gt; - Abstracting cire KEM functionality out of DHKEM to allow for use of alternative KEMs with HPKE.</li>
552553
<li>TaZbon &lt;https://github.com/TaZbon&gt; - Optional lax parsing patch for PEM parser.</li>
553554
<li>han-ji &lt;https://github.com/han-jl&gt; - Fix to sign extension issue in CTR random seek code.</li>
554555
<li>https://github.com/crlorentzen &lt;https://github.com/crlorentzen&gt; - Addition of system property for configuring GCM ciphers in 1.2 FIPS mode in the JSSE.</li>

ant/bc+-build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@
10121012
<property name="test.target.src.dir" value="${test.target.dir}/src" />
10131013

10141014
<mkdir dir="${basedir}/${build.dir}/${target.prefix}" />
1015-
<junit fork="yes" dir="${basedir}/${build.dir}/${target.prefix}" failureProperty="test.failed" printsummary="${junit.printsummary}">
1015+
<junit fork="yes" dir="${basedir}/${build.dir}/${target.prefix}" failureProperty="test.failed" printsummary="${junit.printsummary}" maxmemory="${junit.maxmemory}">
10161016
<classpath>
10171017
<path refid="project.classpath" />
10181018
<fileset dir="${artifacts.jars.dir}">

ant/build.regexp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
regexp: <List<PGPSignature>>|<Map<CertID, OCSPResponse>>|<URI[^>]*>>|<[A-Z?][^>@]*[a-zA-Z0-9\\]]>|<[A-Z]>|<[a-z][^>@]*[a-z\\]]>|@SuppressWarnings(.*)|@Override|@Deprecated|@FunctionalInterface
2+
regexp: <List<PGPSignature>>|<Map<CertID, OCSPResponse>>|<URI[^>]*\\>>|<[A-Z?][^>@]*[a-zA-Z0-9\\]]>|<[A-Z]>|<[a-z][^>@]*[a-z\\]]>|@SuppressWarnings(.*)|@Override|@Deprecated|@FunctionalInterface
33

ant/jdk13.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<property name="artifacts.dir" value="${build.dir}/artifacts/${jdk.name}" />
1414
<property name="target.prefix" value="jdk13" />
1515
<property name="javadoc.args" value="-protected" />
16+
<property name="junit.maxmemory" value="1536m" />
1617

1718
<target name="init">
1819
<mkdir dir="${src.dir}" />
@@ -55,6 +56,7 @@
5556
<exclude name="**/asymmetric/dstu/*.java" />
5657
<exclude name="**/Logging*.java" />
5758
<exclude name="**/provider/config/PKCS12StoreParameter.java" />
59+
<exclude name="**/COMPOSITE.java"/>
5860
<exclude name="**/gemss/*.java"/>
5961
<exclude name="**/rainbow/*.java"/>
6062
<exclude name="**/Rainbow*.java"/>
@@ -89,6 +91,7 @@
8991
<exclude name="**/gemss/*.java" />
9092
<exclude name="**/CertPathReviewer*.java" />
9193
<exclude name="**/PKIXCertPathReviewer.java" />
94+
<exclude name="**/COMPOSITE.java"/>
9295
<exclude name="**/PKIXAttrCert*.java" />
9396
<exclude name="**/PKIXNameConstraints*.java" />
9497
<exclude name="**/PKCS12StoreParameter.java" />
@@ -248,6 +251,7 @@
248251
<exclude name="**/jce/provider/test/CertLocaleTest.java" />
249252
</fileset>
250253
<fileset dir="pkix/src/test/java">
254+
<exclude name="**/CheckNameConstraintsTest.java"/>
251255
<exclude name="**/pkix/test/RevocationTest.java"/>
252256
<exclude name="**/SunProviderTest.java" />
253257
<exclude name="**/NullProviderTest.java" />
@@ -328,19 +332,29 @@
328332

329333
<replaceregexp match="${regexp}" replace=" " flags="g" byline="true">
330334
<fileset dir="${src.dir}">
331-
<include name="**/*.java"/>
335+
<include name="**/*.java"/>
336+
<exclude name="**/SICBlockCipher.java"/>
332337
</fileset>
333338
</replaceregexp>
334339
<replaceregexp match="(List|Map|Set) >" replace="\1" flags="g" byline="true">
335340
<fileset dir="${src.dir}">
336341
<include name="**/*.java"/>
337342
<exclude name="**/MultipartParserTest.java"/>
343+
<exclude name="**/SICBlockCipher.java"/>
344+
</fileset>
345+
</replaceregexp>
346+
<replaceregexp match="StringBuilder" replace="StringBuffer" flags="g" byline="true">
347+
<fileset dir="${src.dir}">
348+
<include name="**/*.java"/>
349+
<exclude name="**/MultipartParserTest.java"/>
350+
<exclude name="**/SICBlockCipher.java"/>
338351
</fileset>
339352
</replaceregexp>
340353
<replaceregexp match="LinkedHashSet" replace="HashSet" flags="g" byline="true">
341354
<fileset dir="${src.dir}">
342355
<include name="**/*.java"/>
343356
<exclude name="**/MultipartParserTest.java"/>
357+
<exclude name="**/SICBlockCipher.java"/>
344358
</fileset>
345359
</replaceregexp>
346360
<replaceregexp match="\.\.\." replace="[]" flags="g" byline="true">

ant/jdk14.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<property name="artifacts.dir" value="${build.dir}/artifacts/${jdk.name}"/>
1313
<property name="target.prefix" value="jdk14"/>
1414
<property name="javadoc.args" value="-breakiterator"/>
15+
<property name="junit.maxmemory" value="1536m" />
1516

1617
<target name="init">
1718
<mkdir dir="${src.dir}"/>
@@ -77,6 +78,7 @@
7778
<exclude name="**/JDKPKCS12StoreParameter.java"/>
7879
<exclude name="**/SIKE*.java"/>
7980
<exclude name="**/CompositeSign*.java"/>
81+
<exclude name="**/COMPOSITE*.java"/>
8082
<exclude name="**/rainbow/*.java"/>
8183
<exclude name="**/Rainbow*.java"/>
8284
<exclude name="**/XMS*.java"/>
@@ -131,6 +133,9 @@
131133
<exclude name="**/keybox/**/*.java"/>
132134
<exclude name="**/gpg/test/*.java"/>
133135
<exclude name="**/BcImplProviderTest.java"/>
136+
<exclude name="**/OperatorJcajceTest.java"/>
137+
<exclude name="**/AEADWithArgon2Test.java"/>
138+
<exclude name="**/AEADProtectedPGPSecretKeyTest.java"/>
134139
</fileset>
135140
<fileset dir="pkix/src/test/java">
136141
<exclude name="**/est/**/*.java"/>
@@ -142,6 +147,7 @@
142147
<exclude name="**/bouncycastle/cms/test/*AuthEnvelopedData*Test.java"/>
143148
<exclude name="**/PKIXRevocationTest.java"/>
144149
<exclude name="**/its/**/*.java"/>
150+
<exclude name="**/CheckNameConstraintsTest.java"/>
145151
</fileset>
146152
<fileset dir="mail/src/test/java">
147153
<exclude name="**/MailGeneralTest.java"/>
@@ -224,6 +230,13 @@
224230
</copy>
225231

226232
<replaceregexp match="${regexp}" replace=" " flags="g" byline="true">
233+
<fileset dir="${src.dir}">
234+
<include name="**/*.java"/>
235+
<exclude name="**/SICBlockCipher.java"/>
236+
<exclude name="**/MultipartParserTest.java"/>
237+
</fileset>
238+
</replaceregexp>
239+
<replaceregexp match="StringBuilder" replace="StringBuffer" flags="g" byline="true">
227240
<fileset dir="${src.dir}">
228241
<include name="**/*.java"/>
229242
<exclude name="**/MultipartParserTest.java"/>
@@ -232,6 +245,7 @@
232245
<replaceregexp match="(List|Map|Set|Iterator) >" replace="\1" flags="g" byline="true">
233246
<fileset dir="${src.dir}">
234247
<include name="**/*.java"/>
248+
<exclude name="**/SICBlockCipher.java"/>
235249
<exclude name="**/MultipartParserTest.java"/>
236250
</fileset>
237251
</replaceregexp>

ant/jdk15+.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<property name="src.dir" value="${build.dir}/${jdk.name}" />
1111
<property name="target.prefix" value="jdk15to18" />
1212
<property name="javadoc.args" value="-breakiterator" />
13+
<property name="jmail.present" value="true" />
14+
<property name="junit.maxmemory" value="1536m" />
1315

1416
<target name="clean">
1517
<delete dir="${build.dir}" />
@@ -39,22 +41,18 @@
3941
<fileset dir="prov/src/test/resources" includes="**/*.*" />
4042

4143
<fileset dir="tls/src/main/java" includes="**/*.java" />
42-
<fileset dir="tls/src/main/jdk1.5" includes="**/*.java" />
4344
<fileset dir="tls/src/main/javadoc" includes="**/*.html" />
4445
<fileset dir="tls/src/test/java" includes="**/*.java" />
45-
<fileset dir="tls/src/test/jdk1.5" includes="**/*.java" />
4646
<fileset dir="tls/src/test/resources" includes="**/*.*" />
4747

4848
<fileset dir="pkix/src/main/java" includes="**/*.java" />
49-
<fileset dir="pkix/src/main/jdk1.5" includes="**/*.java" />
5049
<fileset dir="pkix/src/main/javadoc" includes="**/*.html" />
5150
<fileset dir="pkix/src/main/resources" includes="**/*.properties" />
5251
<fileset dir="pkix/src/test/java" includes="**/*.java" />
5352
<fileset dir="pkix/src/test/javadoc" includes="**/*.html" />
5453
<fileset dir="pkix/src/test/resources" includes="**/*.*" />
5554

5655
<fileset dir="pg/src/main/java" includes="**/*.java" />
57-
<fileset dir="pg/src/main/jdk1.5" includes="**/*.java" />
5856
<fileset dir="pg/src/main/javadoc" includes="**/*.html" />
5957
<fileset dir="pg/src/main/java" includes="**/*.properties" />
6058
<fileset dir="pg/src/test/java" includes="**/*.java" />
@@ -74,6 +72,14 @@
7472
<fileset dir="mail/src/test/resources" includes="**/*.*" />
7573

7674
</copy>
75+
<copy todir="${src.dir}" overwrite="true">
76+
<fileset dir="pkix/src/main/jdk1.5" includes="**/*.java" />
77+
<fileset dir="tls/src/main/jdk1.5" includes="**/*.java" />
78+
<fileset dir="tls/src/test/jdk1.5" includes="**/*.java" />
79+
<fileset dir="pg/src/main/jdk1.5" includes="**/*.java" />
80+
<fileset dir="pg/src/test/jdk1.5" includes="**/*.java" />
81+
</copy>
82+
7783
<available classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" property="checkstyle.on" />
7884
</target>
7985

ant/jdk18+.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<property name="src.dir" value="${build.dir}/${jdk.name}" />
1111
<property name="target.prefix" value="jdk18on" />
1212
<property name="javadoc.args" value="-breakiterator -Xdoclint:none -quiet" />
13+
<property name="junit.maxmemory" value="4096m" />
1314

1415
<target name="clean">
1516
<delete dir="${build.dir}" />

bc-build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
release.suffix: 1.79
77
release.name: 1.79
88
release.version: 1.79
9-
release.debug: false
9+
release.debug: true
1010

1111
mail.jar.home: ./libs/javax.mail-1.4.7.jar
1212
activation.jar.home: ./libs/activation-1.1.1.jar

build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ buildscript {
77

88
}
99

10+
1011
plugins {
1112
id "io.spring.nohttp" version "0.0.11"
1213
id "checkstyle"
1314
id "jacoco"
1415
id "net.ltgt.errorprone" version "3.1.0"
16+
id 'maven-publish'
1517
}
1618

1719
println("Environment setup:")
@@ -160,6 +162,7 @@ allprojects {
160162
}
161163
}
162164

165+
163166
}
164167

165168
task printProperties {
@@ -183,6 +186,7 @@ ext {
183186

184187
subprojects {
185188
apply plugin: 'eclipse'
189+
apply plugin: 'maven-publish'
186190

187191

188192
JavaVersion current = JavaVersion.current();
@@ -262,7 +266,7 @@ subprojects {
262266
}
263267

264268
tasks.withType(JavaCompile).configureEach {
265-
options.debug = false;
269+
options.debug = true;
266270
}
267271

268272
tasks.withType(Test).configureEach {
@@ -276,7 +280,12 @@ subprojects {
276280
languageVersion = JavaLanguageVersion.of(21)
277281
}
278282
}
283+
279284
}
280285

281286

282287
test.dependsOn([':core:test', ':prov:test', ':prov:test11', ':prov:test15', ':prov:test21', ':pkix:test', 'pg:test', ':tls:test', 'mls:test', 'mail:test', 'jmail:test'])
288+
289+
290+
291+

0 commit comments

Comments
 (0)