mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 02:39:39 +02:00
SOP-CLI: Implement additional version flags
This commit is contained in:
parent
fc432901ed
commit
19b6c8b1e3
2 changed files with 39 additions and 7 deletions
|
@ -6,6 +6,7 @@ package org.pgpainless.sop;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
|
@ -14,7 +15,7 @@ import sop.operation.Version;
|
|||
public class VersionImpl implements Version {
|
||||
|
||||
// draft version
|
||||
private static final String SOP_VERSION = "3";
|
||||
private static final String SOP_VERSION = "03";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -42,16 +43,21 @@ public class VersionImpl implements Version {
|
|||
@Override
|
||||
public String getBackendVersion() {
|
||||
double bcVersion = new BouncyCastleProvider().getVersion();
|
||||
return String.format("Bouncy Castle %,.2f", bcVersion);
|
||||
return String.format(Locale.US, "Bouncy Castle %.2f", bcVersion);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtendedVersion() {
|
||||
return getName() + " " + getVersion() + "\n" +
|
||||
"Based on PGPainless " + getVersion() + "\n" +
|
||||
"Using " + getBackendVersion() + "\n" +
|
||||
"See https://pgpainless.org\n" +
|
||||
"https://codeberg.org/PGPainless/pgpainless/src/branch/master/pgpainless-sop\n" +
|
||||
"\n" +
|
||||
"Implementation of the Stateless OpenPGP Protocol Version " + SOP_VERSION + "\n" +
|
||||
"See https://datatracker.ietf.org/doc/html/draft-dkg-openpgp-stateless-cli-03";
|
||||
"https://datatracker.ietf.org/doc/html/draft-dkg-openpgp-stateless-cli-" + SOP_VERSION + "\n" +
|
||||
"\n" +
|
||||
"Based on pgpainless-core " + getVersion() + "\n" +
|
||||
"https://pgpainless.org\n" +
|
||||
"\n" +
|
||||
"Using " + getBackendVersion() + "\n" +
|
||||
"https://www.bouncycastle.org/java.html";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue