gansheer opened a new issue, #9227:
URL: https://github.com/apache/camel-quarkus/issues/9227

   ### Bug description
   
   On a FIPS environment `SftpCertificates.generateAll()` unconditionally 
encrypts a test private key using AES-256-CTR via 
`OpenSSHKeyEncryptionContext`. The FIPS security provider does not support AES 
key encryption for OpenSSH private key obfuscation (supported: []), so key 
generation fails.
   
     Since this runs in `SftpTestResource.start()` during JUnit's beforeAll 
phase, it crashes before any method-level `@DisabledIfFipsMode` annotations are 
evaluated, blocking all SFTP tests across the ftp and mina-sftp modules, 
including the ones that are FIPS-compatible. FtpTest is also affected because 
SftpTestResource is registered as a global `@QuarkusTestResource (without 
restrictToAnnotatedClass = true)` by SftpTest.
   ```
     Caused by: java.security.spec.InvalidKeySpecException: Unknown AES key 
length: 256 - supported: []
         at 
org.apache.sshd.common.config.keys.loader.AESPrivateKeyObfuscator.resolveKeyLength(AESPrivateKeyObfuscator.java:95)
         at 
org.apache.sshd.common.config.keys.loader.AESPrivateKeyObfuscator.applyPrivateKeyCipher(AESPrivateKeyObfuscator.java:58)
         at 
org.apache.sshd.common.config.keys.writer.openssh.OpenSSHKeyPairResourceWriter.writePrivateKey(OpenSSHKeyPairResourceWriter.java:112)
         at 
o.a.c.q.test.support.sftp.SftpCertificates.writeKeyPair(SftpCertificates.java:230)
         at 
o.a.c.q.test.support.sftp.SftpCertificates.generateAll(SftpCertificates.java:175)
         at 
o.a.c.q.test.support.sftp.SftpCertificates.generate(SftpCertificates.java:103)
         at 
o.a.c.q.test.support.sftp.SftpTestResource.start(SftpTestResource.java:57)
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to