Re: [PR] CRYPTO-174: Allow override of SSL library name [commons-crypto]

2023-11-07 Thread via GitHub


sebbASF merged PR #269:
URL: https://github.com/apache/commons-crypto/pull/269


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] CRYPTO-174: Allow override of SSL library name [commons-crypto]

2023-11-07 Thread via GitHub


sebbASF opened a new pull request, #269:
URL: https://github.com/apache/commons-crypto/pull/269

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Crypto 174 [commons-crypto]

2023-11-07 Thread via GitHub


sebbASF merged PR #268:
URL: https://github.com/apache/commons-crypto/pull/268


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Crypto 174 [commons-crypto]

2023-11-07 Thread via GitHub


sebbASF opened a new pull request, #268:
URL: https://github.com/apache/commons-crypto/pull/268

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (CRYPTO-175) JNA tests rely on JNI code

2023-11-07 Thread Sebb (Jira)
Sebb created CRYPTO-175:
---

 Summary: JNA tests rely on JNI code
 Key: CRYPTO-175
 URL: https://issues.apache.org/jira/browse/CRYPTO-175
 Project: Commons Crypto
  Issue Type: Bug
Reporter: Sebb


The JNA tests rely on being able to use the JNI code.

For example, this JNA test works:

mvn test -Dtest=CbcNoPaddingCipherJnaStreamTest

However the following test fails:

mvn test -Dtest=CbcNoPaddingCipherJnaStreamTest -Djni.library.path=/tmp/

with

Caused by: java.lang.UnsatisfiedLinkError: Cannot load libcrypto.dylib 
(dlopen(/tmp/libcrypto.dylib, 0x0009): tried: '/tmp/libcrypto.dylib' (no such 
file), '/private/tmp/libcrypto.dylib' (no such file))!

I suspect this may be due to re-using some of the jni test classes.

I suppose it is possible that the loading of the JNI classes is incidental, and 
maybe the tests don't actually invoke them, but the tests ought to run even if 
JNI is not available.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IO-819) Commons IO v2.15.0 is breaking android builds

2023-11-07 Thread Stephan Markwalder (Jira)


[ 
https://issues.apache.org/jira/browse/IO-819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17783792#comment-17783792
 ] 

Stephan Markwalder commented on IO-819:
---

Or better: I think there is no reason for Android's Jetifier to process the JAR 
file of Commons IO. As far as I know, Jetifier is used to rewrite some 
Android-specific API calls in libraries built for older Android versions. Since 
Commons IO does not use any Android APIs, you should be safe to put it on 
Jetifier's ignore list. Search for "android.jetifier.ignorelist" to find more 
information about this.

> Commons IO v2.15.0 is breaking android builds
> -
>
> Key: IO-819
> URL: https://issues.apache.org/jira/browse/IO-819
> Project: Commons IO
>  Issue Type: Bug
>Affects Versions: 2.15.0
> Environment: java --version
> openjdk 11.0.21 2023-10-17 LTS
> OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS)
> OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode)
>  
> Mac OS 14.1 on Apple Silicon 
>Reporter: Pranshu
>Priority: Major
> Attachments: Screenshot 2023-10-27 at 00.07.46.png, stacktrace.txt
>
>
> Hey we are using commons +commons-io:commons-io+ java package in out React 
> Native app on the android side. 
> Apparently the recently releases version v2.15.0 is breaking android builds, 
> whereas versions <= v2.14.0 works well. 
> Steps to Repro
> 1. Create a RN app 
> npx react-native init CommonsIORepro
> 2. Add commons-io dep android/{*}app{*}/build.gradle
> dependencies{    
>         implementation "commons-io:commons-io:2.15.0"
> }
>  
> 3. yarn run start 
> 4. In a new terminal - yarn run android



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IO-819) Commons IO v2.15.0 is breaking android builds

2023-11-07 Thread Stephan Markwalder (Jira)


[ 
https://issues.apache.org/jira/browse/IO-819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17783789#comment-17783789
 ] 

Stephan Markwalder commented on IO-819:
---

I'm not an expert for Android and its build tools, but maybe the following 
information helps someone else with more know-how.

Looking a little bit deeper into the stacktrace, there is this information:

 
{code:java}
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed 
to complete, origin: 
/Users/pranshu/.gradle/caches/transforms-3/7cdc58ab883977f6fa537449bff40fa0/transformed/jetified-commons-io-2.15.0.jar:org/apache/commons/io/FileCleaningTracker$Reaper.class
    at Version.fakeStackEntry(Version_4.0.52.java:0)
    at 
