From f41d80b38f754284be919a17fa1662e6cec0c496 Mon Sep 17 00:00:00 2001 From: ZiroKyl Date: Fri, 10 Feb 2017 19:43:57 +0100 Subject: [PATCH 1/2] Build instructions: fix lcrypto googlecode.com does not exist anymore --- README.md | 21 +++++++++- for-lcrypto-j2me/pom.xml | 85 ++++++++++++++++++++++++++++++++++++++++ pom.xml | 9 +---- 3 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 for-lcrypto-j2me/pom.xml diff --git a/README.md b/README.md index f7d1aac..6ad5d58 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,26 @@ or you can download [current sources as a zip file](https://github.com/kwart/tot ### How to build it -You need to have [Maven](http://maven.apache.org/) installed +Download `lcrypto-j2me-xxx.zip` ("xxx" - current version of lcrypto, for example "lcrypto-j2me-156.zip") +from the [Bouncy Castle website](https://www.bouncycastle.org/latest_releases.html) +and extract it to new `lcrypto-j2me` folder. - $ cd totp-me +Copy folder `totp-me/for-lcrypto-j2me/` contents to `lcrypto-j2me` folder. + +Correct the lcrypto-j2me version number in `pom.xml` files +* `lcrypto-j2me/pom.xml`: find `1.56` +* `totp-me/pom.xml`: find `lcrypto-j2me` .. `1.56` + +Install [Maven](https://maven.apache.org). + +Build and install lcrypto-j2me + + $ cd lcrypto-j2me + $ mvn clean install + +Build totp-me + + $ cd ../totp-me $ mvn clean package This default build uses Microemulator API implementation to simplify the build process, but it's only MIDP-2.0 diff --git a/for-lcrypto-j2me/pom.xml b/for-lcrypto-j2me/pom.xml new file mode 100644 index 0000000..b6c70d5 --- /dev/null +++ b/for-lcrypto-j2me/pom.xml @@ -0,0 +1,85 @@ + + 4.0.0 + org.bouncycastle + lcrypto-j2me + 1.56 + Bouncy Castle Lightweight API for J2ME + + UTF-8 + 2.0.4 + + + + org.microemu + microemulator + ${microemulator.version} + provided + + + junit + junit + [4.8.1,) + test + + + + src + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + generate-test-sources + + add-test-source + + + + src/org/bouncycastle/math/ec/custom/sec/test + src/org/bouncycastle/util/test + src/org/bouncycastle/asn1/test + src/org/bouncycastle/openpgp/test + src/org/bouncycastle/crypto/prng/test + src/org/bouncycastle/crypto/ec/test + src/org/bouncycastle/crypto/test + src/org/bouncycastle/cert/test + src/org/bouncycastle/cms/test + src/java/math/test + ?> + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.3 + 1.1 + + ${settings.localRepository}/org/microemu/cldcapi11/${microemulator.version}/cldcapi11-${microemulator.version}.jar${path.separator}${settings.localRepository}/org/microemu/midpapi20/${microemulator.version}/midpapi20-${microemulator.version}.jar + + + **/examples/* + **/test/* + **/org/bouncycastle/cert/dane/fetcher/* + + + + + org.microemu + midpapi20 + ${microemulator.version} + + + + + + + diff --git a/pom.xml b/pom.xml index 98efa21..a1953a2 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ org.bouncycastle lcrypto-j2me - 1.45 + 1.56 @@ -292,11 +292,4 @@ - - - lcrypto - http://jinahya-files.googlecode.com/svn/maven/2/repo/ - - - From 5519e88b9166a4a905561890e6f571f25beac26a Mon Sep 17 00:00:00 2001 From: ZiroKyl Date: Sun, 12 Feb 2017 18:14:48 +0100 Subject: [PATCH 2/2] Remove ignored (not unit tests) locations --- for-lcrypto-j2me/pom.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/for-lcrypto-j2me/pom.xml b/for-lcrypto-j2me/pom.xml index b6c70d5..54da5dd 100644 --- a/for-lcrypto-j2me/pom.xml +++ b/for-lcrypto-j2me/pom.xml @@ -38,17 +38,6 @@ src/org/bouncycastle/math/ec/custom/sec/test - src/org/bouncycastle/util/test - src/org/bouncycastle/asn1/test - src/org/bouncycastle/openpgp/test - src/org/bouncycastle/crypto/prng/test - src/org/bouncycastle/crypto/ec/test - src/org/bouncycastle/crypto/test - src/org/bouncycastle/cert/test - src/org/bouncycastle/cms/test - src/java/math/test - ?>