Http KeyServer Protocol Client for Java

A client for talking to PGP Key Servers using HKP (Http KeyServer Protocol). Defined by RFC https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00

License

License

Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

org.sourcelab
ArtifactId

ArtifactId

java-hkp-client
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Http KeyServer Protocol Client for Java
A client for talking to PGP Key Servers using HKP (Http KeyServer Protocol). Defined by RFC https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00
Project URL

Project URL

https://github.com/SourceLabOrg/java-hkp-client
Source Code Management

Source Code Management

https://github.com/SourceLabOrg/java-hkp-client/tree/main

Download java-hkp-client

How to add to project

<!-- https://jarcasting.com/artifacts/org.sourcelab/java-hkp-client/ -->
<dependency>
    <groupId>org.sourcelab</groupId>
    <artifactId>java-hkp-client</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.sourcelab/java-hkp-client/
implementation 'org.sourcelab:java-hkp-client:0.2.0'
// https://jarcasting.com/artifacts/org.sourcelab/java-hkp-client/
implementation ("org.sourcelab:java-hkp-client:0.2.0")
'org.sourcelab:java-hkp-client:jar:0.2.0'
<dependency org="org.sourcelab" name="java-hkp-client" rev="0.2.0">
  <artifact name="java-hkp-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.sourcelab', module='java-hkp-client', version='0.2.0')
)
libraryDependencies += "org.sourcelab" % "java-hkp-client" % "0.2.0"
[org.sourcelab/java-hkp-client "0.2.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.httpcomponents.client5 : httpclient5 jar 5.0.3
org.slf4j : slf4j-api jar 1.7.30

test (4)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.7.0
org.apache.logging.log4j : log4j-api jar 2.13.2
org.apache.logging.log4j : log4j-core jar 2.13.2
org.apache.logging.log4j : log4j-slf4j-impl jar 2.13.2

Project Modules

There are no modules declared in this project.

Java-HKP-Client Java OpenPGP HTTP Keyserver Protocol API Client

What is it?

This library provides an easy to use client library for interacting with a OpenPGP HTTP Keyserver Protocol (HKP) server.

How to use this library

This client library is released on Maven Central. Add a new dependency to your project's POM file:

<dependency>
    <groupId>org.sourcelab</groupId>
    <artifactId>java-hkp-client</artifactId>
    <version>0.2.0</version>
</dependency>

Example Code:

/*
 * Create a new configuration object.
 *
 * This configuration also allows you to define some optional details on your connection,
 * such as using an outbound proxy (authenticated or not), SSL client settings, etc..
 */
final Configuration.Builder configuration = Configuration.newBuilder()
        .withKeyServerHost("http://pool.sks-keyservers.net");

/*
 * Create an instance of HKPClient, passing your configuration.
 */
final HkpClient client = new HkpClient(configuration);

/*
 * Making requests by calling the public methods available on HkpClient.
 * 
 * For example, search for a key by Email:
 */
final SearchIndexResponse result = client
    .search(new SearchRequest("[email protected]"));

/*
 * or retrieve a key by KeyId.
 */
final Optional<PgpPublicKey> result = client.get(new GetRequest("0x92E73960FC59970DFB12F0146D712A2D27F74CE9"));

/*
 * See HkpClient for other available operations.
 */

Public methods available on HkpClient can be found here

Contributing

Found a bug? Think you've got an awesome feature you want to add? We welcome contributions!

Submitting a Contribution

  1. Search for an existing issue. If none exists, create a new issue so that other contributors can keep track of what you are trying to add/fix and offer suggestions (or let you know if there is already an effort in progress). Be sure to clearly state the problem you are trying to solve and an explanation of why you want to use the strategy you're proposing to solve it.
  2. Fork this repository on GitHub and create a branch for your feature.
  3. Clone your fork and branch to your local machine.
  4. Commit changes to your branch.
  5. Push your work up to GitHub.
  6. Submit a pull request so that we can review your changes.

Make sure that you rebase your branch off of master before opening a new pull request. We might also ask you to rebase it if master changes after you open your pull request.

Acceptance Criteria

We love contributions, but it's important that your pull request adhere to some of the standards we maintain in this repository.

  • All tests must be passing!
  • All code changes require tests!
  • All code changes must be consistent with our checkstyle rules.
  • Great inline comments.

Other Notes

Releasing

Steps for proper release:

  • Update release version: mvn versions:set -DnewVersion=X.Y.Z
  • Validate and then commit version: mvn versions:commit
  • Update CHANGELOG and README files.
  • Merge to master.
  • Deploy to Maven Central: mvn clean deploy -P release
  • Create release on Github project.

Changelog

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

View Changelog

org.sourcelab

SourceLab.org

Versions

Version
0.2.0
0.1.0