Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Paul Schaub | d028480b1a | |
Paul Schaub | 01f7fc158c | |
Paul Schaub | d53776dfc8 |
|
@ -6,6 +6,11 @@ SPDX-License-Identifier: Apache-2.0
|
|||
|
||||
# Changelog
|
||||
|
||||
## 5.0.1
|
||||
- `external-sop`: Properly map error codes to new exception types:
|
||||
- `UNSUPPORTED_PROFILE`
|
||||
- `INCOMPATIBLE_OPTIONS`
|
||||
|
||||
## 5.0.0
|
||||
- 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
|
||||
|
|
|
@ -267,6 +267,14 @@ public class ExternalSOP implements SOP {
|
|||
throw new SOPGPException.KeyCannotSign("External SOP backend reported error KeyCannotSign (" +
|
||||
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:
|
||||
throw new RuntimeException("External SOP backend reported unknown exit code (" +
|
||||
exitCode + "):\n" + errorMessage);
|
||||
|
|
|
@ -9,12 +9,14 @@ import org.junit.jupiter.params.provider.Arguments;
|
|||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import sop.Profile;
|
||||
import sop.SOP;
|
||||
import sop.exception.SOPGPException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class ListProfilesTest extends AbstractSOPTest {
|
||||
|
||||
|
@ -30,4 +32,11 @@ public class ListProfilesTest extends AbstractSOPTest {
|
|||
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 {
|
||||
ext {
|
||||
shortVersion = '5.0.1'
|
||||
isSnapshot = true
|
||||
isSnapshot = false
|
||||
minAndroidSdk = 10
|
||||
javaSourceCompatibility = 1.8
|
||||
gsonVersion = '2.10.1'
|
||||
|
|
Loading…
Reference in New Issue