Skip to content

Commit

Permalink
Move BouncyCastle implementation of hpke to an extra module (#20)
Browse files Browse the repository at this point in the history
Motivation:

We should not depend on BouncyCastle in our OHTTP implementation as its an implementation detail and alterantive implementations will be added.

Modifications:

Move Bouncycastle implementation to extra module and only depend on it for tests.

Result:

No bouncycastle dependency for ohttp codec
  • Loading branch information
normanmaurer authored Dec 21, 2023
1 parent a340fb4 commit 27ff45e
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 0 deletions.
90 changes: 90 additions & 0 deletions codec-ohttp-hpke-bouncycastle/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2023 The Netty Project
~
~ The Netty Project licenses this file to you under the Apache License,
~ version 2.0 (the "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at:
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.netty.incubator</groupId>
<artifactId>netty-incubator-codec-parent-ohttp</artifactId>
<version>0.0.3.Final-SNAPSHOT</version>
</parent>

<artifactId>netty-incubator-codec-ohttp-hpke-bouncycastle</artifactId>
<version>0.0.3.Final-SNAPSHOT</version>
<name>Netty/Incubator/Codec/OHTTP/HPKE/BouncyCastle</name>
<packaging>jar</packaging>

<properties>
<javaModuleName>io.netty.incubator.codec.ohttp.hpke.bouncycastle</javaModuleName>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>${javaModuleName}</Automatic-Module-Name>
</manifestEntries>
<index>true</index>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>io.netty.incubator</groupId>
<artifactId>netty-incubator-codec-ohttp-hpke</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
6 changes: 6 additions & 0 deletions codec-ohttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,11 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty.incubator</groupId>
<artifactId>netty-incubator-codec-ohttp-hpke-bouncycastle</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<module>codec-ohttp</module>
<module>codec-bhttp</module>
<module>codec-ohttp-hpke</module>
<module>codec-ohttp-hpke-bouncycastle</module>
</modules>
<properties>
<javaModuleName />
Expand Down

0 comments on commit 27ff45e

Please sign in to comment.