Skip to content

Commit 99eb2cf

Browse files
committed
add readme
1 parent 65c215b commit 99eb2cf

File tree

2 files changed

+104
-2
lines changed

2 files changed

+104
-2
lines changed

README.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Java-HKP-Client Java OpenPGP HTTP Keyserver Protocol API Client
2+
3+
## What is it?
4+
5+
This library provides an easy to use client library for interacting with a OpenPGP HTTP Keyserver Protocol (HKP) server.
6+
7+
## How to use this library
8+
9+
This client library is released on Maven Central. Add a new dependency to your project's POM file:
10+
11+
```xml
12+
<dependency>
13+
<groupId>org.sourcelab</groupId>
14+
<artifactId>java-hkp-client</artifactId>
15+
<version>3.1.0</version>
16+
</dependency>
17+
```
18+
19+
20+
#### Example Code:
21+
```java
22+
/*
23+
* Create a new configuration object.
24+
*
25+
* This configuration also allows you to define some optional details on your connection,
26+
* such as using an outbound proxy (authenticated or not), SSL client settings, etc..
27+
*/
28+
final Configuration.Builder configuration = Configuration.newBuilder()
29+
.withKeyServerHost("http://pool.sks-keyservers.net");
30+
31+
/*
32+
* Create an instance of HKPClient, passing your configuration.
33+
*/
34+
final HkpClient client = new HkpClient(configuration);
35+
36+
/*
37+
* Making requests by calling the public methods available on HkpClient.
38+
*
39+
* For example, search for a key by Email:
40+
*/
41+
final SearchIndexResponse result = client
42+
.search(new SearchRequest("example@example.com"));
43+
44+
/*
45+
* or retrieve a key by KeyId.
46+
*/
47+
final Optional<PgpPublicKey> result = client.get(new GetRequest("0x92E73960FC59970DFB12F0146D712A2D27F74CE9"));
48+
49+
/*
50+
* See HkpClient for other available operations.
51+
*/
52+
```
53+
54+
Public methods available on HkpClient can be [found here](src/main/java/org/sourcelab/hkp/HkpClient.java#L62)
55+
56+
# Contributing
57+
58+
Found a bug? Think you've got an awesome feature you want to add? We welcome contributions!
59+
60+
## Submitting a Contribution
61+
62+
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.
63+
1. Fork this repository on GitHub and create a branch for your feature.
64+
1. Clone your fork and branch to your local machine.
65+
1. Commit changes to your branch.
66+
1. Push your work up to GitHub.
67+
1. Submit a pull request so that we can review your changes.
68+
69+
*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.*
70+
71+
## Acceptance Criteria
72+
73+
We love contributions, but it's important that your pull request adhere to some of the standards we maintain in this repository.
74+
75+
- All tests must be passing!
76+
- All code changes require tests!
77+
- All code changes must be consistent with our checkstyle rules.
78+
- Great inline comments.
79+
80+
# Other Notes
81+
82+
83+
## Releasing
84+
85+
Steps for proper release:
86+
- Update release version: `mvn versions:set -DnewVersion=X.Y.Z`
87+
- Validate and then commit version: `mvn versions:commit`
88+
- Update CHANGELOG and README files.
89+
- Merge to master.
90+
- Deploy to Maven Central: `mvn clean deploy -P release`
91+
- Create release on Github project.
92+
93+
94+
## Changelog
95+
96+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
97+
and this project adheres to [Semantic Versioning](http://semver.org/).
98+
99+
[View Changelog](CHANGELOG.md)
100+
101+
102+

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<!-- Module Description and Ownership -->
1717
<name>Http KeyServer Protocol Client for Java</name>
1818
<description>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 </description>
19-
<url>https://github.com/sourcelaborg/kafka-connect-client</url>
19+
<url>https://github.com/SourceLabOrg/java-hkp-client</url>
2020
<developers>
2121
<developer>
2222
<name>Stephen Powis</name>
@@ -38,7 +38,7 @@
3838
<scm>
3939
<connection>scm:git:git://github.com/sourcelaborg/java-hkp-client.git</connection>
4040
<developerConnection>scm:git:ssh://github.com:sourcelaborg/java-hkp-client.git</developerConnection>
41-
<url>https://github.com/SourceLabOrg/java-hkp-client/tree/master</url>
41+
<url>https://github.com/SourceLabOrg/java-hkp-client/tree/main</url>
4242
</scm>
4343

4444
<!-- Module Properties -->

0 commit comments

Comments
 (0)