com.android.tools.r8.internal.vk.a(R8_4.0.52_5a340ca2823c7e792fe09805c75f749b9d398d230bc0518bb54ae9b6b50addbe:75)
    at [...] {code}
The issue seems to be related to processing the class file 
{{{}org/apache/commons/io/FileCleaningTracker$Reaper.class{}}}.

 

The inner class {{Reaper}} in {{FileCleaningTracker}} is rather simple:
[https://github.com/apache/commons-io/blob/rel/commons-io-2.15.0/src/main/java/org/apache/commons/io/FileCleaningTracker.java#L53-L82]

The last change to this file was done almost 5 months ago in June 2023. This 
was before the release of Commons IO 2.14.0 in September 2023. If I decompile 
the class files from Commons IO 2.14.0 and 2.15.0, the source code looks 
identical.

But the binary class files are not identical. The one for 2.14.0 is 1614 bytes 
in size, while the one for 2.15.0 has a size of 1644 bytes (+30 bytes). This 
could be explained by the fact that the build for 2.14.0 was running Maven on 
Java 17 and the build for 2.15.0 on Java 21, both presumably using the Java 
compiler shipped with these Java versions. However, both builds were correctly 
targeting Java 8 (class file version 52).

If I use {{javap}} to dump the content of the class files (with all extra flags 
to include as much information as possible), the constructor for inner class 
{{Reaper}} seems to have some extra metadata associated with its method 
parameters.

2.14.0:

 
{noformat}
  
org.apache.commons.io.FileCleaningTracker$Reaper(org.apache.commons.io.FileCleaningTracker);
    descriptor: (Lorg/apache/commons/io/FileCleaningTracker;)V
    flags: (0x)
    Code:
  [...]{noformat}
2.15.0:

 

 
{noformat}
  
org.apache.commons.io.FileCleaningTracker$Reaper(org.apache.commons.io.FileCleaningTracker);
    descriptor: (Lorg/apache/commons/io/FileCleaningTracker;)V
    flags: (0x)
    Code:
      [...]
    MethodParameters:
      Name                           Flags
                            final synthetic{noformat}
If you look at the source code, you can see that the inner class has only a 
no-arg constructor. But the binary code actually expects the method to receive 
a reference to an instance of the outer class. I assume this is how instances 
of inner classes get to know their parent/outer instance. This is a synthetic 
parameter without a defined name (see the "" above). I assume that 
this "missing" name is what breaks your Android build. If Android's Jetifier 
tries to process the content of the class file, it doesn't expect to find a 
nameless parameter. Similar issues have been reported for other tools, even for 
components of the JDK itself (see 
[JDK-8304837|https://bugs.openjdk.org/browse/JDK-8304837] for an example). If 
my assumption would be true, you will have to wait for an update of Android's 
Jetifier to have this issue fixed.

 

 

> Commons IO v2.15.0 is breaking android builds
> -
>
> Key: IO-819
> URL: https://issues.apache.org/jira/browse/IO-819
> Project: Commons IO
>  Issue Type: Bug
>Affects Versions: 2.15.0
> Environment: java --version
> openjdk 11.0.21 2023-10-17 LTS
> OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS)
> OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode)
>  
> Mac OS 14.1 on Apple Silicon 
>Reporter: Pranshu
>Priority: Major
> Attachments: Screenshot 2023-10-27 at 00.07.46.png, stacktrace.txt
>
>
> Hey we are using commons +commons-io:commons-io+ java package in out React 
> Native app on the android side. 
> Apparently the recently releases version v2.15.0 is breaking android builds, 
> whereas versions <= v2.14.0 works well. 
> Steps to Repro
> 1. Create a RN app 
> npx react-native init CommonsIORepro
> 2. Add commons-io dep android/{*}app{*}/build.gradle
> dependencies{    
>         implementation "commons-io:commons-io:2.15.0"
> }
>  
> 3. yarn run start 
> 4. In a new terminal - yarn run android



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] Add test for FileChannels.contentEquals. [commons-io]

2023-11-07 Thread via GitHub


smarkwal commented on PR #509:
URL: https://github.com/apache/commons-io/pull/509#issuecomment-1799795299

   Hi @garydgregory 
   
   I have added the license header and also applied a code style that seems to 
be used in this project. I was not able to find an `.editorconfig` file or 
similar. But I found [this CodeStyle wiki 
page](https://cwiki.apache.org/confluence/display/commons/CodeStyle) and looked 
at some other source files for clues.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org