GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Netty/Handler requires bc-fips in OSGi · Issue #14080 · netty/netty

Netty/Handler requires bc-fips in OSGi #14080

New issue
Copy link
New issue
Copy link
Closed
#14082
Closed
Netty/Handler requires bc-fips in OSGi#14080
#14082
Copy link
Milestone
4.1.111.Final

Description

@croister
croister
opened on May 24, 2024
Issue body actions

Expected behavior

The Netty Handler bundle should resolve using the bcprov bundle and not require the bc-fips bundle from BouncyCastle.

Actual behavior

The Netty Handler bundle has a, non optional, dependency on the "org.bouncycastle.jcajce.provider" package which is provided by the bc-fips bundle from BouncyCastle.

Unable to resolve io.netty.handler/4.1.110.Final: missing requirement [io.netty.handler/4.1.110.Final] osgi.wiring.package; filter:="(osgi.wiring.package=org.bouncycastle.jcajce.provider)"

Steps to reproduce

netty-handler 4.1.109.Final has this dependency on bcprov:

org.bouncycastle.jce.provider;version="[1.69,2)";resolution:=optional

netty-handler 4.1.110.Final adds this mandatory dependency on bc-fips:

org.bouncycastle.jcajce.provider

This is most likely due to this commit: d868c7b
It aims to make it possible to use either bcprov or bc-fips as the provider but ends up making bc-fips mandatory in OSGi.

Minimal yet complete reproducer code (or URL to code)

Not applicable

Netty version

Netty/Handler 4.1.110.Final

JVM version (e.g. java -version)

Not applicable

OS version (e.g. uname -a)

Not applicable

Activity

  1. chrisvest commented on May 24, 2024

    @chrisvest
    chrisvest
    on May 24, 2024
    Member
    More actions

    Is this something you could investigate why it does that? I don't see how OSGi make its decision in either case.

  2. croister commented on May 25, 2024

    @croister
    croister
    on May 25, 2024
    ContributorAuthor
    More actions

    OSGi reads the "Import-Package" instructions in the "MANIFEST.MF" file in the jar file to resolve dependencies.

    These instructions are generated by the "maven-bundle-plugin" by looking at the imports in the source files.
    It then uses the dependencies in the pom file to determine versions and optionality.
    The "bcprov-jdk15on" dependency has the version "1.69" and is marked as optional.
    (It is not actually added to the pom file, but should probably be. The plugin resolves it anyway it seems.)

    This results in an entry like this in the "MANIFEST.MF" file: "org.bouncycastle.jce.provider;version="[1.69,2)";resolution:=optional"

    The "bc-fips" dependency is not added to the pom file and therefore the plugin can't determine the version and if the dependency should be optional.
    The default is that a dependency is mandatory so this is the entry for it: "org.bouncycastle.jcajce.provider"

    To solve this issue you can either add "bc-fips" as an optional dependency or give plugin configuration to tell it that it should be optional and which version to use.

  3. croister
    added a commit that references this issue on May 25, 2024

    Remove unwanted mandatory dependency in OSGi

    268aaaa
  4. normanmaurer
    added this to the 4.1.111.Final milestone on May 27, 2024
  5. normanmaurer
    closed this as completedin #14082on May 27, 2024
  6. normanmaurer
    added 3 commits that reference this issue on May 27, 2024

    Remove unwanted mandatory dependency in OSGi (#14082)

    This issue will close once commit c29757c is merged into the '4.2' branch.
    c29757c

    Remove unwanted mandatory dependency in OSGi (#14082)

    This issue will close once commit 68d1c8e is merged into the '4.2' branch.
    68d1c8e

    Remove unwanted mandatory dependency in OSGi (#14082)

    This issue will close once commit 7c67bc5 is merged into the '4.2' branch.
    7c67bc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • 4.1.111.Final

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.