mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-14 12:49:44 +02:00
Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
d028480b1a | |||
01f7fc158c | |||
d53776dfc8 |
4 changed files with 23 additions and 1 deletions
|
@ -6,6 +6,11 @@ SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 5.0.1
|
||||||
|
- `external-sop`: Properly map error codes to new exception types:
|
||||||
|
- `UNSUPPORTED_PROFILE`
|
||||||
|
- `INCOMPATIBLE_OPTIONS`
|
||||||
|
|
||||||
## 5.0.0
|
## 5.0.0
|
||||||
- Update implementation to [SOP Specification revision 05](https://www.ietf.org/archive/id/draft-dkg-openpgp-stateless-cli-05.html).
|
- Update implementation to [SOP Specification revision 05](https://www.ietf.org/archive/id/draft-dkg-openpgp-stateless-cli-05.html).
|
||||||
- Add the concept of profiles
|
- Add the concept of profiles
|
||||||
|
|
|
@ -267,6 +267,14 @@ public class ExternalSOP implements SOP {
|
||||||
throw new SOPGPException.KeyCannotSign("External SOP backend reported error KeyCannotSign (" +
|
throw new SOPGPException.KeyCannotSign("External SOP backend reported error KeyCannotSign (" +
|
||||||
exitCode + "):\n" + errorMessage);
|
exitCode + "):\n" + errorMessage);
|
||||||
|
|
||||||
|
case SOPGPException.IncompatibleOptions.EXIT_CODE:
|
||||||
|
throw new SOPGPException.IncompatibleOptions("External SOP backend reported error IncompatibleOptions (" +
|
||||||
|
exitCode + "):\n" + errorMessage);
|
||||||
|
|
||||||
|
case SOPGPException.UnsupportedProfile.EXIT_CODE:
|
||||||
|
throw new SOPGPException.UnsupportedProfile("External SOP backend reported error UnsupportedProfile (" +
|
||||||
|
exitCode + "):\n" + errorMessage);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException("External SOP backend reported unknown exit code (" +
|
throw new RuntimeException("External SOP backend reported unknown exit code (" +
|
||||||
exitCode + "):\n" + errorMessage);
|
exitCode + "):\n" + errorMessage);
|
||||||
|
|
|
@ -9,12 +9,14 @@ import org.junit.jupiter.params.provider.Arguments;
|
||||||
import org.junit.jupiter.params.provider.MethodSource;
|
import org.junit.jupiter.params.provider.MethodSource;
|
||||||
import sop.Profile;
|
import sop.Profile;
|
||||||
import sop.SOP;
|
import sop.SOP;
|
||||||
|
import sop.exception.SOPGPException;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
public class ListProfilesTest extends AbstractSOPTest {
|
public class ListProfilesTest extends AbstractSOPTest {
|
||||||
|
|
||||||
|
@ -30,4 +32,11 @@ public class ListProfilesTest extends AbstractSOPTest {
|
||||||
assertFalse(profiles.isEmpty());
|
assertFalse(profiles.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@MethodSource("provideInstances")
|
||||||
|
public void listUnsupportedProfiles(SOP sop) throws IOException {
|
||||||
|
assertThrows(SOPGPException.UnsupportedProfile.class, () -> sop
|
||||||
|
.listProfiles()
|
||||||
|
.subcommand("invalid"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
allprojects {
|
allprojects {
|
||||||
ext {
|
ext {
|
||||||
shortVersion = '5.0.1'
|
shortVersion = '5.0.1'
|
||||||
isSnapshot = true
|
isSnapshot = false
|
||||||
minAndroidSdk = 10
|
minAndroidSdk = 10
|
||||||
javaSourceCompatibility = 1.8
|
javaSourceCompatibility = 1.8
|
||||||
gsonVersion = '2.10.1'
|
gsonVersion = '2.10.1'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue