mirrored from https://www.bouncycastle.org/repositories/bc-java
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
buildj2me
400 lines (377 loc) · 17.5 KB
/
buildj2me
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
#!/bin/sh -
#
# build script for J2ME - this only includes the lightweight API
# if a distribution name is given as an argument the build is placed
# in a subdirectory - nothing gets compiled as we expect the classes
# to be in ./palm
#
# Note: this script expects javadoc for jdk 1.3 to be in your path.
#
base=$1
version=`echo $base | sed -e "s/\([0-9]\)\([0-9a-z]*\)/\1.\2/"`
WINDOWTITLE="Bouncy Castle Cryptography $version API Specification"
HEADER="<b>Bouncy Castle Cryptography $version</b>"
DOCTITLE="Bouncy Castle $version API Specification"
echo "making j2me lightweight release"
if test "$base" != ""
then
target=build/artifacts/j2me/lcrypto-j2me-$base
mkdir -p $target
mkdir $target/javadoc
mkdir $target/src
tar cf - index.html LICENSE.html CONTRIBUTORS.html docs zips | (cd $target && tar xf -)
((cd core/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/javadoc; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/jdk1.4; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/jdk1.3; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/jdk1.2; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/jdk1.1; tar cf - org ) | (cd $target/src && tar xf -))
((cd core/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/test/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/test/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd util/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd util/src/main/jdk1.4; tar cf - * ) | (cd $target/src && tar xf -))
((cd util/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/main/javadoc; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/test/java; tar cf - org/bouncycastle/cert/test ) | (cd $target/src && tar xf - ) )
((cd pkix/src/test/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/jdk1.4; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/jdk1.3; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/javadoc; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/test/j2me; tar cf - * ) | (cd $target/src && tar xf -))
(cd $target;
rm src/org/bouncycastle/test/*.java
rm src/org/bouncycastle/asn1/LocaleUtil.java
rm src/org/bouncycastle/crypto/test/AllTests.java
rm src/org/bouncycastle/crypto/test/SHA3DigestTest.java
rm src/org/bouncycastle/crypto/test/SHAKEDigestTest.java
rm src/org/bouncycastle/crypto/test/NISTECCTest.java
rm src/org/bouncycastle/crypto/test/LEATest.java
rm src/org/bouncycastle/crypto/test/AsconTest.java
rm src/org/bouncycastle/crypto/test/Grain128AEADTest.java
rm src/org/bouncycastle/crypto/test/RadixConverterTest.java
rm src/org/bouncycastle/crypto/test/DigestConstraintsTest.java
rm src/org/bouncycastle/crypto/CryptoServicesPermission.java
rm src/org/bouncycastle/crypto/constraints/LoggingConstraint.java
rm src/org/bouncycastle/util/StreamParser.java
rm src/org/bouncycastle/util/StreamParsingException.java
rm src/org/bouncycastle/asn1/util/Dump.java
rm src/org/bouncycastle/asn1/test/AllTests.java
rm src/org/bouncycastle/asn1/test/MiscTest.java
rm src/org/bouncycastle/asn1/test/ASN1IntegerTest.java
rm src/org/bouncycastle/asn1/test/ASN1SequenceParserTest.java
rm src/org/bouncycastle/asn1/test/AttributeTableUnitTest.java
rm src/org/bouncycastle/asn1/test/BiometricDataUnitTest.java
rm src/org/bouncycastle/asn1/test/BitStringConstantTester.java
rm src/org/bouncycastle/asn1/test/CommitmentTypeIndicationUnitTest.java
rm src/org/bouncycastle/asn1/test/CommitmentTypeQualifierUnitTest.java
rm src/org/bouncycastle/asn1/test/DataGroupHashUnitTest.java
rm src/org/bouncycastle/asn1/test/DERUTF8StringTest.java
rm src/org/bouncycastle/asn1/test/EqualsAndHashCodeTest.java
rm src/org/bouncycastle/asn1/test/GeneralizedTimeTest.java
rm src/org/bouncycastle/asn1/test/GenerationTest.java
rm src/org/bouncycastle/asn1/test/InputStreamTest.java
rm src/org/bouncycastle/asn1/test/Iso4217CurrencyCodeUnitTest.java
rm src/org/bouncycastle/asn1/test/KeyUsageTest.java
rm src/org/bouncycastle/asn1/test/LDSSecurityObjectUnitTest.java
rm src/org/bouncycastle/asn1/test/CMCFailInfoTest.java
rm src/org/bouncycastle/asn1/test/CMCStatusTest.java
rm src/org/bouncycastle/asn1/test/PublishTrustAnchorsTest.java
rm src/org/bouncycastle/asn1/test/RevokeRequestTest.java
rm src/org/bouncycastle/asn1/test/LocaleTest.java
rm src/org/bouncycastle/tsp/DataGroup.java
rm -rf src/org/bouncycastle/tsp/ers
rm src/org/bouncycastle/crypto/util/JournaledAlgorithm.java
rm -rf src/org/bouncycastle/crypto/fpe/
rm -rf src/org/bouncycastle/crypto/params/FPEParameters.java
rm -rf src/org/bouncycastle/crypto/util/RadixConverter.java
rm -rf src/org/bouncycastle/math/ec/rfc7748/test
rm -rf src/org/bouncycastle/math/ec/rfc8032/test
rm -rf src/org/bouncycastle/math/raw/test
rm -rf src/org/bouncycastle/math/test
rm -rf src/org/bouncycastle/pqc/legacy/math/ntru
rm -rf src/org/bouncycastle/pqc/crypto/ntru
rm -rf src/org/bouncycastle/pqc/legacy/crypto/test/ntru
rm -rf src/org/bouncycastle/pqc/legacy/crypto/*/NTRU*
rm -rf src/org/bouncycastle/pqc/legacy/crypto/*/BitStringTest*
rm -rf src/org/bouncycastle/pqc/legacy/crypto/*/IndexGenerator*
rm -rf src/org/bouncycastle/pqc/crypto/util/PQCOtherInfo*.java
rm -rf src/org/bouncycastle/pqc/crypto/sphincsplus
rm -rf src/org/bouncycastle/pqc/crypto/xmss
rm -rf src/org/bouncycastle/pqc/crypto/lms
rm -rf src/org/bouncycastle/pqc/crypto/test
rm -rf src/org/bouncycastle/pqc/crypto/sike
rm -rf src/org/bouncycastle/pqc/crypto/picnic
rm -rf src/org/bouncycastle/pqc/crypto/rainbow
rm -rf src/org/bouncycastle/pqc/crypto/gemss
rm src/org/bouncycastle/pqc/crypto/legacy/qtesla/QTeslaKeyEncodingTests.java
rm -rf src/org/bouncycastle/gpg/keybox
rm -rf src/org/bouncycastle/gpg/test
rm src/org/bouncycastle/asn1/test/MonetaryValueUnitTest.java
rm src/org/bouncycastle/asn1/test/NameOrPseudonymUnitTest.java
rm src/org/bouncycastle/asn1/test/NetscapeCertTypeTest.java
rm src/org/bouncycastle/asn1/test/OctetStringTest.java
rm src/org/bouncycastle/asn1/test/ParseTest.java
rm src/org/bouncycastle/asn1/test/PersonalDataUnitTest.java
rm src/org/bouncycastle/asn1/test/PKIFailureInfoTest.java
rm src/org/bouncycastle/asn1/test/QCStatementUnitTest.java
rm src/org/bouncycastle/asn1/test/ReasonFlagsTest.java
rm src/org/bouncycastle/asn1/test/SemanticsInformationUnitTest.java
rm src/org/bouncycastle/asn1/test/SetTest.java
rm src/org/bouncycastle/asn1/test/SignerLocationUnitTest.java
rm src/org/bouncycastle/asn1/test/SMIMETest.java
rm src/org/bouncycastle/asn1/test/TagTest.java
rm src/org/bouncycastle/asn1/test/TypeOfBiometricDataUnitTest.java
rm src/org/bouncycastle/asn1/test/UTCTimeTest.java
rm src/org/bouncycastle/crypto/test/SimpleTestTest.java
rm src/org/bouncycastle/crypto/test/HPKETest*.java
rm src/org/bouncycastle/crypto/test/Argon2Test.java
rm src/org/bouncycastle/crypto/test/AESVectorFileTest.java
rm src/org/bouncycastle/crypto/test/GCMReorderTest.java
rm src/org/bouncycastle/crypto/test/HCFamilyVecTest.java
rm src/org/bouncycastle/crypto/test/RSABlindedTest.java
rm src/org/bouncycastle/crypto/test/SP80038GTest.java
rm src/org/bouncycastle/crypto/digests/Blake3Digest.java
rm src/org/bouncycastle/crypto/digests/Blake2sxDigest.java
rm src/org/bouncycastle/crypto/digests/Blake2spDigest.java
rm src/org/bouncycastle/crypto/digests/Blake2bpDigest.java
rm src/org/bouncycastle/crypto/test/Blake2bp*.java
rm src/org/bouncycastle/crypto/test/Blake2sx*.java
rm src/org/bouncycastle/crypto/test/Blake2sp*.java
rm src/org/bouncycastle/crypto/macs/Blake3Mac.java
rm src/org/bouncycastle/crypto/test/Blake3*.java
rm src/org/bouncycastle/crypto/params/Blake3*.java
find src -name AllTests.java -exec rm {} \;
find src -name jcajce -exec rm -r {} \;
rm src/org/bouncycastle/asn1/test/GetInstanceTest.java
rm src/org/bouncycastle/asn1/test/ASN1SequenceParserTest.java
rm src/org/bouncycastle/asn1/test/OctetStringTest.java
rm src/org/bouncycastle/asn1/test/ParseTest.java
rm src/org/bouncycastle/crypto/test/GCMReorderTest.java
rm -r src/org/bouncycastle/legacy/pqc/crypto/test
rm src/org/bouncycastle/cert/test/BcCertTest.java
rm src/org/bouncycastle/cert/test/GOST3410_2012CMSTest.java
rm src/org/bouncycastle/crypto/test/SCryptTest.java
rm src/org/bouncycastle/crypto/test/SM2EngineTest.java
rm src/org/bouncycastle/crypto/examples/DESExample.java
rm src/org/bouncycastle/pqc/crypto/test/EncryptionKeyTest.java
rm -r src/org/bouncycastle/util/io/pem
rm -r src/org/bouncycastle/crypto/test/cavp
rm -r src/org/bouncycastle/crypto/test/speedy
rm -r src/org/bouncycastle/asn1/test/EnumeratedTest.java
rm -r src/org/bouncycastle/crypto/test/KDFFeedbackGeneratorTest.java
rm -r src/org/bouncycastle/crypto/test/KDFDoublePipelineIteratorGeneratorTest.java
rm -r src/org/bouncycastle/crypto/test/KDFCounterGeneratorTest.java
rm src/org/bouncycastle/cert/test/ConverterTest.java
rm src/org/bouncycastle/cert/test/BcPKCS10Test.java
rm src/org/bouncycastle/cert/test/BcAttrCertTest.java
rm src/org/bouncycastle/cert/test/BcAttrCertSelectorTest.java
rm src/org/bouncycastle/cert/test/CertPathLoopTest.java
rm src/org/bouncycastle/cert/test/DANETest.java
rm src/org/bouncycastle/cert/test/X509ExtensionUtilsTest.java
rm src/org/bouncycastle/crypto/test/BigSkippingCipherTest.java
rm src/org/bouncycastle/crypto/test/OpenSSHKeyParsingTests.java
rm -r src/org/bouncycastle/util/utiltest
rm -r src/org/bouncycastle/openpgp/examples
rm src/org/bouncycastle/openpgp/PGPCompressed*
rm src/org/bouncycastle/openpgp/PGPCanonicalizedDataGenerator*
rm -r src/org/bouncycastle/util/encoders/test
rm -r src/org/bouncycastle/util/io/test
rm src/org/bouncycastle/cms/CMSProcessableFile.java
rm -r src/org/bouncycastle/math/ec/test
rm -r src/org/bouncycastle/crypto/agreement/test
rm -r src/org/bouncycastle/crypto/tls/test
rm -r src/org/bouncycastle/i18n
rm -r src/org/bouncycastle/openssl
rm -r src/org/bouncycastle/apache
rm -r src/org/bouncycastle/voms
rm -r src/org/bouncycastle/math/ec/tools
rm -f src/org/bouncycastle/crypto/*/PhotonB*
rm -f src/org/bouncycastle/crypto/*/Elephant*
rm -f src/org/bouncycastle/crypto/*/ISAP*
rm -f src/org/bouncycastle/crypto/*/Sparkle*
rm -f src/org/bouncycastle/crypto/*/Xoo*
rm src/org/bouncycastle/cert/test/ExternalKeyTest.java
rm src/org/bouncycastle/mozilla/SignedPublicKeyAndChallenge.java
for i in src/org/bouncycastle/pqc/crypto/*/*.java src/org/bouncycastle/pqc/crypto/*/*/*.java src/org/bouncycastle/pqc/math/*/*.java src/org/bouncycastle/pqc/math/*/*/*.java src/org/bouncycastle/crypto/digests/*.java src/org/bouncycastle/crypto/engines/*.java src/org/bouncycastle/bcpg/*.java src/org/bouncycastle/openpgp/*.java
do
ed $i <<%%
g/ .Override/d
w
q
%%
done
ed src/org/bouncycastle/asn1/test/RegressionTest.java <<%
g/new MiscTest(),/s///g
w
q
%
ed src/org/bouncycastle/cms/CMSSignedDataGenerator.java <<%
g/LinkedHashSet/s//HashSet/g
w
q
%
ed src/org/bouncycastle/openpgp/PGPEncryptedData.java <<%
g/new UnsupportedOperationException/s//new RuntimeException/g
w
q
%
ed src/org/bouncycastle/openpgp/operator/bc/BcPGPDataEncryptorBuilder.java <<%
g/public BcPGPDataEncryptorBuilder setWi/s//public PGPDataEncryptorBuilder setWi/g
w
q
%
ed src/org/bouncycastle/gpg/SExpression.java <<%
g/\.\.\. /s//[]/g
w
q
%
ed src/org/bouncycastle/cms/CMSAuthEnvelopedDataGenerator.java <<%
g/java.util.Collections/s//java.util.HashMap/
g/Collections.EMPTY_MAP/s//new HashMap()/
w
q
%
ed src/org/bouncycastle/cms/CMSAuthenticatedDataStreamGenerator.java <<%
g/java.util.Collections/s/$/ import java.util.HashMap;/
g/Collections.EMPTY_MAP/s//new HashMap()/
w
q
%
ed src/org/bouncycastle/cms/CMSAuthenticatedDataGenerator.java <<%
g/java.util.Collections/s/$/ import java.util.HashMap;/
g/Collections.EMPTY_MAP/s//new HashMap()/
w
q
%
ed src/org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.java <<%
g/java.util.Collections/s//java.util.HashMap/
g/Collections.EMPTY_MAP/s//new HashMap()/
w
q
%
ed src/org/bouncycastle/cms/CMSEnvelopedDataGenerator.java <<%
g/java.util.Collections/s//java.util.HashMap/
g/Collections.EMPTY_MAP/s//new HashMap()/
w
q
%
ed src/org/bouncycastle/cms/CMSEncryptedDataGenerator.java <<%
g/java.util.Collections/s//java.util.HashMap/
g/Collections.EMPTY_MAP/s//new HashMap()/
w
q
%
ed src/org/bouncycastle/cert/cmp/CMSProcessableCMPCertificate.java <<%
g/\.\.\. /s//[]/g
g/^ *.Override/s///
w
q
%
ed src/org/bouncycastle/cert/crmf/CertificateRepMessageBuilder.java <<%
g/\.\.\. /s//[]/g
g/^ *.Override/s///
w
q
%
)
find $target/src -name "*.java" -exec scripts/trim.sh \{\} \;
(2>&1 find $target -name CVS -exec rm -rf \{\} \; ) > /dev/null
(
cd $target;
javadoc -windowtitle "$WINDOWTITLE" -doctitle "$DOCTITLE" \
-header "$HEADER" \
-group "Lightweight Crypto Packages" "org.bouncycastle.crypto*" \
-group "ASN.1 Support Packages" "org.bouncycastle.asn1*" \
-group "OpenPGP Support Packages" "org.bouncycastle.bcpg*:org.bouncycastle.openpgp*" \
-group "Basic Signing And Encryption" "org.bouncycastle.operator*" \
-group "Certificate Generation And Handling Support Packages" "org.bouncycastle.cert*" \
-group "CMS Support Packages" "org.bouncycastle.cms*" \
-group "EAC Support Packages" "org.bouncycastle.eac*" \
-group "TSP Support Packages" "org.bouncycastle.tsp*" \
-group "PKCS Support Packages" "org.bouncycastle.pkcs*" \
-group "Post-Quantum Crypto Packages" "org.bouncycastle.pqc*" \
-group "Utility Packages" "org.bouncycastle.util*:org.bouncycastle.math*" \
-classpath classes \
-d javadoc -sourcepath src -breakiterator \
org.bouncycastle.asn1 \
org.bouncycastle.asn1.cmp \
org.bouncycastle.asn1.cms \
org.bouncycastle.asn1.cryptopro \
org.bouncycastle.asn1.esf \
org.bouncycastle.asn1.ess \
org.bouncycastle.asn1.gnu \
org.bouncycastle.asn1.iana \
org.bouncycastle.asn1.icao \
org.bouncycastle.asn1.misc \
org.bouncycastle.asn1.mozilla \
org.bouncycastle.asn1.nist \
org.bouncycastle.asn1.ocsp \
org.bouncycastle.asn1.oiw \
org.bouncycastle.asn1.pkcs \
org.bouncycastle.asn1.sec \
org.bouncycastle.asn1.smime \
org.bouncycastle.asn1.teletrust \
org.bouncycastle.asn1.test \
org.bouncycastle.asn1.tsp \
org.bouncycastle.asn1.util \
org.bouncycastle.asn1.x500 \
org.bouncycastle.asn1.x500.style \
org.bouncycastle.asn1.x509 \
org.bouncycastle.asn1.x9 \
org.bouncycastle.bcpg \
org.bouncycastle.bcpg.sig \
org.bouncycastle.openpgp \
org.bouncycastle.openpgp.bc \
org.bouncycastle.openpgp.operator \
org.bouncycastle.openpgp.operator.bc \
org.bouncycastle.operator \
org.bouncycastle.operator.bc \
org.bouncycastle.cert \
org.bouncycastle.cert.crmf \
org.bouncycastle.cert.crmf.bc \
org.bouncycastle.cert.cmp \
org.bouncycastle.pkcs \
org.bouncycastle.pkcs.bc \
org.bouncycastle.tsp \
org.bouncycastle.cms \
org.bouncycastle.cms.bc \
org.bouncycastle.math.ec \
org.bouncycastle.crypto \
org.bouncycastle.crypto.agreement \
org.bouncycastle.crypto.commitments \
org.bouncycastle.crypto.digests \
org.bouncycastle.crypto.encodings \
org.bouncycastle.crypto.engines \
org.bouncycastle.crypto.generators \
org.bouncycastle.crypto.io \
org.bouncycastle.crypto.kems \
org.bouncycastle.crypto.macs \
org.bouncycastle.crypto.modes \
org.bouncycastle.crypto.params \
org.bouncycastle.crypto.parsers \
org.bouncycastle.crypto.paddings \
org.bouncycastle.crypto.signers \
org.bouncycastle.crypto.prng \
org.bouncycastle.crypto.test \
org.bouncycastle.crypto.util \
org.bouncycastle.crypto.examples \
org.bouncycastle.pqc.asn1 \
org.bouncycastle.pqc.crypto \
org.bouncycastle.pqc.crypto.cmce \
org.bouncycastle.pqc.crypto.ntruprime \
org.bouncycastle.pqc.crypto.crystals.kyber \
org.bouncycastle.pqc.crypto.crystals.dilithium \
org.bouncycastle.pqc.crypto.falcon \
org.bouncycastle.pqc.legacy.crypto.rainbow \
org.bouncycastle.pqc.legacy.crypto.mceliece \
org.bouncycastle.pqc.legacy.crypto.gmss \
org.bouncycastle.util \
org.bouncycastle.util.encoders \
org.bouncycastle.util.test > /dev/null \
)
fi