Karaf 4.4.5 bouncycastle dependency bug

2024-03-20 Thread Anthony Wood
Hi,

There seems to be a mismatch between the requirements of sshd-osgi 2.11.0 (via 
the ‘ssh’ feature) and the version of bouncycastle in Karaf 4.4.5, which is 
1.75:

sshd-osgi 2.11.0 imports:
  org.bouncycastle.asn1.pkcs {version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.crypto.prng   {version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.jce.provider  {version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.openssl   {version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.openssl.jcajce{version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.operator  {version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.pkcs  {version=[1.76,2), 
resolution:=optional}
  org.bouncycastle.pkcs.jcajce   {version=[1.76,2), 
resolution:=optional}

Bouncycastle jars included in karaf 4.4.5:

apache-karaf-4.4.5/system/org/bouncycastle/bcprov-jdk18on/1.75/bcprov-jdk18on-1.75.jar
apache-karaf-4.4.5/system/org/bouncycastle/bcutil-jdk18on/1.75/bcutil-jdk18on-1.75.jar
apache-karaf-4.4.5/system/org/bouncycastle/bcpkix-jdk18on/1.75/bcpkix-jdk18on-1.75.jar

The result is that an RSA host key cannot be generated due to: 
NoClassDefFoundError for org/bouncycastle/openssl/jcajce/JcaPEMWriter, even 
when bcpkix-jdk18on 1.75 is installed by the feature.

We have worked around it by overriding the feature, but it would be great for 
this to be addressed in a 4.4.6 release.

Thanks,
Anthony

Re: Show reverse depends of a bundle on console

2023-08-15 Thread Anthony Wood
Hi Paul,

I am looking for a way to find which bundles are importing packages from a 
*given* bundle.

In karaf 2.x, if I have a bundle dependency network in which both bundles 1 and 
2 import a package exported from bundle 3, this command shows me exactly which 
bundles depend on 3 (i.e., 1 and 2):

karaf> exports -i 3
 ID Packages   Imported by
 3  org.foo.bar; version=1.0   Bundle One (1)
 3  org.foo.baz; version=1.0   Bundle Two (2)

In karaf 4.x, so far I cannot duplicate this.  The best I have found is to use 
“tree-show” on every bundle and search/grep for the bundle 3 that I care about. 
 The “imports” command only shows me the packages, not the bundles satisfying 
them.  I am open to suggestions for recovering the functionality loss.

Thanks,
Anthony



Show reverse depends of a bundle on console

2023-08-11 Thread Anthony Wood
In karaf 2.x, I would often use ‘exports -i $id’ to show the “reverse 
dependencies” of the bundle, i.e., what other bundles are wired to it by 
imports.

I cannot find the equivalent in karat 4.4. Has this functionality been lost?

Thanks,
Anthony