Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 70C04200AED for ; Tue, 3 May 2016 22:12:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6F2421609F4; Tue, 3 May 2016 22:12:19 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BABC21609A9 for ; Tue, 3 May 2016 22:12:18 +0200 (CEST) Received: (qmail 17321 invoked by uid 500); 3 May 2016 20:12:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 17300 invoked by uid 99); 3 May 2016 20:12:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 20:12:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CA06A2C14F4 for ; Tue, 3 May 2016 20:12:12 +0000 (UTC) Date: Tue, 3 May 2016 20:12:12 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CRYPTO-45) Document how to build Commons Crypto MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 20:12:19 -0000 [ https://issues.apache.org/jira/browse/CRYPTO-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269490#comment-15269490 ] Chris Nauroth commented on CRYPTO-45: ------------------------------------- In this documentation, let's please include a note that running the tests requires installation of the JCE Unlimited Strength Policy. I think some package maintainers include it automatically, but it's generally not included in a stock Oracle JDK download. For example, the OpenJDK 7 package on my CentOS VM came with it. We can hyperlink to the instructions for installing it. Without JCE Unlimited Strength, there will be a test failure in {{JceCipherTest}}, like this: {code} Running org.apache.commons.crypto.cipher.JceCipherTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.634 sec <<< FAILURE! - in org.apache.commons.crypto.cipher.JceCipherTest cryptoTest(org.apache.commons.crypto.cipher.JceCipherTest) Time elapsed: 0.632 sec <<< FAILURE! java.lang.AssertionError: AES failed initialisation - java.security.InvalidKeyException: Illegal key size at org.junit.Assert.fail(Assert.java:91) at org.apache.commons.crypto.cipher.AbstractCipherTest.byteBufferTest(AbstractCipherTest.java:107) at org.apache.commons.crypto.cipher.AbstractCipherTest.cryptoTest(AbstractCipherTest.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) {code} > Document how to build Commons Crypto > ------------------------------------ > > Key: CRYPTO-45 > URL: https://issues.apache.org/jira/browse/CRYPTO-45 > Project: Commons Crypto > Issue Type: Bug > Components: Document > Reporter: Benedikt Ritter > > While trying to deploy the website I run into this problem: > {code} > [INFO] --- maven-antrun-plugin:1.7:run (make) @ commons-crypto --- > [INFO] Executing tasks > make: > [exec] compiling OSInfo.java > [exec] "$JAVA_HOME/bin/javac" -source 1.6 -target 1.6 -d target/jni-classes -sourcepath src/main/java src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandomNative.java > [exec] warning: [options] bootstrap class path not set in conjunction with -source 1.6 > [exec] 1 warning > [exec] "$JAVA_HOME/bin/javah" -force -classpath target/jni-classes -o target/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.h org.apache.commons.crypto.random.OpensslCryptoRandomNative > [exec] gcc -arch x86_64 -Ilib/inc_mac -I/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/include -O2 -fPIC -mmacosx-version-min=10.5 -fvisibility=hidden -Ilib/include -I/usr/include -I"src/main/native/org/apache/commons/crypto/" -I"/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/include/darwin" -I"target/jni-classes/org/apache/commons/crypto/cipher" -I"target/jni-classes/org/apache/commons/crypto/random" -c src/main/native/org/apache/commons/crypto/random/OpensslCryptoRandomNative.c -o target/commons-crypto-1.0.0-SNAPSHOT-Mac-x86_64/OpensslCryptoRandom.o > [exec] In file included from src/main/native/org/apache/commons/crypto/random/OpensslCryptoRandomNative.c:19: > [exec] In file included from src/main/native/org/apache/commons/crypto/random/org_apache_commons_crypto_random.h:22: > [exec] src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h:196:10: fatal error: 'openssl/aes.h' file not found > [exec] #include > [exec] ^ > [exec] 1 error generated. > [exec] make: *** [target/commons-crypto-1.0.0-SNAPSHOT-Mac-x86_64/OpensslCryptoRandom.o] Error 1 > {code} > I'm pretty lost, since I don't know c programming. Would be good to have some documentation on how to set up the development environment (on Linux/Mac OS/Windows) for building crypto. -- This message was sent by Atlassian JIRA (v6.3.4#6332)