Compare commits

..

No commits in common. "c8bf6c5f837b4d7b05abe628b01d270de5e857eb" and "76a5a91fe03cca7ba22685c351722181f1b8f1be" have entirely different histories.

7 changed files with 6 additions and 29 deletions

View file

@ -5,19 +5,9 @@ SPDX-License-Identifier: CC0-1.0
# Cert-D-PGPainless Changelog
## 0.2.0
## 0.1.3-SNAPSHOT
- `get`: Apply `toLowerCase()` to fingerprints
- Use BCs `PGPPublicKeyRing.join(first, second)` method to properly merge certificates
- Implement storing of `trust-root` key
- Bump `cert-d-java` to `0.2.1`
- Changes to CLI
- Add support for i18n using resource bundles
- Rename `import` command to `insert`
- Rename `multi-import` command to `import`
- Add `export` command
- Add basic `list` command
- `get` command: Allow querying by special name
- Add armor headers to output of `get` command
## 0.1.2
- Add name and description to main command

View file

@ -9,8 +9,7 @@ SPDX-License-Identifier: Apache-2.0
[![Coverage Status](https://coveralls.io/repos/github/pgpainless/cert-d-pgpainless/badge.svg?branch=main)](https://coveralls.io/github/pgpainless/cert-d-pgpainless?branch=main)
[![REUSE status](https://api.reuse.software/badge/github.com/pgpainless/cert-d-pgpainless)](https://api.reuse.software/info/github.com/pgpainless/cert-d-pgpainless)
This repository contains implementations of the [Shared PGP Certificate Directory](https://sequoia-pgp.gitlab.io/pgp-cert-d/)
specification using [PGPainless](https://pgpainless.org) as backend.
This repository contains implementations of the [Shared PGP Certificate Directory](https://sequoia-pgp.gitlab.io/pgp-cert-d/) specification using [PGPainless](https://pgpainless.org) as backend.
The module `pgpainless-cert-d` can be used as a drop-in implementation of
`pgp-certificate-store`.

View file

@ -33,9 +33,6 @@ public class Import implements Runnable {
ByteArrayInputStream certIn = new ByteArrayInputStream(cert.getEncoded());
Certificate certificate = PGPCertDCli.getCertificateDirectory()
.insert(certIn, MergeCallbacks.mergeWithExisting());
// CHECKSTYLE:OFF
System.out.println(certificate.getFingerprint());
// CHECKSTYLE:ON
}
} catch (IOException e) {
LOGGER.error("IO-Error.", e);

View file

@ -25,9 +25,6 @@ public class Insert implements Runnable {
try {
Certificate certificate = PGPCertDCli.getCertificateDirectory()
.insert(System.in, MergeCallbacks.mergeWithExisting());
// CHECKSTYLE:OFF
System.out.println(certificate.getFingerprint());
// CHECKSTYLE:ON
} catch (IOException e) {
LOGGER.error("IO-Error.", e);
System.exit(-1);

View file

@ -17,7 +17,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.pgpainless.certificate_store.MergeCallbacks;
import pgp.cert_d.cli.PGPCertDCli;
import pgp.certificate_store.certificate.KeyMaterial;
import pgp.certificate_store.exception.BadDataException;
import picocli.CommandLine;
@ -62,11 +61,7 @@ public class Setup implements Runnable {
try {
InputStream inputStream = new ByteArrayInputStream(trustRoot.getEncoded());
KeyMaterial inserted = PGPCertDCli.getCertificateDirectory()
.insertTrustRoot(inputStream, MergeCallbacks.overrideExisting());
// CHECKSTYLE:OFF
System.out.println(inserted.getFingerprint());
// CHECKSTYLE:ON
PGPCertDCli.getCertificateDirectory().insertTrustRoot(inputStream, MergeCallbacks.overrideExisting());
} catch (BadDataException e) {
throw new RuntimeException(e);

View file

@ -16,7 +16,6 @@ import pgp.certificate_store.certificate.KeyMaterialMerger;
import pgp.certificate_store.exception.BadDataException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
public class MergeCallbacks {
@ -108,7 +107,7 @@ public class MergeCallbacks {
}
}
private void printOutDifferences(PGPKeyRing existingCert, PGPKeyRing mergedCert) throws IOException {
private void printOutDifferences(PGPKeyRing existingCert, PGPKeyRing mergedCert) {
int numSigsBefore = countSigs(existingCert);
int numSigsAfter = countSigs(mergedCert);
int newSigs = numSigsAfter - numSigsBefore;
@ -116,7 +115,7 @@ public class MergeCallbacks {
int numUidsAfter = count(mergedCert.getPublicKey().getUserIDs());
int newUids = numUidsAfter - numUidsBefore;
if (!Arrays.equals(existingCert.getEncoded(), mergedCert.getEncoded())) {
if (!existingCert.equals(mergedCert)) {
OpenPgpFingerprint fingerprint = OpenPgpFingerprint.of(mergedCert);
StringBuilder sb = new StringBuilder();
sb.append(String.format("Certificate %s has", fingerprint));

View file

@ -4,7 +4,7 @@
allprojects {
ext {
shortVersion = '0.2.1'
shortVersion = '0.1.3'
isSnapshot = true
minAndroidSdk = 10
javaSourceCompatibility = 1.8